Skip to content

fix: refresh canonical model registry to add claude-sonnet-5 - #10187

Closed
michaelneale wants to merge 1 commit into
mainfrom
fix/canonical-registry-sonnet-5
Closed

fix: refresh canonical model registry to add claude-sonnet-5#10187
michaelneale wants to merge 1 commit into
mainfrom
fix/canonical-registry-sonnet-5

Conversation

@michaelneale

Copy link
Copy Markdown
Collaborator

Summary

Fixes #10179.

claude-sonnet-5 was missing from the canonical model registry, so it fell back to the 128k DEFAULT_CONTEXT_LIMIT on aws_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:

cargo run --bin build_canonical_models

Changes

  • canonical_models.json / provider_metadata.json — mechanical regeneration from OpenRouter. Now includes amazon-bedrock/anthropic.claude-sonnet-5 (plus au.-prefixed regional variant), anthropic/claude-sonnet-5, google-vertex/claude-sonnet-5@default, and other providers — all with context: 1000000, output: 128000, and current pricing. Picks up ~3 weeks of other upstream registry changes as well.
  • model.rs — regression test resolves_claude_sonnet_5_on_bedrock asserting ModelConfig::new("claude-sonnet-5").with_canonical_limits("aws_bedrock") resolves to 1M context (exercises the aws_bedrockamazon-bedrock namespace mapping and version-suffix matching the issue verified as correctly wired).

Testing

  • cargo test -p goose-providers canonical — all pass
  • cargo test -p goose-providers resolves_claude_sonnet_5 — passes (fails without the registry refresh)
  • cargo fmt

Note: cargo clippy -p goose-providers --all-targets -- -D warnings reports 3 pre-existing collapsible-if-in-match errors in json.rs/thinking.rs on 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.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +16040 to +16044
"id": "anthropic/claude-sonnet-5",
"name": "Claude Sonnet 5",
"family": "claude-sonnet",
"attachment": true,
"reasoning": true,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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.

claude-sonnet-5 missing from canonical model registry, falls back to 128k context limit on Bedrock

1 participant