[BUG] Bedrock, 3.7

Resolved 💬 10 comments Opened Mar 18, 2025 by leotac Closed May 27, 2025

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [X] AWS Bedrock
  • [ ] Google Vertex AI
  • Claude CLI version:0.2.48 (Claude Code)
  • Operating System: macOS
  • Terminal: iTerm2

Bug Description

Claude Code doesn't seem to work with Sonnet 3.7.
It does work with Sonnet 3.5, while, I get a 403 error with 3.7.

Steps to Reproduce

  1. This works correctly with 3.5: ANTHROPIC_MODEL='us.anthropic.claude-3-5-sonnet-20241022-v2:0' CLAUDE_CODE_USE_BEDROCK=1 DISABLE_PROMPT_CACHING=1 claude
  2. This does not work: ANTHROPIC_MODEL='us.anthropic.claude-3-7-sonnet-20250219-v1:0' CLAUDE_CODE_USE_BEDROCK=1 DISABLE_PROMPT_CACHING=1 claude and I get: API Error: 403 You don't have access to the model with the specified model ID

However, claude 3.7 is indeed enabled and working in a python shell, as in the following example:

import boto3
bedrock = boto3.client(service_name='bedrock-runtime')
response = bedrock.invoke_model(
                modelId='us.anthropic.claude-3-7-sonnet-20250219-v1:0',
                body=json.dumps(
                    {
                        "anthropic_version": "bedrock-2023-05-31",
                        "max_tokens": 2000,
                        "messages": [
                            {
                                "role": "user",
                                "content": [{"type": "text", "text": "Hello"}],
                            }
                        ],
                    }
                ),
            )
print(json.loads(response.get("body").read())["content"][0]["text"])

That returns:

Hello! How can I assist you today?

View original on GitHub ↗

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