Skip to content

feat(models): support Claude Sonnet 5.5 - #2160

Merged
Harry19081 merged 1 commit into
developfrom
dev/sonnet-5-5-support
Sep 29, 2026
Merged

Harry19081 merged 1 commit into
developfrom
dev/sonnet-5-5-support

Conversation

@Chloe-JY

Copy link
Copy Markdown
Collaborator

Problem

Claude Sonnet 5.5 (API ID claude-sonnet-5-5) is absent from ORGII's fallback Claude catalog, model metadata, capability rules, and bundled pricing. Selecting it through a manually configured account therefore lacks the same published limits and price information as Opus 5.5. Anthropic also rejects forced tool_choice on both 5.5 models, while the native request path only converts that choice for Fable 5.1.

Solution

Register Sonnet 5.5 in the Claude OAuth fallback and default-enabled lists, model info, 1M-token capability rule, and bundled price catalog. The model info uses Anthropic's published 128K maximum output and $2 input / $10 output / $2.50 five-minute cache write / $0.20 cache read rates per million tokens. Preserve Sonnet's optional adaptive thinking and existing effort variants. Convert forced tool choices to auto plus a current-turn instruction for both Sonnet 5.5 and Opus 5.5, using the existing Fable 5.1 path.

Provider references: Sonnet 5.5 specifications and migration guidance.

Potential risks

Fallback catalogs may expose Sonnet 5.5 on Claude accounts that have not received access; live account discovery remains authoritative when available. The forced-tool conversion asks for a tool call instead of enforcing one at the API level, so a side query may need its existing output validation or retry path. No persistence format, schema, or public wire contract changes are involved. Reverting this commit removes the new fallback entry and restores the previous request behavior. Live Anthropic requests were not run because no test account was used.

Verification

  • pnpm exec vitest run --config config/vitest.config.ts src/types/model/info.anthropic.test.ts — passed (4 tests).
  • pnpm typecheck:fast — passed.
  • cargo test -p orgtrack_core current_published_rates_resolve_without_stale_family_defaults — passed.
  • cargo test -p key_vault current_claude_fallback_exposes_effort_variants — passed.
  • cargo test -p key_vault sonnet_ladders_follow_reference_effort_limits — passed.
  • cargo test -p key_vault current_oauth_generations_are_preselected_without_overriding_provider_defaults — passed.
  • cargo test -p agent_core sonnet_5_5_supports_optional_thinking_and_a_1m_context — passed.
  • cargo test -p agent_core forced_choices_become_auto_with_current_turn_instructions — passed on the final commit.
  • cargo test -p agent_core effort_capability_stays_in_lockstep_with_key_vault — passed.
  • Pre-commit staged lint, TypeScript check, and scoped Clippy — passed.
  • rustfmt --edition 2021 --check --config skip_children=true on the touched Rust source files — passed. Repository-wide cargo fmt --all -- --check was also attempted and reported pre-existing formatting differences outside this change.
  • git diff origin/develop --check and final diff/secret review — passed. No rendered UI screenshot: this changes model data and native request handling, with no component layout change.

Pre-commit hook ran. Total eslint: 0, total circular: 0
@Harry19081
Harry19081 merged commit a058c68 into develop Sep 29, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants