[BUG] Bedrock Sonnet API error when connecting to Claude Code: Unexpected value for `anthropic-beta` header

Status Fixed / completed
Maintainer reply None cached
Activity 13 comments · opened Nov 15, 2025 · closed Nov 15, 2025

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?

API Error: 400 {"error":{"message":"{\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\n \"message\":\"Unexpected value(s) tool-examples-2025-10-29 for the anthropic-beta header. Please \n consult our documentation at docs.anthropic.com or try again without the \n header.\"},\"request_id\":\"req_vrtx_011CV9FbW8EZVPrWadzgrzSS\"}. Received Model \n Group=xxxx-bedrock-claude-4-sonnet\nAvailable Model Group \n Fallbacks=None","type":"None","param":"None","code":"400"}}

What Should Happen?

Claude Code should connect to Sonnet via Amazon Bedrock without "Unexpected value(s) for the anthropic-beta header" error.

Error Messages/Logs

API Error: 400 {"error":{"message":"{\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\n    \"message\":\"Unexpected value(s) `tool-examples-2025-10-29` for the `anthropic-beta` header. Please \n    consult our documentation at docs.anthropic.com or try again without the \n    header.\"},\"request_id\":\"req_vrtx_011CV9FbW8EZVPrWadzgrzSS\"}. Received Model \n    Group=xxxx-bedrock-claude-4-sonnet\nAvailable Model Group \n    Fallbacks=None","type":"None","param":"None","code":"400"}}

Steps to Reproduce

  1. Install and configure latest Claude Code.
  2. Connect Sonnet via Amazon Bedrock.
  3. Attempt to run any command that triggers API integration.
  4. Observe 400 error regarding anthropic-beta header value.

Claude Model

_No response_

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

latest

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

I'm using Amazon Bedrock integration with Sonnet model. Error appears with latest Claude Code. Please advise if anthropic-beta header should be set differently or if code update is needed for Bedrock integration. See error details above.

View original on GitHub ↗

13 Comments

github-actions[bot] · 9 months ago

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/11154

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

ilove2git · 9 months ago

it's not identical but error with dfferent header value

gaganvats-05 · 9 months ago

@ilove2git Can you tell how you resolved the issue? I am getting the same error on using litellm routing to vertexAI. 🙇

davidarroyo1234 · 9 months ago
@ilove2git Can you tell how you resolved the issue? I am getting the same error on using litellm routing to vertexAI. 🙇

I ended up deleting all the configs and the cli

https://claudelog.com/faqs/how-to-uninstall-claude-code/

Then installed it again with brew (Im using Mac os) but you should be able to to this in windows or linux too.

matdurand · 9 months ago

I'm still getting this. When I reinstalll it works for one time and then the error is back

tampajohn · 9 months ago

You have to install an old version (I think x.34 works) that doesnt emit this header. There are some other headers that have been popping up (like tmp-something-or-other).

We utilize a proxy we built, and remove these unsupported headers. I believe some of the open source proxies like LiteLLM also allow for removing headers...

tampajohn · 9 months ago

Also as mentioned the "existing issue" addresses the web-search-tool header, not this new header, so this issue should be reopened.

nanxiuzi · 9 months ago
你必须安装一个旧版本(我记得是x.34可以),这样才能不发出这个头部。还有一些其他标题(比如tmp-something-or-other)。 我们使用自己构建的代理,移除这些不支持的头部。我相信一些开源代理,比如LiteLLM,也允许移除报头......

Your method worked, and I rolled back to 2.0.34 without reporting an error

HossameldeinDev · 9 months ago

deleting all files in .claude/statsig solved the issue for me

yigitcan-dh · 9 months ago

Installing 2.0.37 and disabling auto-update with DISABLE_AUTOUPDATER=1 works.

+1 to re-opening this issue. This is the only search result from google when searching for this header.

If anyone has idea where the issue is exactly happening, do drop a comment. Is this happening only when calling Anthropic models through Bedrock / Vertex with version 2.0.4x? Is the problem in Anthropic APIs or Vertex AI or the proxies themselves?

ancoleman · 9 months ago

This issue needs to be REOPENED. The only fix for this right now is @yigitcan-dh suggestion. I'm using the 1m context sonnet on Vertex AI.

ancoleman · 9 months ago

Just as an FYI, if you use CC inside of VS Code, either via the terminal extension or the UI extension, it will auto-update to the latest unless you change your VS Code settings. Additionally, v2.0.46, it seems the main agent conversation works again, but I noticed an issue when you call a sub-task agent; it fails. I asked Claude to troubleshoot, and this header is still included when sub-agents make calls to Vertex AI/Bedrock.

github-actions[bot] · 9 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.