diff --git a/agent/anthropic_adapter.py b/agent/anthropic_adapter.py index 5768ae3ea904..fc5503e41117 100644 --- a/agent/anthropic_adapter.py +++ b/agent/anthropic_adapter.py @@ -1582,7 +1582,10 @@ def _is_bedrock_model_id(model: str) -> bool: """ lower = model.lower() # Regional inference-profile prefixes - if any(lower.startswith(p) for p in ("global.", "us.", "eu.", "ap.", "jp.")): + if any(lower.startswith(p) for p in ( + "global.", "us.", "eu.", "apac.", "ap.", "au.", "jp.", + "ca.", "sa.", "me.", "af.", + )): return True # Bare Bedrock model IDs: provider.model-family if lower.startswith("anthropic."): diff --git a/agent/bedrock_adapter.py b/agent/bedrock_adapter.py index e65867921c45..d3e6dfcd101e 100644 --- a/agent/bedrock_adapter.py +++ b/agent/bedrock_adapter.py @@ -448,7 +448,10 @@ def is_anthropic_bedrock_model(model_id: str) -> bool: """ model_lower = model_id.lower() # Strip regional prefix if present - for prefix in ("us.", "global.", "eu.", "apac.", "ap.", "au.", "jp."): + for prefix in ( + "global.", "us.", "eu.", "apac.", "ap.", "au.", "jp.", + "ca.", "sa.", "me.", "af.", + ): if model_lower.startswith(prefix): model_lower = model_lower[len(prefix):] break diff --git a/agent/chat_completion_helpers.py b/agent/chat_completion_helpers.py index 6e583f2cae42..b2e5c8653a48 100644 --- a/agent/chat_completion_helpers.py +++ b/agent/chat_completion_helpers.py @@ -341,7 +341,10 @@ def _bedrock_reasoning_stale_floor(model_id: object) -> "float | None": if not model_id or not isinstance(model_id, str): return None name = model_id.strip().lower() - for prefix in ("us.", "eu.", "apac.", "ap.", "global.", "jp."): + for prefix in ( + "global.", "us.", "eu.", "apac.", "ap.", "au.", "jp.", + "ca.", "sa.", "me.", "af.", + ): if name.startswith(prefix): name = name[len(prefix):] break