🤖 fix(openai): omit service_tier when not configured#3212
Merged
ibetitsmike merged 1 commit intomainfrom May 1, 2026
Merged
Conversation
Contributor
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stop writing
serviceTier: "auto"into provider options when the user hasn't configured one, and surface that "unset" state explicitly in the Settings UI and CLI. The provider field is now omitted entirely when no value is selected, letting OpenAI apply its own default routing.Fixed: #3196
Background
Previously the OpenAI service tier silently defaulted to
"auto"everywhere: inbuildProviderOptions, in the CLI's--service-tierflag, and in the Settings dropdown. That meant requests always sentservice_tier: autoeven when the user never picked a tier, and the UI couldn't represent the actual "no preference" state at all (the dropdown showedautowhether the config was missing or explicitly set toauto).Implementation
buildProviderOptionsnow readsmuxProviderOptions?.openai?.serviceTierdirectly and only spreadsserviceTierinto the OpenAI options when it is set.src/cli/run.tsdrops the"auto"default from--service-tier; if the flag is omitted, the entireopenaiblock is left out ofproviderOptions.ProvidersSectionadds a sentinel"unset"Select item labeledNot configured (omit service_tier). Picking it sendsvalue: ""throughsetProviderConfig, which the backend treats as a delete, removing theserviceTierkey fromproviders.jsonc. A short-livedopenaiServiceTierSelectOverridekeeps the trigger label correct between optimistic update and refresh.providerModelFactorylikewise no longer coerces a missingserviceTierinto"auto".Validation
flex-> back to unset -> explicitauto); each transition verified againstproviders.jsoncon disk and the dropdown trigger label.make static-check(eslint, tsgo x2, prettier, code-to-docs links, shellcheck, hadolint) clean.bun test src/cli/run.test.ts src/common/utils/ai/providerOptions.test.ts src/node/services/providerService.test.ts(176 pass).Risks
Low. Behavior change is limited to OpenAI requests: when no tier was previously configured, requests will now omit
service_tierinstead of sending"auto". OpenAI treats both as default routing, so live traffic should be unaffected. Existing configs with an explicit value continue to send that value verbatim.Generated with
mux• Model:anthropic:claude-opus-4-7• Thinking:xhigh• Cost:$47.05