-
Notifications
You must be signed in to change notification settings - Fork 764
Description
Summary
This issue proposes adding AWS Bedrock as an auth path for Claude Code in T3 Code, as a scoped contribution on top of the Claude Code provider work tracked in #991.
This is also related to #759 (AWS Bedrock feature request). A contributor on that issue noted:
When Claude Code support lands this should be covered fully, as Claude Code can natively support Bedrock.
Problem
Many teams and enterprises access Claude via AWS Bedrock rather than a direct Anthropic subscription:
- AWS billing and IAM is the source of truth
- Direct Anthropic API keys are not permitted
- Credentials come from AWS credential chains (instance roles, SSO, named profiles)
Claude Code already supports Bedrock natively via CLAUDE_CODE_USE_BEDROCK=1 — T3 Code just needs to surface the config and pass it through when spawning the claude subprocess.
What's already done (PR #1018)
The frontend scaffolding is complete:
- Contracts:
claudeCodeinProviderKind,ClaudeCodeProviderStartOptions, Claude model catalog - Settings UI: "Claude Code" section with Bedrock toggle, AWS region/profile fields, per-model ARN override fields (Haiku/Sonnet/Opus), reset button
- Model picker: "Claude Code" and "Claude Code Bedrock" show as "Coming soon" — blocked until the server adapter exists
What still needs to be built (server-side)
This is the part that requires team ownership. A ClaudeCodeAdapter needs to be added to apps/server/src/provider/:
- Register
claudeCodeinProviderAdapterRegistryalongside the existingCodexAdapter - Spawn
claude app-serveras a subprocess (analogous to howCodexAdapterspawnscodex) - Set env vars from
ClaudeCodeProviderStartOptions:CLAUDE_CODE_USE_BEDROCK=1AWS_REGIONfromawsRegionAWS_PROFILEfromawsProfile(optional)- Model ARN overrides via Claude Code's
settings.jsonmodelOverridesfield
- Wire subprocess stdin/stdout to the existing provider session protocol
- Handle session lifecycle (start, stop, interrupt) consistently with
CodexAdapter
Once the adapter exists, the picker gating (currently hardcoded to false) can be switched to settings.claudeCodeUseBedrock.
Notes on Bedrock + Claude Code
- Set
CLAUDE_CODE_USE_BEDROCK=1 - Standard AWS credential chain is used automatically (instance roles, SSO, named profiles)
AWS_PROFILEoverrides the active profile- No ARNs required for standard Claude models — ARN fields are optional overrides for inference profiles
modelOverridesin Claude Code'ssettings.jsonmaps model slugs to inference profile ARNs
There are no known ToS restrictions on using Bedrock through a third-party GUI — Bedrock is a standard AWS service, billing flows through AWS, and Anthropic's usage policies apply at the API level.
Draft PR
#1018 — frontend scaffolding only, explicitly excludes the server adapter.