fix(server): skip disabled text generation fallbacks #7535
main fromrefs/pull/7535/head·opened View on GitHubDisabling Codex in provider settings could still send title, branch, commit, and PR text generation to Codex because fallback selection read the legacy provider defaults.
Fallback selection now prefers enabled explicit provider instances and only uses a legacy default when that default instance has no explicit entry. Regression coverage includes the reported disabled-Codex state and an enabled custom-instance fallback.
Fixes #7533
Made with gpt-5.6-sol in T3 Code using Codex.
Note
Medium Risk Changes server settings resolution for text generation routing; wrong fallback logic could send generation to the wrong provider, but scope is limited to fallback when the current selection is disabled.
Overview Fixes text generation model fallback so disabling a provider instance (e.g. Codex) no longer routes title/branch/commit/PR generation through that provider when the current selection becomes invalid.
fallbackTextGenerationProvider now prefers the first enabled explicit providerInstances entry (via resolveProviderInstanceEnabled) and only uses the legacy providers map when there is no explicit instance for that driver’s default instance id. Fallback selections set both instance id and default model for that instance’s driver, not just the driver name.
Regression tests cover a disabled default Codex instance falling back to Claude, and an enabled custom Claude instance winning over disabled Codex.
Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit a0d2c63985c81e9f25b36f6d78e40f24fbab9e2c. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).Note
Fix text generation fallback to skip disabled provider instances#
- Updates
fallbackTextGenerationProviderin serverSettings.ts to checkproviderInstancesfirst, usingresolveProviderInstanceEnabledto skip disabled instances. - Falls back to legacy
settings.providersentries only when no correspondingproviderInstancesentry exists for that driver's default instance ID. - The resolved fallback now carries a concrete
instanceIdand derives the default model by driver viaDEFAULT_TEXT_GENERATION_MODEL_BY_PROVIDER. - Behavioral Change: A disabled default provider instance is no longer selected as a fallback; an enabled instance is preferred when multiple instances exist.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
Approvability#
Verdict: Not approved
Macroscope's review found this PR not approvable — This bug fix changes the fallback provider selection logic to filter out disabled instances. While the intent is clear and tests are included, the change affects which AI provider handles user requests during fallback scenarios, warranting human verification of the selection behavior.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).[gpt-5.6-sol] RESPONDING ON BEHALF OF WOUT:
This is the intended behavior change from #7533, not an unverified side effect. The server settings service tests exercise both fallback paths directly: a disabled explicit Codex default falls through to the unshadowed enabled Claude default, and an enabled custom provider instance wins before legacy defaults. The full CI test job and the focused local test pass on the latest commit.
StiensWout(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
01e05dc8-7ab2-4843-b66d-1a8e8b02fa7eYou can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share