[BUG] API Error 400: data retention mode 'default' is not available for this model via AWS Bedrock
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?
When using Claude Code connected through AWS Bedrock, every prompt fails with:
API Error: 400 data retention mode 'default' is not available for this model
This appears similar to other Bedrock compatibility issues where Claude Code sends API parameters (e.g., thinking.type.enabled, output_config.effort, beta flags) that the Bedrock endpoint does not recognize for certain model configurations.
The error occurs immediately on any message (e.g., hi), making Claude Code completely unusable via Bedrock.
<img width="1614" height="916" alt="Image" src="https://github.com/user-attachments/assets/4e16d6ba-3268-49db-b060-86afa0830600" />
What Should Happen?
Claude Code should either:
- Not send the
data_retentionparameter when the model/Bedrock configuration doesn't support it, OR - Gracefully handle the error and suggest a workaround
Expected: Normal conversation flow without 400 errors.
Error Messages/Logs
API Error: 400 data retention mode 'default' is not available for this model
Steps to Reproduce
- Configure Claude Code to use AWS Bedrock (
export CLAUDE_CODE_USE_BEDROCK=1) - Run
claudeand send any message, e.g.,hi - Error:
⏺ API Error: 400 data retention mode 'default' is not available for this model
Claude Model
Model: global.anthropic.claude-fable-5
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.170
Platform
AWS Bedrock
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗