Skip to content

Conversation

glorious-beard
Copy link
Owner

…fix from model id

If present, removes the "us.", "eu.", or "apac." preceding the model id when selecting the correct model service for the given model.

Motivation and Context

  1. Why is this change required? This is to allow the use of cross-region inference models in the Amazon Bedrock connector.
  2. What problem does it solve? This fixes a bug in BedrockServiceFactory.cs in which the cross-regional identifier in a model was getting treated as an LLM provider.
  3. What scenario does it contribute to? Use of cross-regional inference models in Amazon Bedrock, namely Claude 3.7 Sonnet from a us-west-2 data center.
  4. If it fixes an open issue, please link to the issue here.

Description

This is a minimal-change quick fix for enabling cross-regional models in Amazon Bedrock. It looks for one of the three standard cross-regional identifiers at the start of the model ID in the bedrock service factory, and if present, removes it. With the model ID stripped of the cross-region header, existing logic is used to select the correct LLM service.

Contribution Checklist

…ional prefix from model id

If present, removes the "us.", "eu.", or "apac." preceding the model id when selecting the correct model service for the given model.
@glorious-beard glorious-beard self-assigned this Mar 8, 2025
@glorious-beard glorious-beard merged commit 96c1456 into main Mar 8, 2025
19 of 25 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.

1 participant