Skip to content

fix(claude): fill the unset Sonnet tier with claude-sonnet-5-5 - #6874

Merged
lidge-jun merged 1 commit into
lidge-jun:devfrom
lhj6102:fix/claude-sonnet-tier-default
Oct 10, 2026
Merged

lidge-jun merged 1 commit into
lidge-jun:devfrom
lhj6102:fix/claude-sonnet-tier-default

Conversation

@lhj6102

@lhj6102 lhj6102 commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • On a subscription launch, ocx claude fills an unset Sonnet tier slot from CLAUDE_CODE_NATIVE_TIERS (src/claude/context-windows.ts). That table still said claude-sonnet-5, so ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-5[1m] was injected and the stock Claude Code /model picker bound its Sonnet row to Sonnet 5, hiding Sonnet 5.5.
  • The table is meant to mirror what Claude Code's tier aliases resolve to. Its alias map in 2.1.294, 2.1.295 and 2.1.296 has sonnet:{default:"claude-sonnet-5-5",...} (opus claude-opus-5-5 and fable claude-fable-5-1 are unchanged). This bumps the Sonnet entry and the version note in the doc comment to match.
  • claude-sonnet-5-5 is already registered at 1M in ANTHROPIC_MODEL_CONTEXT_WINDOWS, so the slot keeps its [1m] marker. An explicitly configured tierModels.sonnet still wins, including claude-sonnet-5.
  • Tests: the empty-config tier expectation and the management API subscription check now expect claude-sonnet-5-5[1m]. The cases about another provider's row, a capped anthropic row and a modelMap entry now target claude-sonnet-5-5, the id the default slot actually uses, so they keep testing the same behavior.
  • Docs: the tier-default row in the Claude Code guide is updated in English and all seven translations (same one-token change).
  • Haiku is deliberately out of scope here. Follow-up proposals (deriving tier defaults from the registry, a drift check, Haiku) are in the issue thread.

Closes #6873

Verification

  • bun test tests/claude-integration/claude-context-windows.test.ts tests/claude-integration/claude-management-api.test.ts: 80 pass, 0 fail.
  • bun test tests/claude-integration/claude-cli.test.ts tests/server/system-env.test.ts tests/gui/claude-manual-env.test.ts tests/claude-integration/claude-subagent-model-force.test.ts: 134 pass, 0 fail.
  • bun run typecheck: exit 0.
  • bun run structure:check: passed. The docs mapped to src/claude/ (structure/runtime.md, structure/clients/claude-desktop.md) were reviewed and do not state the tier defaults, so they need no change.
  • bun run privacy:scan: passed.
  • bun run test (Bun 1.4.0 runner via OCX_TEST_RUNNER_BUN, Ubuntu 26.04 on WSL2): 43926 pass, 21 fail, 152 skip. None of the 21 failures are in code this PR touches:
    • 14 fail identically on an unmodified origin/dev worktree: tests/ci-workflows/assert-mergeable-review.test.ts (9, jq is not installed locally), tests/codex-integration/codex-missing-home.test.ts (3), tests/codex-integration/codex-inject-missing-config.test.ts (1) and tests/codex-integration/codex-home-wsl-local-state.test.ts (1; it asserts behavior "outside WSL" and this machine is WSL).
    • 7 were timeouts under full-suite load (2000 ms / 5000 ms). Both files pass when run alone on this branch: bun test tests/lib/plugin-loader.test.ts tests/cli/cli-access-audio-live.test.ts gave 59 pass, 0 fail.
  • Branch is rebased on the current dev head (04861658a), 0 commits behind.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • Required local validation passed; commands, results, and any full-suite exception are documented.

  • I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

Summary by CodeRabbit

  • Documentation
    • Updated the Claude Code guides to identify claude-sonnet-5-5 as the default Sonnet model for subscription launches when no Sonnet model is specified. Other model defaults remain unchanged.

Claude Code 2.1.294+ resolves the `sonnet` alias to claude-sonnet-5-5, but
the native tier table still pinned an unset Sonnet slot to claude-sonnet-5,
so subscription launches through `ocx claude` hid Sonnet 5.5 from the picker.

Refs lidge-jun#6873
@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Oct 10, 2026
@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

✅ READY

  • all PR quality gates passed; the review readiness checklist is complete.

Review readiness checklist

  • ✅ Required local validation passed; commands, results, and any full-suite exception are documented.
  • ✅ I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
  • ✅ I resolved all correct Codex and CodeRabbit findings.
  • ✅ My PR is ready for review.

✅ 4/4 boxes ticked.

This pull request has been marked Ready for Review.
The review-ready label marks this PR as ready; review automation runs independently.
Maintainers notified: @lidge-jun @Ingwannu

@github-actions
github-actions Bot marked this pull request as draft October 10, 2026 06:45
@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 0a8c6f10-6008-4cdc-a802-e8699ef4809d



📥 Commits

Reviewing files that changed from the base of the PR and between 0486165 and 14c08a7.




📒 Files selected for processing (11)
  • docs-site/src/content/docs/fr/guides/claude-code.md
  • docs-site/src/content/docs/guides/claude-code.md
  • docs-site/src/content/docs/ja/guides/claude-code.md
  • docs-site/src/content/docs/ko/guides/claude-code.md
  • docs-site/src/content/docs/ru/guides/claude-code.md
  • docs-site/src/content/docs/tr/guides/claude-code.md
  • docs-site/src/content/docs/zh-cn/guides/claude-code.md
  • docs-site/src/content/docs/zh-tw/guides/claude-code.md
  • src/claude/context-windows.ts
  • tests/claude-integration/claude-context-windows.test.ts
  • tests/claude-integration/claude-management-api.test.ts



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





📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

When the subscription Sonnet tier is unset, ocx claude now selects claude-sonnet-5-5 instead of claude-sonnet-5. Integration tests and Claude Code guides use the updated model ID.

Changes

Sonnet tier default

Layer / File(s) Summary
Update the Sonnet tier default
src/claude/context-windows.ts, tests/claude-integration/claude-context-windows.test.ts, tests/claude-integration/claude-management-api.test.ts, docs-site/src/content/docs/guides/claude-code.md, docs-site/src/content/docs/{fr,ja,ko,ru,tr,zh-cn,zh-tw}/guides/claude-code.md
The native Sonnet tier mapping changes to claude-sonnet-5-5, and the documented Claude Code version changes from 2.1.282 to 2.1.296. Integration tests use the updated ID while retaining their context-window assertions. The guides document the updated subscription default; Opus and Fable values remain unchanged.

Priority: ➖ Normal

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

Change: Bug fix · Severity of issue fixed: Medium





Merge Risk: ⚪ Minimal · up to 14c08

The Sonnet default update is limited to the unset subscription tier, while explicit overrides and the 1M marker remain intact. No concrete merge-blocking issue remains.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check Passed Issue #6873 requires the unset Sonnet tier to resolve to claude-sonnet-5-5[1m] during a Claude Code subscription launch, while configured tier values remain effective. In `src/claude/context-windows…
Out of Scope Changes check Passed The changed files are limited to the Sonnet native-tier mapping, focused integration-test expectations, and the matching Claude Code guide row in English and seven translations. These tests and docume…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: updating the unset Claude Sonnet tier to use claude-sonnet-5-5.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR





  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions
github-actions Bot marked this pull request as ready for review October 10, 2026 08:26
@lidge-jun
lidge-jun merged commit 4222577 into lidge-jun:dev Oct 10, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working review-ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants