Skip to content

Commit 73d62e2

Browse files
committed
feat: Support global cross-region inference profile prefix
1 parent a453abe commit 73d62e2

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

llama-index-integrations/llms/llama-index-llms-bedrock-converse/llama_index/llms/bedrock_converse/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ def is_reasoning(model_name: str) -> bool:
179179

180180
def get_model_name(model_name: str) -> str:
181181
"""Extract base model name from region-prefixed model identifier."""
182-
# Check for region prefixes (us, eu, apac)
183-
REGION_PREFIXES = ["us.", "eu.", "apac."]
182+
# Check for region prefixes (us, eu, apac, global)
183+
REGION_PREFIXES = ["us.", "eu.", "apac.", "global."]
184184

185185
# If no region prefix, return the original model name
186186
if not any(prefix in model_name for prefix in REGION_PREFIXES):

llama-index-integrations/llms/llama-index-llms-bedrock-converse/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ dev = [
2929

3030
[project]
3131
name = "llama-index-llms-bedrock-converse"
32-
version = "0.10.1"
32+
version = "0.10.2"
3333
description = "llama-index llms bedrock converse integration"
3434
authors = [{name = "Your Name", email = "[email protected]"}]
3535
requires-python = ">=3.9,<4.0"

llama-index-integrations/llms/llama-index-llms-bedrock-converse/tests/test_bedrock_converse_utils.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ def test_get_model_name_translates_us():
3232
)
3333

3434

35+
def test_get_model_name_translates_global():
36+
assert (
37+
get_model_name("global.anthropic.claude-sonnet-4-5-20250929-v1:0")
38+
== "anthropic.claude-sonnet-4-5-20250929-v1:0"
39+
)
40+
41+
3542
def test_get_model_name_does_nottranslate_cn():
3643
assert (
3744
get_model_name("cn.meta.llama3-2-3b-instruct-v1:0")

llama-index-integrations/llms/llama-index-llms-bedrock-converse/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)