litellm - 💡(How to fix) Fix Add native provider for Claude Platform on AWS (AnthropicAWS)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

  • Auth precedence: workspaceId arg > ANTHROPIC_AWS_WORKSPACE_ID env > error

Root Cause

A naive workaround (custom auth hook that SigV4-signs after the body is mutated) is brittle because LiteLLM's drop_params / additional_drop_params hooks rewrite the request body, invalidating the signature unless signing happens last.

Fix Action

Fix / Workaround

A naive workaround (custom auth hook that SigV4-signs after the body is mutated) is brittle because LiteLLM's drop_params / additional_drop_params hooks rewrite the request body, invalidating the signature unless signing happens last.

RAW_BUFFERClick to expand / collapse

Background

Anthropic GA'd Claude Platform on AWS on 2026-05-11:

It exposes the full Anthropic Messages API on an AWS-hosted endpoint with:

  • AWS IAM auth (SigV4 signing) or API key via ANTHROPIC_AWS_API_KEY
  • Required x-anthropic-aws-workspace-id header per request (workspace pins to a single AWS region)
  • Default base URL pattern: https://gateway.{region}.api.aws
  • Day-one feature parity with the public Anthropic API (prompt caching, batch, Files, Skills, MCP connector, Advisor)

Anthropic's official SDKs ship first-class support across Python, TypeScript, Go, Java, C#, PHP, Ruby — e.g. from anthropic import AnthropicAWS in Python — and Claude Code reads ANTHROPIC_AWS_WORKSPACE_ID / ANTHROPIC_AWS_BASE_URL env vars natively.

Current LiteLLM state

LiteLLM today supports Anthropic models via three transports:

  • anthropic/ — direct Anthropic public API
  • bedrock/ — AWS Bedrock
  • vertex_ai/ — GCP Vertex partner-model

There is no provider for Claude Platform on AWS. The provider list and the Claude Code compatibility matrix (https://docs.litellm.ai/docs/claude_code_compatibility) make no mention of it.

A naive workaround (custom auth hook that SigV4-signs after the body is mutated) is brittle because LiteLLM's drop_params / additional_drop_params hooks rewrite the request body, invalidating the signature unless signing happens last.

Proposed

Add a first-class provider:

  • Prefix: anthropic_aws/ (or claude_platform_aws/)
  • Auth precedence: workspaceId arg > ANTHROPIC_AWS_WORKSPACE_ID env > error
  • Credential resolution: boto3 default credential chain (SSO, IAM role, ~/.aws/credentials) for SigV4 signing, falling back to ANTHROPIC_AWS_API_KEY env var if set
  • Base URL: explicit override > ANTHROPIC_AWS_BASE_URL env > https://gateway.{region}.api.aws
  • Body mutation (drop_params etc.) must complete before SigV4 signing
  • Pass-through for anthropic-beta headers
  • Listed in https://docs.litellm.ai/docs/claude_code_compatibility once shipped

Concrete use case

Mid-size org running ~$1k+/month dev-tooling spend on LiteLLM-routed CI reviewer + code-audit bots, currently split between direct Anthropic and Bedrock. The split exists today because drop_params is not honored on Bedrock's /v1/messages passthrough route (a separate known bug) — Platform-on-AWS would resolve both: single transport, AWS-commit consolidation, day-one feature parity.

Happy to test a PR end-to-end against our production gateway once available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - 💡(How to fix) Fix Add native provider for Claude Platform on AWS (AnthropicAWS)