Feature hasn't been suggested before.
Describe the enhancement you want to request
I am using opencode with OpenAI and want to be able to select the service_tier='flex' option for supported OpenAI models to reduce costs. At present, service_tier is propagated for Responses API, but not for chat/completions requests, and configuration/docs do not clearly document/validate this option.
Enhancement Proposed:
- Add
serviceTier to the OpenAI Responses provider options schema to ensure configuration is typed and documented.
- Add
serviceTier to the OpenAI-compatible chat provider options schema and propagate as service_tier in the chat request body (in openai-compatible-chat-language-model.ts).
- Update docs (e.g., models.mdx) to illustrate how to use
serviceTier: "flex" in opencode.json.
- Optionally update/add tests to assert that chat and response bodies include
service_tier when configured.
Benefits:
- Full support for OpenAI flexible service tiers (
flex and priority) for both response and chat endpoints.
- Enables users to control cost via configuration for supported models (gpt-5, o3, o4-mini, etc).
Feature hasn't been suggested before.
Describe the enhancement you want to request
I am using opencode with OpenAI and want to be able to select the
service_tier='flex'option for supported OpenAI models to reduce costs. At present, service_tier is propagated for Responses API, but not for chat/completions requests, and configuration/docs do not clearly document/validate this option.Enhancement Proposed:
serviceTierto the OpenAI Responses provider options schema to ensure configuration is typed and documented.serviceTierto the OpenAI-compatible chat provider options schema and propagate asservice_tierin the chat request body (inopenai-compatible-chat-language-model.ts).serviceTier: "flex"in opencode.json.service_tierwhen configured.Benefits:
flexandpriority) for both response and chat endpoints.