Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): skip disabled text generation fallbacks #7535

ClosedStiensWout(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/7535/headopened View on GitHub

Disabling 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 fallbackTextGenerationProvider in serverSettings.ts to check providerInstances first, using resolveProviderInstanceEnabled to skip disabled instances.
  • Falls back to legacy settings.providers entries only when no corresponding providerInstances entry exists for that driver's default instance ID.
  • The resolved fallback now carries a concrete instanceId and derives the default model by driver via DEFAULT_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.
Macroscope summarized a0d2c63.
    1. Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: 01e05dc8-7ab2-4843-b66d-1a8e8b02fa7e

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      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
      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. 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).
    4. [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.

Sign in to join this conversation.