Skip to content

eager_input_streaming breaks Bedrock deployments: "Extra inputs are not permitted" #694

Description

@anujhydrabadi

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

  1. Configure Bedrock deployment (CLAUDE_CODE_USE_BEDROCK=1, ANTHROPIC_BEDROCK_BASE_URL, etc.)
  2. Create a ClaudeSDKClient with include_partial_messages=True
  3. 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:

  1. Skip setting eager_input_streaming on tools when the request is routed through Bedrock, or
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions