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

fix(bedrock): Correct Cross-Region Inference Identifiers #278

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

watany-dev
Copy link

Inference endpoints in the Asia-Pacific region now correctly identify model IDs starting with the apac prefix. This update ensures that region-specific identifiers are parsed and processed accurately for cross-region inference.

ex.
https://dev.classmethod.jp/articles/amazon-bedrock-cross-region-inference-apac/

@paikwiki
Copy link

I also encountered this issue. When using the “apac” region prefix in its current state, the following error occurs:

NotImplementedError: Provider apac model does not support chat.
env/lib/python3.11/site-packages/langchain_aws/chat_models/bedrock.py:362: NotImplementedError

The cause of this error is that the “apac” region prefix is not recognized and is mistakenly interpreted as a provider name. This seems to be an issue that needs to be fixed quickly.

@Somers1
Copy link

Somers1 commented Nov 27, 2024

A workaround until this gets merged is to specify the provider explicitly
e.g.
ChatBedrock(model_id='apac.anthropic.claude-3-5-sonnet-20240620-v1:0', provider='anthropic')

@5enxia 5enxia mentioned this pull request Dec 3, 2024
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.

3 participants