Self-hosted API gateway for Claude Code on Amazon Bedrock. Team API keys, per-user budgets, OIDC SSO, rate limiting, and an admin portal.
There are three common approaches to running Claude Code through Amazon Bedrock. This page compares them so you can pick the right one for your team.
When Claude Code connects to Bedrock directly (CLAUDE_CODE_USE_BEDROCK=1), it detects a Bedrock backend and disables several features client-side — extended thinking, web search, and some tool use capabilities. This is a client-side behavior in Claude Code, not a Bedrock limitation per se.
The workaround is to present a Bedrock-backed service as the Anthropic Messages API (ANTHROPIC_BASE_URL), so Claude Code enables its full feature set while inference still runs through your AWS account.
| Feature | Direct Bedrock | CCAG | LiteLLM |
|---|---|---|---|
| Claude Code Features | |||
| Extended thinking | No (disabled client-side) | Yes | Yes (since v1.63.0) |
Web search (web_search tool) |
No (Bedrock doesn’t implement it) | Yes (built-in: DuckDuckGo, Tavily, Serper, or custom) | Yes (Anthropic passthrough; known bug with multi-turn + custom tools) |
| Claude Code-specific translation | N/A | Yes (model ID mapping, beta header filtering, cache_control sanitization, inference profile resolution) |
Generic passthrough |
| Presents as Anthropic API | No | Yes | Yes |
| Team Management | |||
| Virtual API keys | N/A | Yes (MIT) | Yes (open source) |
| Per-user/team budgets | N/A | Yes (MIT) — notify, throttle, or block | Basic (open source) / advanced (Enterprise) |
| Budget notifications (webhook, SNS, EventBridge) | N/A | Yes (MIT) | Webhook (open source) |
| OIDC SSO | N/A | Yes (MIT) — multi-IDP | Yes (free for ≤5 users, Enterprise beyond) |
| SCIM 2.0 provisioning | N/A | Yes (MIT) | No |
| Admin portal with analytics | N/A | Yes (MIT) — built-in SPA | Yes (open source, advanced analytics Enterprise) |
| Infrastructure | |||
| Multi-account/region endpoint pool | N/A | Yes — sticky user, primary/fallback, round robin | Yes — router-level |
| Per-endpoint throttle tracking | N/A | Yes (rolling window) | Limited |
| Model ID auto-mapping | N/A | Yes (region-aware inference profiles) | Manual config |
| Prompt caching | Bedrock native | Preserved (passes cache_control through) |
Preserved |
| Operations | |||
| Deployment complexity | None | Single container + Postgres | Single container + Postgres (or Redis) |
| Language | N/A | Rust (single binary, ~15 MB) | Python |
| Latency overhead | None | 1–5 ms | 5–20 ms |
| Prometheus metrics | N/A | Yes | Yes (Enterprise) |
| OTLP export | N/A | Yes | No |
| Licensing | |||
| License | N/A | MIT — all features | MIT (core) / Enterprise (team features) |
| Self-hosted | N/A | Yes | Yes |
CLAUDE_CODE_USE_BEDROCK=1)Best when:
Limitations:
Best when:
Limitations:
Best when:
Limitations:
cache_control sanitization, inference profile resolution)CCAG is purpose-built for Claude Code on Bedrock. It translates Anthropic API requests to Bedrock format, handles model ID mapping with region-aware inference profiles, sanitizes cache_control fields Bedrock does not accept, strips Bedrock-specific SSE metadata, and intercepts web search tool use. The gateway is a single Rust binary (~15 MB) with an embedded admin portal.
LiteLLM is a general-purpose LLM proxy written in Python. It supports 100+ models across dozens of providers. Core features (virtual keys, basic budgets, analytics) are open source. Advanced team features (SSO beyond 5 users, audit logs, advanced budget controls) require an Enterprise license.
Direct Bedrock is the simplest option — Claude Code talks to Bedrock directly using the AWS SDK. No proxy, no translation, no operational overhead. But Claude Code detects the Bedrock backend and disables features accordingly.
If you are currently using CLAUDE_CODE_USE_BEDROCK=1 and want to switch:
CLAUDE_CODE_USE_BEDROCK from your environmentANTHROPIC_BASE_URL to your CCAG instance URLANTHROPIC_API_KEY to a virtual key from the CCAG portal (or use OIDC login)# Before (direct Bedrock)
export CLAUDE_CODE_USE_BEDROCK=1
export AWS_PROFILE=my-profile
# After (through CCAG)
export ANTHROPIC_BASE_URL=https://ccag.example.com
export ANTHROPIC_API_KEY=sk-proxy-xxxxx
Claude Code will now use its full feature set. No other configuration changes are needed.
If you are using LiteLLM primarily for Claude Code on Bedrock:
ANTHROPIC_BASE_URL to CCAGCCAG does not replace LiteLLM for multi-vendor routing. If you use LiteLLM for OpenAI, Azure, and other providers, keep it for those. Use CCAG specifically for Claude Code on Bedrock where you need the full feature set.