feat: add Claude Code adapter with Bedrock support#2
Conversation
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
- drop `cursor` from provider/model contracts and runtime validation - remove Cursor-specific UI options, settings, and model normalization paths - update server/web tests and fixtures to cover Codex + Claude Code only
- Include Claude Code in available provider options in the picker - Add Cursor as a disabled placeholder provider with icon mapping - Update session-logic tests to assert provider availability and ordering
- Map Claude reasoning deltas, streamed tool input JSON, and tool results into runtime item/content events - Classify Agent/read-only Claude tools for correct approval request types - Add Claude CLI provider health checks and auth-status parsing coverage Co-authored-by: codex <codex@users.noreply.github.com>
- Reject turn starts that request a provider switch from the thread-bound provider - Reject models that do not belong to the thread provider and log start failures - Add shared `inferProviderForModel` helper and tests; reuse it in web store inference
- Use thread provider as the preferred provider during command handling - Update `ProviderModelPicker` to show direct model choices when provider is locked - Add browser tests for locked/unlocked picker behavior and widen browser test glob
- derive `defaultModel` from `DEFAULT_MODEL_BY_PROVIDER` using harness provider - replace hardcoded `gpt-5-codex` in seeded project and thread setup
…ingdotgg#1146) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- keep Ultrathink frame styling without extra wrapper padding toggles - drop the inline Ultrathink badge row in ChatView - clean up stray whitespace in ProviderService test
- support `claudeAgent.fastMode` in shared/contracts, provider dispatch, and Claude adapter SDK settings - gate fast mode to supported Claude models and restart/forward options in orchestration - unify draft/UI fast mode state (not Codex-only) and add browser/server tests plus SDK probe
- Add dedicated Claude traits picker with model-aware effort, thinking, and fast mode controls - Treat Claude Ultrathink as a prompt keyword instead of session effort - Normalize provider model options in composer flow and adapter, with tests for unsupported effort/thinking cases
…esolution Merge origin/codething/648ca884-claude into main, resolving conflicts in: - apps/web/src/appSettings.ts (keep both textGenerationModel and customClaudeModels) - apps/web/src/components/ChatView.tsx (take PR's restructured compositor layout) - apps/web/src/composerDraftStore.ts (take PR's modelOptions migration, restore prompt/terminalContexts processing) - packages/contracts/src/model.ts (keep both git text generation model and backward compat exports) Additional fixes on top of the merge: - Add terminalContexts to browser test mock drafts (ClaudeTraitsPicker, CodexTraitsPicker, CompactComposerControlsMenu) - Restore ensureInlineTerminalContextPlaceholders call in draft deserialization - Add terminalContexts and onRemoveTerminalContext props to ComposerPromptEditor - Use DEFAULT_MODEL_BY_PROVIDER[selectedProvider] instead of hardcoded .codex - Persist provider/model before clearComposerDraftContent to prevent reset Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add useBedrock, awsRegion, awsProfile, and per-tier ARN override fields to ClaudeProviderStartOptions contract - Add resolveBedrockModel() and buildBedrockEnv() helpers to ClaudeAdapter for model slug → ARN resolution and env injection - Store bedrockOptions in session context so sendTurn can resolve models without receiving providerOptions on each turn - Wire Bedrock settings from appSettings through providerOptions dispatch in ChatView - Add Bedrock configuration section to settings UI with toggle, region, profile, and per-tier ARN override inputs - Extend desktop syncShellEnvironment to read AWS/Bedrock env vars from login shell (AWS_REGION, AWS_PROFILE, credentials, etc.) - Add tests for AWS env var sync in desktop Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Display an amber "Bedrock" badge next to the model label in the provider/model picker when Bedrock is enabled and Claude is the active provider. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
💡 Codex ReviewIn t3code/apps/server/src/orchestration/Layers/ProviderCommandReactor.ts Lines 300 to 303 in e7f28c2 Claude session restarts for model-option changes only happen when ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
- Extend syncShellEnvironment to read ANTHROPIC_MODEL, ANTHROPIC_DEFAULT_*_MODEL, ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION, CLAUDE_CODE_MAX_OUTPUT_TOKENS, and MAX_THINKING_TOKENS from login shell - Detect CLAUDE_CODE_USE_BEDROCK=1 in server process.env and build BedrockOptions from env vars when UI settings haven't been configured - Add BedrockEnvironment to ServerConfig contract so the web UI can detect env-based Bedrock and show the appropriate badge/banner - Show "Bedrock detected from environment" banner in settings when shell vars are present, with option to override via custom settings - Show Bedrock badge in model picker when detected from either settings or environment Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
codething/648ca884-claude) — the Claude Code adapter using@anthropic-ai/claude-agent-sdkWhat's included
From upstream PR pingdotgg#179:
claudeAgentprovider withClaudeAdapter.tsusing the Agent SDKMerge conflict resolution (4 files):
appSettings.ts— kept bothtextGenerationModelandcustomClaudeModelsChatView.tsx— took PR's restructured compositor layoutcomposerDraftStore.ts— took PR'smodelOptionsmigration, restoredprompt/terminalContextsprocessingcontracts/model.ts— kept bothDEFAULT_GIT_TEXT_GENERATION_MODELand backward compat exportsPost-merge fixes:
terminalContextsto browser test mock draftsensureInlineTerminalContextPlaceholdersin draft deserializationterminalContexts/onRemoveTerminalContextprops toComposerPromptEditorDEFAULT_MODEL_BY_PROVIDER.codex→DEFAULT_MODEL_BY_PROVIDER[selectedProvider]clearComposerDraftContentto prevent resetBedrock support layer:
useBedrock,awsRegion,awsProfile, and per-tier ARN override fields toClaudeProviderStartOptionsresolveBedrockModel()for slug → ARN mapping andbuildBedrockEnv()for env injection inClaudeAdapter.tsbedrockOptionsin session context forsendTurnmodel resolutionproviderOptionsForDispatchinChatView.tsxsyncShellEnvironmentto read AWS/Bedrock env vars from login shellTest plan
bun run typecheck— 7/7 packages passbun run test— all packages pass (112+ test files, 505+ tests)🤖 Generated with Claude Code