Provider selection
Claude Code routes to Bedrock whenCLAUDE_CODE_USE_BEDROCK is truthy.
The main client path is in src/services/api/client.ts. Additional Bedrock-specific helpers live in src/utils/model/bedrock.ts.
Region behavior
The code comments inbedrock.ts are explicit: Bedrock region selection follows the Anthropic Bedrock SDK convention:
AWS_REGIONAWS_DEFAULT_REGION- fallback
us-east-1
ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION
Authentication paths
The snapshot supports two auth paths:- normal AWS credentials, refreshed through
refreshAndGetAwsCredentials() - bearer-token mode through
AWS_BEARER_TOKEN_BEDROCK
CLAUDE_CODE_SKIP_BEDROCK_AUTH
smithy.api#noAuth and a plain HTTP handler.
Custom endpoint support
ANTHROPIC_BEDROCK_BASE_URL can override the endpoint for both the control client and the runtime client.
That appears intended for proxying, testing, or private routing scenarios.
Inference profiles
src/utils/model/bedrock.ts includes dedicated support for Bedrock inference profiles:
getBedrockInferenceProfiles()getInferenceProfileBackingModel()- ARN parsing helpers
- cross-region prefix helpers
Prompt caching note
The API layer referencesENABLE_PROMPT_CACHING_1H_BEDROCK, which indicates Bedrock-specific prompt-caching behavior exists in this snapshot.
Practical deployment notes from source
At minimum, a Bedrock deployment needs:CLAUDE_CODE_USE_BEDROCK=1- valid AWS credentials or
AWS_BEARER_TOKEN_BEDROCK - a valid region via
AWS_REGIONorAWS_DEFAULT_REGION