Skip to content

feat: scaffold Claude Code provider with Anthropic/Bedrock config#1018

Draft
dafzthomas wants to merge 4 commits intopingdotgg:mainfrom
dafzthomas:feat/claude-code-bedrock-config
Draft

feat: scaffold Claude Code provider with Anthropic/Bedrock config#1018
dafzthomas wants to merge 4 commits intopingdotgg:mainfrom
dafzthomas:feat/claude-code-bedrock-config

Conversation

@dafzthomas
Copy link

@dafzthomas dafzthomas commented Mar 13, 2026

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 claudeCode as a ProviderKind, 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 ClaudeCodeAdapter implementation 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 ClaudeCodeAdapter is 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
CleanShot 2026-03-13 at 09 52 27
CleanShot 2026-03-13 at 10 15 56

Bedrock enabled
CleanShot 2026-03-13 at 09 52 36
CleanShot 2026-03-13 at 10 04 46

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

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.

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>
@coderabbitai
Copy link

coderabbitai bot commented Mar 13, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b9c56055-48df-450f-b142-6c75eda1be6c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can customize the high-level summary generated by CodeRabbit.

Configure the reviews.high_level_summary_instructions setting to provide custom instructions for generating the high-level summary.

@github-actions github-actions bot added size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 13, 2026
dafzthomas and others added 3 commits March 13, 2026 09:32
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant