Skip to content

[BUG] API Error 400: data retention mode 'default' is not available for this model via AWS Bedrock #66594

Description

@L4Walk

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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.

Image

What Should Happen?

Claude Code should either:

  • Not send the data_retention parameter 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

  1. Configure Claude Code to use AWS Bedrock (export CLAUDE_CODE_USE_BEDROCK=1)
  2. Run claude and send any message, e.g., hi
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    api:bedrockIssue relates to AWS BedrockbugSomething isn't workinghas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions