📌 The Problem
Some users hit errors like these while running Claude Code:400 ValidationExceptionExtra inputs are not permitted- Errors mentioning
cache_control.scope
This guide applies only to requests going through the AWS Claude (Bedrock) official channel. The native Anthropic API channel supports these beta parameters, so none of the changes below are needed there.
✅ Solution (Recommended)
Turn off Claude Code’s experimental beta features.Option 1: Edit settings.json (recommended)
Add the environment variable to your Claude Codesettings.json:
Option 2: Temporary (current terminal session)
Run this in your terminal:Option 3: Permanent (recommended)
Write the variable into your shell config, depending on your environment.Mac / Linux (bash)
Mac (zsh, the default)
Windows (PowerShell)
🔍 Why This Happens (for the technically inclined)
Claude Code enables a number of beta features by default, such as:cache_control- extended
toolfields - extra parameters like
scope
- 👉 are supported by the native Anthropic API
- 👉 but are rejected as invalid fields by AWS Bedrock Claude → HTTP 400
- ✔ requests fall back to the standard structure
- ✔ full compatibility with AWS Claude
🚨 When You Need This
If any of the following describes you, we strongly recommend setting this variable:- You use Claude Code with AWS Bedrock Claude
- You go through a third-party proxy (an API gateway or forwarding service)
- You see 400 / ValidationException errors
- Claude official docs — environment variables:
code.claude.com/docs/en/env-vars - Related issue:
github.com/anthropics/claude-code/issues/21676
🔎 Checking Which Groups a Model Belongs To
Not sure which groups a given model is available in? Look it up on the model pricing page: Open the APIYI model pricing page and search for the model name to see its available groups. For example, the ClaudeCode group supports the latest Claude model series, plus separately configuredglm-5.1 and qwen3.7-max.
💡 Still Not Working?
If the error persists after applying the fix, check that:- The environment variable actually took effect (run
echo $CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETASand confirm it prints1) - You really are on the AWS Claude (Bedrock) channel
- You restarted your terminal or IDE after changing the config
📞 Support
If you’re still stuck, send us the following so we can dig deeper:- A screenshot of the error
- The request log (Request ID)
- The model name you’re using