fix: resolve Anthropic Bedrock model IDs#7886
Conversation
|
@C1-BA-B1-F3 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
Normalize Bedrock and cross-region inference model IDs (e.g. anthropic.claude-3-5-sonnet-20240620-v1:0, us.anthropic.claude-3-haiku-20240307-v1:0) by stripping the provider prefix and version suffix before looking up model info and token limits. Fixes microsoft#7886
332e814 to
751862f
Compare
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
751862f to
500ea68
Compare
Summary
-v1:0so existing Claude table entries are reusedget_infoandget_token_limitFixes #7833
Testing
.venv/bin/python -m pytest python/packages/autogen-ext/tests/models/test_anthropic_model_info.py.venv/bin/ruff check python/packages/autogen-ext/src/autogen_ext/models/anthropic/_model_info.py python/packages/autogen-ext/tests/models/test_anthropic_model_info.py