Skip to content

fix(model-capabilities): match region/provider-prefixed model ids - #726

Open
pcbeingused333 wants to merge 1 commit into
activeagents:mainfrom
pcbeingused333:fix/model-capabilities-prefixed-ids
Open

pcbeingused333 wants to merge 1 commit into
activeagents:mainfrom
pcbeingused333:fix/model-capabilities-prefixed-ids

Conversation

@pcbeingused333

Copy link
Copy Markdown
Contributor

Follow-up to #669 (same sanitizer, no separate issue).

ModelCapabilities anchors its built-in patterns with \A, so cloud-wrapped ids such as Bedrock's eu.anthropic.claude-sonnet-5-v1:0 (the format used in the bedrock_provider.rb docs) never matched, and sampling params were not stripped for thinking-first models there.

Fix: before matching, strip the region/provider prefix (eu.anthropic., anthropic., anthropic/, openai.) and the -vN:M suffix. Custom rules still see the raw name as well as the normalized one.

Test: added a case in test/model_capabilities_test.rb for prefixed ids (positive for sonnet-5/opus-5/fable-5/gpt-5, negative for a prefixed haiku-4-5).

This PR was prepared with the help of an AI coding assistant (Claude Code).

This branch has not been deployed

No deployments
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.

1 participant