[BUG] Bedrock Sonnet API error when connecting to Claude Code: Unexpected value for `anthropic-beta` header
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
- Install and configure latest Claude Code.
- Connect Sonnet via Amazon Bedrock.
- Attempt to run any command that triggers API integration.
- Observe 400 error regarding
anthropic-betaheader 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.
13 Comments
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
it's not identical but error with dfferent header value
@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.
I'm still getting this. When I reinstalll it works for one time and then the error is back
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...
Also as mentioned the "existing issue" addresses the web-search-tool header, not this new header, so this issue should be reopened.
Your method worked, and I rolled back to 2.0.34 without reporting an error
deleting all files in
.claude/statsigsolved the issue for meInstalling
2.0.37and disabling auto-update withDISABLE_AUTOUPDATER=1works.+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?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.
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.
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.