Model dropdown hardcodes us. region prefix and ignores Bedrock region configuration
Description:
When using Claude Code with AWS Bedrock in non-US regions (e.g., \ap-south-1\), the model switcher dropdown has several issues that make it unusable:
Issues:
- Hardcoded region prefix: When selecting a model from the dropdown (e.g., \"Opus 4.5\"), the extension writes \
us.anthropic.claude-opus-4-5-20251101-v1:0\to \claudeCode.selectedModel\, regardless of the configured AWS region. This causes API errors when using non-US regions that require \global.\prefix.
- Incorrect UI display: The dropdown shows \"Default (currently Sonnet 4.5)\" even when \
global.anthropic.claude-opus-4-5-20251101-v1:0\is configured in settings.
- Ignores environment variables: The \
ANTHROPIC_MODEL\environment variable is set to Opus, but \"Default (recommended)\" still uses Sonnet.
Environment:
\\\json\
{
"claudeCode.selectedModel": "global.anthropic.claude-opus-4-5-20251101-v1:0",
"claudeCode.environmentVariables": [
{
"name": "CLAUDE_CODE_USE_BEDROCK",
"value": "1"
},
{
"name": "AWS_REGION",
"value": "ap-south-1"
},
{
"name": "ANTHROPIC_MODEL",
"value": "arn:aws:bedrock:ap-south-1:588625695333:inference-profile/global.anthropic.claude-opus-4-5-20251101-v1:0"
}
]
}
\\
Steps to Reproduce:
- Configure Claude Code to use AWS Bedrock in \
ap-south-1\region - Set \
claudeCode.selectedModel\to \global.anthropic.claude-opus-4-5-20251101-v1:0\ - Click on the model dropdown and select \"Opus 4.5\"
- Settings are changed to \
us.anthropic.claude-opus-4-5-20251101-v1:0\ - API error occurs: \"400 The provided model identifier is invalid\"
Expected Behavior:
- Extension should detect the configured AWS region and use the appropriate inference profile prefix (\
global.\for cross-region profiles, \us.\for US regions) - Or, provide a setting to configure the region prefix
- Or, read from environment variables to determine the correct model identifier
- UI should accurately display which model is currently selected
Workaround:
Manually edit \settings.json\ and avoid using the dropdown entirely. This is tedious and defeats the purpose of having a UI.
Impact:
This makes Claude Code unusable for Bedrock users in non-US regions who need to switch models frequently.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗