Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): honor custom Claude model options #22792

Closedjuliusmarmingewants to merge 7 commits intomain fromrefs/pull/22792/headopened View on GitHub

juliusmarmingecommented

Problem

Custom Claude model Thinking selections were saved but omitted from SDK launch settings and process identity. Reproduced on main 74541bab17 through an isolated web dev server and real Claude Code 2.1.303. Explicit effort was already preserved by 76f57f9b84.

Change

Compile SDK launch settings and query identity with the existing instance-scoped custom model catalog, preserving built-in mappings and explicit effort fallback. Fixes #16672.

Scope and approval

Fixes #16672

Triaged bug via the automated issue flow.

Evidence index and commands · 10-row behavior matrix · 223-test log. Final head b3f248adfd adds test fixtures only; its production tree exactly matches the after-runtime SHA. Additional SDK harness fixtures cover custom defaults/validation, boolean options, and prompt effort on send/steer.

Verification

Two added behavioural regressions fail on main and pass with the fix: custom Thinking Off reaches SDK settings with effort High preserved; unchanged Thinking reuses a query, and both toggle directions replace it. The implementation step passed 223 focused tests, targeted lint/formatting, and server typecheck. Final independent reviews at the current head returned MERGE from Codex GPT-6.1 Sol and Claude Opus 5.5. Proof audit pass 2 returned SUFFICIENT for all 10 matrix rows and independently reproduced 223 passing tests. The Claude reviewer also checked base production against the new tests: 11 fail on base; two deliberate controls pass.

Evidence

BeforeAfter
Runtime transcript, SHA 74541bab17Runtime transcript, SHA 95d01097c4

Real browser → isolated dev server → real Claude SDK. Custom dated Sonnet model saves effort High and Thinking Off. Before: query.open has effort high and showThinkingSummaries:true, no alwaysThinkingEnabled. After: false → true → false launches supply the selected boolean and keep effort high; all custom turns complete. The built-in Haiku control supplies alwaysThinkingEnabled:false before the fix; its upstream request returns unknown-provider.

No UI/render paths change. What else changed: custom option descriptors now supply parent launch, query identity, and prompt effort compilation; built-in mappings and existing subagent catalog behavior are retained.

Unverified: macOS, Windows, Electron shell, mobile, relay/tunnel, dynamic upstream catalog refresh; built-in Haiku upstream completion. This uses configured custom model capabilities, not the broader live catalog proposal in #16583.

Model/harness: GPT-6.1 Sol through Codex in T3 Code.

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

    2. juliusmarminge changed the title

    3. github-actions[bot](GitHub profile, opens in a new tab)commented

      Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire5.0 KiB5.0 KiB0 B (0.0%)6.8 KiB✅
      CodexThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
      CodexLive turn WebSocket wire1.2 KiB1.2 KiB0 B (0.0%)2.0 KiB✅
      CodexLive turn WebSocket decoded21.6 KiB21.6 KiB0 B (0.0%)24.4 KiB✅
      CodexLive turn messages220 (0.0%)8✅
      ClaudeTotal thread wire5.0 KiB5.1 KiB+17 B (+0.3%)6.8 KiB✅
      ClaudeThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
      ClaudeLive turn WebSocket wire1.2 KiB1.3 KiB+17 B (+1.3%)2.0 KiB✅
      ClaudeLive turn WebSocket decoded21.9 KiB21.9 KiB0 B (0.0%)24.4 KiB✅
      ClaudeLive turn messages220 (0.0%)8✅

      Baseline: f6503f0 · PR result: 094c4ec · Source CI: failure

      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.

    4. juliusmarminge added labelsvia-triage

    5. juliusmarminge added labelsvia-triage:gates-failing

    6. juliusmarminge removed labelsvia-triage

    7. juliusmarminge added labelsbugfix

    8. juliusmarminge removed labelsvia-triage:gates-failing

    9. juliusmarminge added labelspr:gate-failed

    10. juliusmarminge removed labelspr:gate-failed

    11. juliusmarminge added labelspr:ready

    12. juliusmarminge added labelspr:gate-failed

    13. juliusmarminge removed labelspr:ready

    14. tanstack-source added labelsbug

    15. juliusmarminge linked this to fix #16672

    16. Note

      Generated by claude-opus-5-5 RESPONDING ON BEHALF OF SHARAD

      This can be closed: it's already fixed on main. #27034 (2d0efd3584) and #31717 (43cf364dd2) pass the instance-scoped model catalog to compileClaudeModelSelection at every Claude call site this PR changes. #16672 was closed as completed on that basis.

      The attached script applies this PR's 13 new adapter tests to current main without the PR's source change, and all 13 pass. It then removes the catalog argument from main's compileClaudeModelSelection calls, and 11 of the 13 fail. The other 2 are the PR's controls. So the tests exercise main's fix, not something this PR adds.

      To reproduce, run bash prove-pr-22792.sh from a clean t3code checkout after vp i, with gh authenticated.

      Result
      PASS  #27034 is on main as 2d0efd3584
      PASS  #31717 is on main as 43cf364dd2
      PASS  main's makeClaudeQueryOptions compiles the selection against the scoped catalog
      PASS  linked issue #16672 closed as completed by juliusmarminge
            Tests  13 passed | 380 skipped (393)
      PASS  all 13 tests the PR adds pass on main with main's adapter
            Tests  11 failed | 2 passed | 380 skipped (393)
      PASS  with the catalog removed from main's compile calls, 11 of the 13 tests fail (2 are the PR's controls)
      VERDICT: CLOSE (already-fixed)
    17. Closing this draft: it has sat unfinished and #16672, which it was for, is closed.

    18. juliusmarminge closed this

Sign in to join this conversation.