Skip to content

[FEATURE]: Support configuring OpenAI service_tier='flex' for chat/completions and document in config #12297

Closed

Description

@duysqubix

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request 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).

Activity

  1. added
    discussion
    on Feb 5, 2026
  2. github-actions commented on Feb 5, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if these don't address your specific case.

  3. duysqubix commented on Feb 6, 2026

    @duysqubix
    Author

    There are dups found for this.. closing.. Thanks

  4. added 8 commits that reference this issue on Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

discussiondocs

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions