feat: scaffold Claude Code provider with Anthropic/Bedrock config#1018
feat: scaffold Claude Code provider with Anthropic/Bedrock config#1018dafzthomas wants to merge 4 commits intopingdotgg:mainfrom
Conversation
Adds claudeCode as a second ProviderKind alongside codex. The provider
appears in the model picker only once configured in Settings (binary path
set, or AWS Bedrock selected as the API provider). Bedrock is explicitly
a separate auth path from the Anthropic subscription — users choose
between the two in a radio group, with AWS region/profile fields shown
only when Bedrock is selected.
Changes:
- contracts: add claudeCode to ProviderKind, ClaudeCodeProviderStartOptions
with apiProvider ("anthropic"|"bedrock"), awsRegion, awsProfile
- contracts/model: add claudeCode model catalog, defaults, aliases, reasoning effort
- appSettings: add claudeCodeBinaryPath, claudeCodeProvider, claudeCodeAwsRegion,
claudeCodeAwsProfile, customClaudeCodeModels
- session-logic: resolveProviderOptions() derives claudeCode availability from settings
- ProviderModelPicker: consume resolveProviderOptions; show "Configure in Settings"
hint instead of "Coming soon" for unconfigured claudeCode
- settings page: Claude Code section with binary path, provider radio group,
and conditional Bedrock fields (region, profile)
This is a draft — no server-side adapter yet. Refs pingdotgg#991 and pingdotgg#759.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can customize the high-level summary generated by CodeRabbit.Configure the |
Remove the Anthropic subscription option — the team is already working on
Claude Code support via the direct API. This PR focuses solely on AWS
Bedrock as an auth path for Claude Code.
- Drop apiProvider ("anthropic"|"bedrock") from ClaudeCodeProviderStartOptions
- Replace claudeCodeProvider setting with a single claudeCodeUseBedrock boolean
- Replace radio group UI with a Switch (consistent with existing settings patterns)
- Bedrock fields (awsRegion, awsProfile) still shown conditionally when enabled
- claudeCodeConfigured now: binary path set OR useBedrock toggled on
Refs pingdotgg#1017, pingdotgg#991, pingdotgg#759
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- ChatView: replace removed AVAILABLE_PROVIDER_OPTIONS export with resolveProviderOptions(claudeCodeConfigured); derive claudeCodeConfigured from settings (binaryPath or useBedrock flag) - ChatView.logic: add claudeCode to getCustomModelOptionsByProvider so Record<ProviderKind, ...> is satisfied now that ProviderKind includes claudeCode - Add per-model Bedrock ARN overrides (Haiku, Sonnet, Opus) to contracts, appSettings, and settings UI — shown conditionally inside the Bedrock section - ARN inputs use font-mono class for readability Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- shared/model: add claudeCode to MODEL_SLUG_SET_BY_PROVIDER so resolveModelSlug works correctly for claudeCode provider - session-logic: extract isAvailableProviderOption type guard as an export so ChatView and ProviderModelPicker can share it (narrows ProviderPickerKind to ProviderKind after filtering available options) - ProviderModelPicker: import isAvailableProviderOption from session-logic instead of re-declaring it locally - ChatView: import isAvailableProviderOption from session-logic; use it as the filter predicate for searchableModelOptions to correctly narrow types - ChatView.logic: keep claudeCode in getCustomModelOptionsByProvider return value (required by Record<ProviderKind,...>) but pass empty custom models since we're not adding a custom model UI for claudeCode in this PR - appSettings: restore BUILT_IN_MODEL_SLUGS_BY_PROVIDER claudeCode entry (required by Record<ProviderKind,...>); remove customClaudeCodeModels - settings: remove Claude Code from Models section; Bedrock-only scope - server test: update LegacyProviderRuntimeEvent.provider from "codex" literal to ProviderKind to satisfy the widened union type Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
What Changed
Added a "Claude Code" settings section with AWS Bedrock configuration fields: a toggle, AWS region/profile inputs, and per-model inference profile ARN overrides (Haiku, Sonnet, Opus). "Claude Code" and "Claude Code Bedrock" appear in the model picker as "Coming soon".
The contracts layer gains
claudeCodeas aProviderKind,ClaudeCodeProviderStartOptions, and a Claude model catalog (claude-sonnet-4-6,claude-opus-4-6,claude-haiku-4-5).Why
Claude Code natively supports AWS Bedrock via
CLAUDE_CODE_USE_BEDROCK=1. This surfaces the config T3 Code would need to pass through when spawning the subprocess — relevant to teams that use AWS billing/IAM rather than a direct Anthropic subscription (#759).Relationship to #179
The team's own
ClaudeCodeAdapterimplementation in #179 likely supersedes the server-side work this PR was pointing toward. Happy to close this if that's the right call.One question worth raising: the Bedrock path may have different considerations than the direct Anthropic subscription path. Bedrock is a standard AWS service — billing flows through AWS, credentials come from the user's own IAM/credential chain, and there are no known ToS restrictions on using it through a third-party GUI. If the team is cautious about shipping the direct Claude Code subscription path to third parties, a Bedrock-only implementation might be a cleaner first step. Worth discussing before closing.
What's not included
The server-side
ClaudeCodeAdapteris intentionally excluded — see #179 for the team's implementation. The picker entries are hardcoded to "Coming soon" until an adapter is wired up.UI Changes
Bedrock disabled


Bedrock enabled


Checklist
Finally — great work on what's been built so far. I've been using T3 Code daily with my personal Codex subscription and it's genuinely excellent. Thanks for putting this together.
Related: #991, #759, #1017, #179
🤖 Generated with Claude Code
I've realised how funny that "Generated with.." is just after a thank you message. What a time to be alive.