feat(models): support Claude Sonnet 5.5 - #2160
Merged
Merged
Conversation
Pre-commit hook ran. Total eslint: 0, total circular: 0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 forcedtool_choiceon 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
autoplus 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.rustfmt --edition 2021 --check --config skip_children=trueon the touched Rust source files — passed. Repository-widecargo fmt --all -- --checkwas also attempted and reported pre-existing formatting differences outside this change.git diff origin/develop --checkand final diff/secret review — passed. No rendered UI screenshot: this changes model data and native request handling, with no component layout change.