Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): commit and title generation use your custom model when no text model is set #19386

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/19386/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

When no usable text generation model is set, the server falls back to a hard-coded model per provider (claude-haiku-5-5 for Claude). A Claude instance behind a backend that only serves custom models (for example OpenRouter with guardrails) refuses that model, so commit, PR, branch, and title generation all fail even though the user's thread model works.

Now the fallback uses the thread default model, with its options, when that model is one of the fallback instance's custom models. A custom model usually means a backend that may refuse the built-in default, and the thread default is known to work there. Built-in thread defaults keep the cheap fallback (Haiku), so normal Claude users do not move to a more expensive model. Both the machine-level and project-scoped fallbacks use this.

Per provider: the change is in the shared fallback, so it applies the same way to every provider that can be a text generation fallback (Codex, Claude, Cursor, Grok, Muse, Pi, OpenCode, Antigravity). Each has customModels and each one's text generation reads the model and its options from the selection. Nothing changes for a provider when the thread default is not one of its custom models.

Proof: a new test in apps/server/src/serverSettings.test.ts fails on main (gets claude-haiku-5-5) and passes with the fix. It also checks that a built-in thread default still gets Haiku. Related test files, typecheck, and lint for packages/shared and apps/server pass.

Refs #12651. Part 2 of the issue (a failed Claude CLI run shows stderr instead of the JSON error on stdout) is out of scope here.

Reviewed with sol-loop: 1 round with GPT-6.1 Sol.

Model and harness: Claude Opus 5.5 in Claude Code via T3 Code.

🤖 Generated with Claude Code

    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. juliusmarminge added labelsmacroscope-review

    3. Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — This changes the server’s automatic text-generation fallback, causing commit, title, branch, and pull-request generation to use a configured custom model in qualifying cases instead of the existing provider default. The change is narrowly implemented and tested, but its product-default behavior warrants human review.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. Review in Change Stack →

      No actionable comments were generated in the recent review. 🎉

      ℹ️ Recent review info
      ⚙️ Run configuration
      • Configuration used: Path: .coderabbit.config.ts
      • Review profile: CHILL
      • Plan: Team
      • Run ID: 6e2bda7f-4448-496f-965e-12bf574895ce
      📥 Commits

      Reviewing files that changed from the base of the PR and between f5b5f9dd7be29c4f55f4687dda15e4105cf966fc and 41d8b1253817955f3ecdac2565995d050e88c390.

      📒 Files selected for processing: 4
      • apps/server/src/serverSettings.test.ts
      • apps/server/src/serverSettings.ts
      • packages/shared/src/projectSettings.ts
      • packages/shared/src/serverSettings.ts

      Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

      📝 Walkthrough

      Fallback selection now accepts a default model selection and preserves it when it matches a configured custom model on the chosen enabled instance. Server and project settings pass their defaults into the fallback function.

      Changes: Text-generation model fallback

      Layer / File(s)Summary
      Custom-model-aware fallback selection
      packages/shared/src/serverSettings.ts
      The fallback function accepts an optional default model selection. It returns that selection when its instance is the chosen enabled instance and its model matches a configured custom model. Otherwise, it uses the driver’s default model.
      Pass defaults into fallback selection
      apps/server/src/serverSettings.ts, packages/shared/src/projectSettings.ts, apps/server/src/serverSettings.test.ts
      Server settings and project settings pass their effective default model selection to fallback selection. The test checks that a configured Claude Agent custom model retains its selection and options, while a built-in model falls back to claude-haiku-5-5.

      Priority: ⬇️ Low

      Estimated code review effort: 2 (Simple) | ~10 minutes

      Change: Bug fix

      Suggested reviewers: juliusmarminge

      Merge Risk: ⚪ Minimal · up to 41d8b

      Text-generation fallback now keeps the thread default when it is a custom model on the chosen instance, and otherwise keeps the built-in fallback. No merge-blocking risk was identified.

      Pre-merge checks: Passed 4
      Passed Passed checks: 4 passed
      Check nameStatusExplanation
      Title checkPassedThe title clearly describes the primary change: using a custom model for commit and title generation when no text model is set.
      Description checkPassedThe description explains the problem, the fallback behavior, affected provider scope, verification results, issue reference, out-of-scope work, and agent details. It provides specific test evidence an…
      Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
      ✨ Finishing Touches
      📝 Generate docstrings
      • Commit to this branch
      • Create a new PR
      🧪 Generate unit tests (beta)
      • Commit to this branch
      • Create a new PR
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
      Comment `@coderabbitai help` to get the list of available commands.
    5. Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire5.0 KiB5.0 KiB+7 B (+0.1%)6.8 KiB✅
      CodexThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
      CodexLive turn WebSocket wire1.2 KiB1.2 KiB+7 B (+0.6%)2.0 KiB✅
      CodexLive turn WebSocket decoded20.9 KiB20.9 KiB0 B (0.0%)29.3 KiB✅
      CodexLive turn messages220 (0.0%)8✅
      ClaudeTotal thread wire5.0 KiB5.0 KiB+24 B (+0.5%)6.8 KiB✅
      ClaudeThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
      ClaudeLive turn WebSocket wire1.2 KiB1.2 KiB+24 B (+2.0%)2.0 KiB✅
      ClaudeLive turn WebSocket decoded21.2 KiB21.2 KiB+41 B (+0.2%)29.3 KiB✅
      ClaudeLive turn messages12+1 (+100.0%)8✅

      Baseline: f5b5f9d · PR result: 41d8b12 · Source CI: success

      Scenario and decoded snapshot size

      10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

      • Codex decoded thread snapshot: 108.5 KiB
      • Claude decoded thread snapshot: 108.8 KiB

      Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Sign in to join this conversation.