Bug Report
Environment
- SDK version:
0.1.48
- Working version:
0.1.47
- Deployment: AWS Bedrock (via
CLAUDE_CODE_USE_BEDROCK=1)
- Model:
claude-sonnet-4.5
Description
After upgrading to 0.1.48, using include_partial_messages=True causes an immediate error on Bedrock-routed deployments:
tools.0.custom.eager_input_streaming: Extra inputs are not permitted
This was introduced by #644, which injects CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING=1 into the subprocess env when include_partial_messages=True. The CLI then sets eager_input_streaming: true on each tool in the API request payload.
The direct Anthropic API accepts (or silently ignores) this extra field, but AWS Bedrock performs strict schema validation and rejects the unknown eager_input_streaming property on tool definitions.
Steps to Reproduce
- Configure Bedrock deployment (
CLAUDE_CODE_USE_BEDROCK=1, ANTHROPIC_BEDROCK_BASE_URL, etc.)
- Create a
ClaudeSDKClient with include_partial_messages=True
- Send any prompt — fails immediately with the above error
Expected Behavior
include_partial_messages=True should work with Bedrock, or at minimum gracefully degrade (skip FGTS when Bedrock is detected), rather than producing a hard error.
Workaround
Set include_partial_messages=False (losing streaming tool input deltas), or pin to 0.1.47.
Suggested Fix
The CLI or SDK should detect Bedrock routing and either:
- Skip setting
eager_input_streaming on tools when the request is routed through Bedrock, or
- Strip the field before sending the request to Bedrock endpoints
This could be done in the CLI's FGTS gate (where it checks the GrowthBook flag / env var) by also checking whether CLAUDE_CODE_USE_BEDROCK is set, or in the SDK's transport layer by not injecting the env var when Bedrock env vars are present.
Bug Report
Environment
0.1.480.1.47CLAUDE_CODE_USE_BEDROCK=1)claude-sonnet-4.5Description
After upgrading to
0.1.48, usinginclude_partial_messages=Truecauses an immediate error on Bedrock-routed deployments:This was introduced by #644, which injects
CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING=1into the subprocess env wheninclude_partial_messages=True. The CLI then setseager_input_streaming: trueon each tool in the API request payload.The direct Anthropic API accepts (or silently ignores) this extra field, but AWS Bedrock performs strict schema validation and rejects the unknown
eager_input_streamingproperty on tool definitions.Steps to Reproduce
CLAUDE_CODE_USE_BEDROCK=1,ANTHROPIC_BEDROCK_BASE_URL, etc.)ClaudeSDKClientwithinclude_partial_messages=TrueExpected Behavior
include_partial_messages=Trueshould work with Bedrock, or at minimum gracefully degrade (skip FGTS when Bedrock is detected), rather than producing a hard error.Workaround
Set
include_partial_messages=False(losing streaming tool input deltas), or pin to0.1.47.Suggested Fix
The CLI or SDK should detect Bedrock routing and either:
eager_input_streamingon tools when the request is routed through Bedrock, orThis could be done in the CLI's FGTS gate (where it checks the GrowthBook flag / env var) by also checking whether
CLAUDE_CODE_USE_BEDROCKis set, or in the SDK's transport layer by not injecting the env var when Bedrock env vars are present.