Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotfix: Anthropic provider points to the correct LiteLLM model ID #3715

Merged
merged 2 commits into from
Sep 3, 2024

Conversation

amanape
Copy link
Collaborator

@amanape amanape commented Sep 3, 2024

CHANGELOG

  • Selecting the anthropic provider now points to the correct litellm model

PROBLEM
LiteLLM returns two types of model IDs for Anthropic (and actually other providers too). The first type has a pattern as anthropic.claude-3-5-sonnet-20240620. The second is of the type claude-3-5-sonnet-20240620 which is the one we want.

The first pattern is either outdated and incompatible and defaults/assumes a Bedrock configuration or the first pattern is actually for Bedrock configurations.

The helper functions that parse the models were using the first pattern and storing the second under the other provider.

SOLUTION
The parser now ignores the models with a . separator and groups the anthropic models with a / separator (e.g., claude-3-5-sonnet-20240620 is now anthropic/claude-3-5-sonnet-20240620).

Resolves #3708

@amanape amanape requested a review from rbren September 3, 2024 16:16
@amanape amanape self-assigned this Sep 3, 2024
@amanape amanape enabled auto-merge (squash) September 3, 2024 17:27
@amanape amanape merged commit 0bb0903 into All-Hands-AI:main Sep 3, 2024
18 checks passed
@amanape amanape deleted the hotfix/anthropic-providers branch September 3, 2024 19:54
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.

[Bug]: 403 on Bedrock when using claude-3-5-sonnet-20240620
2 participants