[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_
6 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
The fix that worked to get Fable running is this:
But that breaks all the other models, so...
EDIT: So this seem to be by design: https://aws.amazon.com/blogs/aws/anthropic-claude-fable-5-on-aws-mythos-class-capabilities-with-built-in-safeguards-now-available/
@jwhitcraft How does enabling the data retention policy for Fable break other models? What's exactly breaking?
This one looks like a different root cause from the usual Bedrock "Claude Code sends a field Bedrock rejects" 400s (e.g.
output_config.effort/eager_input_streaming→Extra inputs are not permitted). Those are schema rejections; this error is a model-specific data-retention requirement, and it lines up with the model in the report being a Fable 5 / Mythos-class model.Per AWS's own launch announcement, these models can't be invoked under the default retention mode until you explicitly opt in:
— https://aws.amazon.com/blogs/aws/anthropic-claude-fable-5-on-aws-mythos-class-capabilities-with-built-in-safeguards-now-available/ (see also the data-retention note: https://support.claude.com/en/articles/15425996-data-retention-practices-for-mythos-class-models )
So
data retention mode 'default' is not available for this modelis Bedrock rejecting a default-retention request for a model that requires the opt-in — not (only) Claude Code sending an unsupported param.hifailing immediately fits, because the rejection happens at invoke time regardless of prompt.Important caveat before opting in: that opt-in means Bedrock retains and shares your inference data (~30 days, for safety review), and per AWS "your data will leave AWS's data and security boundary." If you're on Bedrock specifically for ZDR / compliance reasons, do not just flip it on.
Side-effect-free workaround if you don't specifically need Fable 5: pin Claude Code to a model that works under default retention (Sonnet 4.6 / Opus 4.x) and confirm whether the error disappears — that also isolates it to the model:
If a non-Fable model works and Fable 5 doesn't, that confirms the retention-opt-in cause rather than a generic param issue.
(I haven't seen Claude Code's internal request building, so I can't say exactly what it sends on the wire — but the AWS-side requirement above fully accounts for the
defaultrejection, and the model card / announcement are the authority here. One genuinely actionable ask for the maintainers would be a clearer error that points to the Data Retention API opt-in when a Mythos-class model is selected, instead of a bare 400.)@darshil the other models on bedrock-runtime (didn't test mantle) just stated failing with a 500 sever side error.
Confirming @yurukusa's root cause from the AWS-side docs, and answering the "why does it break other models" thread from @jwhitcraft / @darshil, since that part is still open.
The Bedrock data-retention docs spell out the mechanism. Your effective retention mode is
first non-inherit value of (project → account → model default), and each model declares anallowed_modeslist. Fable 5 and Mythos 5 are the only models whoseallowed_modesis exactly["provider_data_share"]— so under the default/inherit mode they resolve tostatus: "unavailable"and invoke is blocked with the exact string in this issue:This model is not available under data retention mode 'default'.It's a policy gate at invoke time, which is whyhifails instantly. Not a malformed request.On @jwhitcraft's account-wide PUT breaking the other models: per the docs that shouldn't happen for models whose
allowed_modesalready includesprovider_data_share(e.g. Opus 4.8 is["default", "provider_data_share"]and should keep working, data retained by AWS only). A 500 rather than a 400/unavailable smells like either eventual consistency after the PUT or a region mismatch — the PUT hitus-east-2control plane, so worth confirming the models you're invoking resolve their retention in the same region.The cleaner fix that sidesteps the whole "flip it account-wide" problem is to scope the opt-in to a project instead of the account, and only route Fable 5 through that project:
Everything outside that project keeps the account default, so your other models are untouched. The docs' "mixed-model projects" section confirms that even within a
provider_data_shareproject, a model only shares data if its ownallowed_modesrequires it — Opus/Sonnet traffic in that project stays AWS-boundary-only.Verify before/after with the models endpoint — you want
status: available:Worth repeating @yurukusa's caveat:
provider_data_sharemeans prompts/completions are retained and shared with Anthropic (~30 days, safety review) and leave AWS's boundary. If you're on Bedrock specifically for ZDR/compliance, don't flip it — pin a non-Fable model instead, or ask your AWS account manager about per-account ZDR approval for Fable (that adds"none"to the model'sallowed_modes).The genuinely actionable CLI ask stands: when Bedrock returns
data retention mode '<x>' is not available for this model, Claude Code could surface the Data Retention API opt-in remedy instead of a bare 400.