[BUG] Claude Code with Vertex AI (Unexpected value(s) `prompt-caching-scope-2026-01-05`)
Resolved 💬 18 comments Opened Jan 29, 2026 by matanbaruch Closed Jan 29, 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?
Hey,
I got this error message with latest version of Claude Code with using Vertex AI (Via LiteLLM)
What Should Happen?
Claude Code should successfully continue. (It works on Foundry AI - Azure via LiteLLM)
Error Messages/Logs
⎿ API Error: 400 {"error":{"message":"{\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"Unexpected value(s) `prompt-caching-scope-2026-01-05` for the
`anthropic-beta` header. Please consult our documentation at docs.anthropic.com or try again without the header.\"},\"request_id\":\"req_vrtx_0xxxxxxxxxxxxxxxx\"}. Received
Model Group=claude-opus-4-5\nAvailable Model Group Fallbacks=None","type":"None","param":"None","code":"400"}}
Steps to Reproduce
Install LiteLLM, Configure Vertex AI Anthropic models. Use this models in Claude Code
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
v2.1.22
Claude Code Version
v2.1.23
Platform
Google Vertex AI
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
18 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
downgrade to 2.1.22:
and disabling autoupdater
worked for me as a temporary fix
Thanks so much for reporting. We just shipped v2.1.25 with the fix, and you should be able to avoid the error now (set
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1). So sorry for the friction, closing now but please let me know if you're still seeing any issues.~~I am still getting this failure for
v2.1.25it works for me forv2.1.22~~Edit: sorry it works I missed the (set CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1)
Apologies, this is not fixed just yet.
I use the Claude Extension through VScode on my MacBook Pro and I see it was updated to v2.1.25, and I am still getting the same error:
API Error: 400 {"error":{"message":"{"type":"error","error":{"type":"invalid_request_error","message":"Unexpected value(s) prompt-caching-scope-2026-01-05 for the anthropic-beta header. Please consult our documentation at docs.anthropic.com or try again without the header."},"request_id":"req_vrtx_011CXdGjEHsMBfTPLuNzs9Nb"}. Received Model Group=claude-4.5-opus\nAvailable Model Group Fallbacks=None","type":"None","param":"None","code":"400"}}
...despite the setting:
"claudeCode.enablePromptCaching": false,
"claudeCode.useAnthropicBetaHeaders": false
@JPeetz with VSCode, can you try adding the env var to your
settings.json? Instructions here.Alternatively, you can also try setting this:
with claude code cli this is still not working as of version 2.1.27
Same here with version 2.1.27
Thanks for the reports. Seems like we shipped a regression with a different beta header, looking and will keep you all updated on the fix.
BTW: The 2.1.25 version is working for me.
claude install --force 2.1.25@stevo-knievo can you confirm you saw the same error?
@zkl94 and @stevo-knievo Would be helpful to know your setups. Specifically:
claude loginor/loginin the past with a claude.ai (pro/max/enterprise) account?@szwang
curlcommand through litellm@zkl94 Thanks so much! Super helpful.
1.80or earlier, does it work?ANTHROPIC_API_KEY=xx claudewhen running with litellm? Or try/logoutand logging in with a Console account.I got this message:
"message":"Unexpected value(s) prompt-caching-scope-2026-01-05 for the anthropic-beta header. Please consult our documentation at [docs.anthropic.com](http://docs.anthropic.com/) or try again without the header."Claude Code v2.1.29
Sorry for the confusion. I tested
2.1.29but had to downgrade again.2.1.25actually does not work for me either, while2.1.22does.Apologies again!
In case this helps someone:
There were some leftover credentials in my local keyring:
Run this to find
security find-generic-password -s "Claude Code-credentials"It located an entry from back when I first subscribed.
Remove it with
security delete-generic-password -s "Claude Code-credentials"You can also use the KeyChain access app to do the same (find it, remove it).
Launch Claude again. Note that it adds a new entry on launch, but it will have a new date and the beta-headers problem was gone for me.
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.