Skip to content
Discussion options

You must be logged in to vote

Short answer: yes, it should work the same way as the Claude Code CLI recipe, and the reason is worth knowing since it explains why it wasn't working for you.

The Agent SDK doesn't talk to Bedrock (or Anthropic, or Headroom) on its own — it spawns the actual claude CLI binary as a subprocess and passes through your process's environment (see subprocess_cli.py in claude-agent-sdk-python, it merges os.environ with anything you set via ClaudeAgentOptions.env). So whatever env vars make the CLI recipe work will make the SDK work too, since under the hood it's still the CLI making the request.

The repo has a doc for exactly this setup at docs/claude-code-bedrock-headroom.md, and the key gotcha…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by jo-me
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants