Add Bedrock support to ClaudeAgentSDKManager - #6
Open
sondermax wants to merge 1 commit into
Open
Conversation
Extend ClaudeAgentSDKManager to support AWS Bedrock Claude models by:
1. Route Bedrock models to ClaudeAgentSDKManager
- Update codon-runner to treat both "anthropic" and "amazon-bedrock"
provider IDs as Claude models
- Both providers now use the same ClaudeAgentSDKManager instead of
attempting shim resolution
2. Enable Bedrock mode in SDK
- Detect Bedrock models in buildSDKOptions()
- Set CLAUDE_CODE_USE_BEDROCK=1 environment variable
- Pass through AWS credentials (AWS_PROFILE, AWS_ACCESS_KEY_ID,
AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, AWS_REGION, etc.)
3. Add Bedrock authentication checks to self-test
- Accept optional ModelInfo parameter in runSelfTest()
- Verify AWS credentials are configured for Bedrock models
- Check for AWS region configuration
- Support multiple credential types: profile, access keys, bearer
token, container credentials, web identity
The Claude Agent SDK already supports Bedrock via CLAUDE_CODE_USE_BEDROCK,
so no SDK changes are needed. This implementation reuses the existing
Claude execution path with Bedrock-specific configuration.
Model IDs like us.anthropic.claude-haiku-4-5-20251001-v1:0 are passed
directly to the SDK, which handles regional Bedrock routing.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Author
|
hey! took a stab at #3 - let me know if this is worth getting merged! i don't sling TS so happy to take notes and do things how y'all would like! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extend ClaudeAgentSDKManager to support AWS Bedrock Claude models by:
Route Bedrock models to ClaudeAgentSDKManager
Enable Bedrock mode in SDK
Add Bedrock authentication checks to self-test
The Claude Agent SDK already supports Bedrock via CLAUDE_CODE_USE_BEDROCK, so no SDK changes are needed. This implementation reuses the existing Claude execution path with Bedrock-specific configuration.
Model IDs like us.anthropic.claude-haiku-4-5-20251001-v1:0 are passed directly to the SDK, which handles regional Bedrock routing.