Claude Code fails when using Opus 4.7 (`us.anthropic.claude-opus-4-7`) via AWS Bedrock, due to outdated thinking mode API format.

Resolved 💬 2 comments Opened Apr 17, 2026 by VirtualConnectGroup Closed Apr 18, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Environment

  • Claude Code version: Latest
  • Bedrock: enabled (CLAUDE_CODE_USE_BEDROCK=1)
  • Model: us.anthropic.claude-opus-4-7
  • Region: us-east-1
  • AWS Profile: AdministratorAccess-751621644929

Error

API Error: 400 {
  "type": "error",
  "request_id": "req_soxpvqobeelqxmxu2rolpl6yqm2wm652lwqv",
  "error": {
    "type": "invalid_request_error",
    "message": "\"thinking.type.enabled\" is not supported for this model. 
               Use \"thinking.type.adaptive\" and \"output_config.effort\" 
               to control thinking behavior."
  }
}

Root Cause

Claude Code sends thinking parameters using the old API format:

  • Current (fails): thinking.type: "enabled"
  • Required for Opus 4.7: thinking.type: "adaptive" + output_config.effort: "high" | "medium" | "low"

Opus 4.7 via Bedrock expects the new extended thinking API format introduced in January 2025.

Steps to Reproduce

  1. Set environment: ANTHROPIC_DEFAULT_OPUS_MODEL=us.anthropic.claude-opus-4-7
  2. Enable Bedrock: CLAUDE_CODE_USE_BEDROCK=1
  3. In Claude Code, run /model opus
  4. Ask any question (e.g., "What is 2+2?")
  5. Expected: Model switches and responds normally with thinking output
  6. Actual: API 400 error, no response

Affected Models

  • us.anthropic.claude-opus-4-7 (fails)

Working Models

  • claude-sonnet-4-5-20250929-v1:0 (works)
  • claude-haiku-4-5-20251001-v1:0 (works)

Workaround

Until fixed, use Sonnet 4.5 or Haiku 4.5:

/model sonnet
# or
/model haiku

Technical Details

The client should detect Opus 4.7 and use the new API format:

Current (broken):

{
  "thinking": {
    "type": "enabled"
  }
}

Required (Opus 4.7):

{
  "thinking": {
    "type": "adaptive"
  },
  "output_config": {
    "effort": "high"  // or "medium" or "low"
  }
}

Impact

  • Users cannot use Opus 4.7 with extended thinking via Claude Code
  • Regression from prior versions where Opus 4 worked (older API format was supported)
  • Affects all Bedrock deployments with Opus 4.7 configured

What Should Happen?

Expected Behavior

Model switches to Opus 4.7 and responds normally with thinking output visible in the response.

Error Messages/Logs

## Error Message Logs

API Error: 400 {
  "type": "error",
  "request_id": "req_soxpvqobeelqxmxu2rolpl6yqm2wm652lwqv",
  "error": {
    "type": "invalid_request_error",
    "message": ""thinking.type.enabled" is not supported for this model.
               Use "thinking.type.adaptive" and "output_config.effort"
               to control thinking behavior."
  }
}

Steps to Reproduce

Steps to Reproduce

  1. Set environment: ANTHROPIC_DEFAULT_OPUS_MODEL=us.anthropic.claude-opus-4-7
  2. Enable Bedrock: CLAUDE_CODE_USE_BEDROCK=1
  3. In Claude Code, run /model opus
  4. Ask any question (e.g., "What is 2+2?")

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Opus 4.6

Claude Code Version

Claude Code version: 2.1.105

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

First Noticed April 17, 2026

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗