fix: refresh canonical model registry to add claude-sonnet-5 - #10187
fix: refresh canonical model registry to add claude-sonnet-5#10187michaelneale wants to merge 1 commit into
Conversation
Regenerated via `cargo run --bin build_canonical_models`. The registry snapshot was last refreshed 2026-06-09 and had no claude-sonnet-5 entries, so the model fell back to the 128k default context limit on Bedrock (and elsewhere). The refreshed registry includes amazon-bedrock/anthropic.claude-sonnet-5, anthropic/claude-sonnet-5, and google-vertex/claude-sonnet-5@default with their 1M context window. Adds a regression test asserting claude-sonnet-5 resolves to 1M context via the aws_bedrock provider mapping. Fixes #10179
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b5bff2e3d3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "id": "anthropic/claude-sonnet-5", | ||
| "name": "Claude Sonnet 5", | ||
| "family": "claude-sonnet", | ||
| "attachment": true, | ||
| "reasoning": true, |
There was a problem hiding this comment.
Mark Sonnet 5 as adaptive thinking
Anthropic's Sonnet 5 migration docs state that manual thinking: {type: "enabled", budget_tokens: ...} now returns 400 and adaptive thinking should be used instead (https://platform.claude.com/docs/en/about-claude/models/whats-new-sonnet-5). Without a thinking_mode: "adaptive" on this new canonical entry, thinking_type_for_provider falls through to ThinkingType::Enabled whenever the user configures a non-off GOOSE_THINKING_EFFORT, so Goose will emit the rejected manual budget for claude-sonnet-5 requests. Please mark Sonnet 5 as adaptive in the registry (including variants that resolve independently).
Useful? React with 👍 / 👎.
Summary
Fixes #10179.
claude-sonnet-5was missing from the canonical model registry, so it fell back to the 128kDEFAULT_CONTEXT_LIMITonaws_bedrock(and every other provider) instead of its actual 1M context window.The registry snapshot (
canonical_models.json) was last refreshed on 2026-06-09 (#9709), before sonnet-5 shipped. This PR regenerates it the standard way:Changes
canonical_models.json/provider_metadata.json— mechanical regeneration from OpenRouter. Now includesamazon-bedrock/anthropic.claude-sonnet-5(plusau.-prefixed regional variant),anthropic/claude-sonnet-5,google-vertex/claude-sonnet-5@default, and other providers — all withcontext: 1000000,output: 128000, and current pricing. Picks up ~3 weeks of other upstream registry changes as well.model.rs— regression testresolves_claude_sonnet_5_on_bedrockassertingModelConfig::new("claude-sonnet-5").with_canonical_limits("aws_bedrock")resolves to 1M context (exercises theaws_bedrock→amazon-bedrocknamespace mapping and version-suffix matching the issue verified as correctly wired).Testing
cargo test -p goose-providers canonical— all passcargo test -p goose-providers resolves_claude_sonnet_5— passes (fails without the registry refresh)cargo fmtNote:
cargo clippy -p goose-providers --all-targets -- -D warningsreports 3 pre-existingcollapsible-if-in-matcherrors injson.rs/thinking.rson main — unrelated to this change, left untouched.Follow-up
The registry only updates when someone manually runs the build script and commits (last time: June 9). A scheduled workflow to auto-refresh it would prevent this class of issue recurring — happy to file separately.