Skip to content

fix(providers): add claude-sonnet-5 to canonical model registry - #10183

Merged
michaelneale merged 1 commit into
aaif-goose:mainfrom
syf2211:fix/claude-sonnet-5-canonical-registry
Jul 2, 2026
Merged

michaelneale merged 1 commit into
aaif-goose:mainfrom
syf2211:fix/claude-sonnet-5-canonical-registry

Conversation

@syf2211

@syf2211 syf2211 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Add claude-sonnet-5 entries to the canonical model registry so AWS Bedrock users get the correct 1M context window instead of the 128k default fallback.

Motivation

global.anthropic.claude-sonnet-5 on the aws_bedrock provider currently resolves no canonical entry, so with_canonical_limits() leaves context_limit unset and context_limit() falls back to 128,000 tokens. The wiring is correct — this is a pure data gap until models.dev lists the model.

Fixes #10179

Changes

  • Add amazon-bedrock/global.anthropic.claude-sonnet-5 to canonical_models.json (context: 1,000,000; output: 64,000), mirroring the claude-sonnet-4.6 global entry
  • Add anthropic/claude-sonnet-5 with the same limits and thinking_mode: adaptive
  • Register global.anthropic.claude-sonnet-5 in BEDROCK_KNOWN_MODELS for model-picker visibility
  • Add anthropic/claude-sonnet-5 to inferred_thinking_mode in build_canonical_models.rs for future registry rebuilds
  • Add unit tests for canonical lookup on aws_bedrock and anthropic

Tests

cargo test -p goose-providers with_canonical_limits
cargo test -p goose-providers test_map_to_canonical_model

All 7 with_canonical_limits tests and test_map_to_canonical_model pass.

Notes

Add amazon-bedrock and anthropic entries for Claude Sonnet 5 so
aws_bedrock resolves the 1M context window instead of falling back to
128k. Also register the model in BEDROCK_KNOWN_MODELS for picker
completeness.

Fixes aaif-goose#10179

@michaelneale michaelneale left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice one, FYI:

$3/$15 vs actual $2/$10 - is probably only tweak (which I think will be corrected when regenerated)

also cargo run --bin build_canonical_models - can regenerate it I think

@michaelneale
michaelneale added this pull request to the merge queue Jul 2, 2026
Merged via the queue into aaif-goose:main with commit dbc1f88 Jul 2, 2026
22 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.

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

2 participants