-
Notifications
You must be signed in to change notification settings - Fork 51
feat(chat): add Claude Code as local chat provider #2668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
87 commits
Select commit
Hold shift + click to select a range
7e466f7
feat(chat): add Claude Code as local chat provider
vibegui 7bbfa6c
fix(chat): fix Claude Code streaming and add model variant selector
vibegui e33ffcd
feat(chat): add Connect Studio and auto-wire MCP for Claude Code
vibegui 2915e7f
fix(chat): fix missing closing brace in model selector JSX
vibegui cd32037
fix(chat): fix type errors from rebase and add Claude Code card to on…
vibegui 2bd9341
fix(chat): unify Claude Code into standard model provider flow
vibegui 6fe7fee
fix(chat): rewrite Connect Studio modal with auth info and disconnect
vibegui 84e38f3
fix: remove unused export on CLAUDE_CODE_MODELS to fix knip
vibegui fea0d46
fix(chat): stream thinking and reasoning from Claude Code
vibegui a903f49
fix(chat): rename MCP server from mesh-studio to deco-studio
vibegui 322c7ed
feat(chat): per-connection cards in Connect Studio + GitHub support
vibegui 6dfcfa1
fix(chat): fix GitHub status detection and compact Connect Studio cards
vibegui 8cbd143
fix: rewrite self-connection URL to localhost in outbound client
vibegui 761b6ac
feat(chat): fix Claude Code MCP integration and add deco mcp-serve CLI
vibegui 9ad625c
feat(chat): Claude Code provider improvements + connection discovery …
vibegui 3ae02de
fix(connections): revert include_tools change, add LIST_SUMMARY tool …
vibegui b01a0d6
feat(chat): expand Decopilot system prompt with full tool coverage
vibegui 39bf475
fix(chat): refine Decopilot prompt — remove workflows, clarify agent …
vibegui ccb637c
fix(chat): remove half-baked features from Decopilot prompt
vibegui 631b2c5
fix(tools): don't expose plugin tools when no plugins are enabled
vibegui c3c44da
feat(chat): rewrite Decopilot prompt — conversational, example-driven
vibegui 68c898f
fix(tools): sync self connection tool snapshot when management MCP bu…
vibegui 93b5fa4
fix(tools): delete CONNECTION_SEARCH_STORE, fix registry schema bug
vibegui 2861fb2
fix(tools): clarify direct tool calls vs CODE_EXECUTION in MCP instru…
vibegui 10fe05c
feat(tools): expand MCP instructions with full tool catalog and explo…
vibegui 1f61f52
feat(tools): add agent composition guidance, automation patterns, and…
vibegui 6b9c916
fix(chat): use correct Claude Agent SDK model IDs (drop -max suffix)
vibegui 66fda44
fix(tools): delete CONNECTION_SEARCH_STORE, fix registry schema bug
vibegui 7996e98
fix(tools): clarify direct tool calls vs CODE_EXECUTION in MCP instru…
vibegui 0e1abea
fix(tools): always show auth card after install, fix auth detection f…
vibegui 63882c0
feat(chat): emit auth cards in Claude Code path after CONNECTION_AUTH…
vibegui c5c5058
fix(chat): prevent duplicate reasoning/thinking in Claude Code stream
vibegui f1f5ea6
fix(chat): detect CONNECTION_AUTHENTICATE via tool_progress, not tool…
vibegui d28a805
fix(chat): always emit auth cards for unhealthy connections, fix text…
vibegui d93c0fc
fix(chat): revert broken auth card hack, leave TODO for MCP elicitation
vibegui 4effad3
feat(chat): implement auth cards via MCP elicitation protocol
vibegui fa576fd
fix(chat): use data-connection-auth part instead of MCP elicitation
vibegui 733e37c
fix(chat): always check for unhealthy connections after Claude Code s…
vibegui c97a6e2
fix(chat): skip self connection when emitting auth cards
vibegui 6bc1792
fix(chat): detect turn boundaries from stream_event content_block_start
vibegui 82d3454
fix(chat): persist OAuth token after inline auth card authentication
vibegui 7fedfc2
fix(chat): simplify auth card token persistence, add error logging
vibegui b8d0021
fix(connections): re-fetch tools after OAuth token save
vibegui 8174d41
fix(connections): pass access token when re-fetching tools after OAuth
vibegui 8694e17
fix(chat): check live auth status on mount, show connected state on r…
vibegui b38bd97
fix(chat): tell model auth card appears below, never say above
vibegui aa0f36e
fix(chat): only show auth cards for connections without tokens
vibegui ba8aa08
chore: remove GitHub CLI connection from Connect Studio
vibegui 51f877d
chore: remove unused isClaudeCodeAvailable export (knip)
vibegui 055d39c
fix(chat): unify Claude Code connection into AI provider card
vibegui 67ba903
fix: address PR review feedback (Cubic + internal review)
vibegui 6b76646
refactor: simplify review fixes after /simplify pass
vibegui 9fa5008
fix(connections): inline API key auth for MCPs that need tokens (e.g.…
vibegui f721463
fix(connections): default to token auth when no oauth_config exists
vibegui a7e82df
fix(connections): detect MCP_CONFIGURATION for auth, fix status and c…
vibegui 75010dd
fix(chat): fall back to API key input when OAuth discovery fails
vibegui 688d617
fix(connections): simplify auth detection — show Needs API Key when t…
vibegui 0b2afc4
fix(connections): only show Needs API Key for connections with config…
vibegui 490c173
fix(connections): persist needs_auth flag in metadata for reliable UI…
vibegui c1d572a
fix(connections): set needs_auth in create call, not separate update
vibegui a24cd68
fix(connections): show Needs API Key in detail page sidebar
vibegui b6d9ab5
fix(connections): check connection_token before showing Needs API Key…
vibegui 7694889
fix(connections): address cubic-dev review feedback
vibegui 696ab9a
chore: revert unrelated schema.ts change from rebase conflict
vibegui de800e9
chore: remove out-of-scope changes to slim down PR
vibegui 0e18062
fix: AI provider grid layout, proxy cleanup, and connect-studio relia…
vibegui 1064993
fix(chat): only show auth cards when connection auth was attempted
vibegui 4b212d5
fix(chat): emit auth cards when connections are created, not just whe…
vibegui f9ca1c1
fix(chat): also trigger auth cards on CONNECTION_INSTALL tool calls
vibegui eb34fec
fix(chat): show auth card for tokenless connections regardless of health
vibegui d360821
fix(chat): use timestamp-based auth card detection instead of SDK events
vibegui d177999
feat(chat): plan mode UI — fix CLS, purple styling, plan rendering wi…
vibegui 08475ba
fix(chat): persist tool call parts so they survive after streaming ends
vibegui 0e68876
fix(chat): render reasoning blocks inline where they occur in message…
vibegui 290538c
feat(chat): add vision support for Claude Code models + inline reasoning
vibegui 73113c8
fix(chat): correct token counting, persist reasoning, track tool call…
vibegui 33e38b5
fix(chat): inject agent instructions into Claude Code system prompt
vibegui 3729c67
fix(chat): remove unused tool-approval-registry (fixes knip CI)
vibegui baf0e99
fix: update conductor run script for local mode
vibegui c43e060
fix(chat): restore main's connection-sidebar, remove dead modal (fixe…
vibegui e4a033e
fix(chat): revert connections.tsx and modal changes — already shipped…
vibegui 9b3642e
refactor(chat): deduplicate system prompts, merge auth tools
vibegui 3e8d4ef
fix(chat): add missing cn import in no-llm-binding-empty-state
vibegui 3489be3
fix(mcp-apps): timeout resource load and self-contain MCPAppRenderer …
vibegui 702576c
fix(tool-detail): uncap iframe height so MCP app content is not cropped
vibegui 51384a3
fix(mcp-apps): observe iframe content height when app doesn't report …
vibegui a40dc40
revert: undo mcp-apps UI fixes (applied to abuja instead)
vibegui File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,40 @@ import type { ModelListCache } from "./model-list-cache"; | |
| import type { MeshProvider, ModelInfo, OpenRouterAPIModel } from "./types"; | ||
| import { PROVIDERS } from "./registry"; | ||
|
|
||
| /** Static model list for the Claude Code local provider. */ | ||
| const CLAUDE_CODE_MODEL_LIST: ModelInfo[] = [ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Keep the Claude Code model variants in one shared source of truth; this duplicate list can drift from the runtime SDK mapping. Prompt for AI agents |
||
| { | ||
| providerId: "claude-code", | ||
| modelId: "claude-code:opus", | ||
| title: "Claude Code: Opus", | ||
| description: "Most capable model via local Claude Code CLI (1M context)", | ||
| logo: null, | ||
| capabilities: ["text", "vision"] as ModelCapability[], | ||
| limits: { contextWindow: 1_000_000, maxOutputTokens: 32_768 }, | ||
| costs: null, | ||
| }, | ||
| { | ||
| providerId: "claude-code", | ||
| modelId: "claude-code:sonnet", | ||
| title: "Claude Code: Sonnet", | ||
| description: "Fast, capable model via local Claude Code CLI (1M context)", | ||
| logo: null, | ||
| capabilities: ["text", "vision"] as ModelCapability[], | ||
| limits: { contextWindow: 1_000_000, maxOutputTokens: 32_768 }, | ||
| costs: null, | ||
| }, | ||
| { | ||
| providerId: "claude-code", | ||
| modelId: "claude-code:haiku", | ||
| title: "Claude Code: Haiku", | ||
| description: "Fastest, most affordable model via local Claude Code CLI", | ||
| logo: null, | ||
| capabilities: ["text", "vision"] as ModelCapability[], | ||
| limits: { contextWindow: 200_000, maxOutputTokens: 32_768 }, | ||
| costs: null, | ||
| }, | ||
| ]; | ||
|
|
||
| // Sentinel org ID for the shared OpenRouter metadata cache (not org-specific) | ||
| const OR_INDEX_ORG_ID = "_global"; | ||
|
|
||
|
|
@@ -134,6 +168,11 @@ export class AIProviderFactory { | |
| ); | ||
| const providerId = keyInfo.providerId; | ||
|
|
||
| // Claude Code uses the local CLI — return static model list | ||
| if (providerId === "claude-code") { | ||
| return CLAUDE_CODE_MODEL_LIST; | ||
| } | ||
|
|
||
| if (this.cache) { | ||
| const cached = await this.cache.get(organizationId, providerId); | ||
| if (cached) return cached; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.