Skip to content
Closed
Show file tree
Hide file tree
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 Mar 11, 2026
7bbfa6c
fix(chat): fix Claude Code streaming and add model variant selector
vibegui Mar 11, 2026
e33ffcd
feat(chat): add Connect Studio and auto-wire MCP for Claude Code
vibegui Mar 12, 2026
2915e7f
fix(chat): fix missing closing brace in model selector JSX
vibegui Mar 12, 2026
cd32037
fix(chat): fix type errors from rebase and add Claude Code card to on…
vibegui Mar 12, 2026
2bd9341
fix(chat): unify Claude Code into standard model provider flow
vibegui Mar 12, 2026
6fe7fee
fix(chat): rewrite Connect Studio modal with auth info and disconnect
vibegui Mar 12, 2026
84e38f3
fix: remove unused export on CLAUDE_CODE_MODELS to fix knip
vibegui Mar 12, 2026
fea0d46
fix(chat): stream thinking and reasoning from Claude Code
vibegui Mar 12, 2026
a903f49
fix(chat): rename MCP server from mesh-studio to deco-studio
vibegui Mar 12, 2026
322c7ed
feat(chat): per-connection cards in Connect Studio + GitHub support
vibegui Mar 12, 2026
6dfcfa1
fix(chat): fix GitHub status detection and compact Connect Studio cards
vibegui Mar 13, 2026
8cbd143
fix: rewrite self-connection URL to localhost in outbound client
vibegui Mar 13, 2026
761b6ac
feat(chat): fix Claude Code MCP integration and add deco mcp-serve CLI
vibegui Mar 14, 2026
9ad625c
feat(chat): Claude Code provider improvements + connection discovery …
vibegui Mar 14, 2026
3ae02de
fix(connections): revert include_tools change, add LIST_SUMMARY tool …
vibegui Mar 14, 2026
b01a0d6
feat(chat): expand Decopilot system prompt with full tool coverage
vibegui Mar 14, 2026
39bf475
fix(chat): refine Decopilot prompt — remove workflows, clarify agent …
vibegui Mar 14, 2026
ccb637c
fix(chat): remove half-baked features from Decopilot prompt
vibegui Mar 14, 2026
631b2c5
fix(tools): don't expose plugin tools when no plugins are enabled
vibegui Mar 14, 2026
c3c44da
feat(chat): rewrite Decopilot prompt — conversational, example-driven
vibegui Mar 14, 2026
68c898f
fix(tools): sync self connection tool snapshot when management MCP bu…
vibegui Mar 14, 2026
93b5fa4
fix(tools): delete CONNECTION_SEARCH_STORE, fix registry schema bug
vibegui Mar 14, 2026
2861fb2
fix(tools): clarify direct tool calls vs CODE_EXECUTION in MCP instru…
vibegui Mar 14, 2026
10fe05c
feat(tools): expand MCP instructions with full tool catalog and explo…
vibegui Mar 14, 2026
1f61f52
feat(tools): add agent composition guidance, automation patterns, and…
vibegui Mar 14, 2026
6b9c916
fix(chat): use correct Claude Agent SDK model IDs (drop -max suffix)
vibegui Mar 14, 2026
66fda44
fix(tools): delete CONNECTION_SEARCH_STORE, fix registry schema bug
vibegui Mar 14, 2026
7996e98
fix(tools): clarify direct tool calls vs CODE_EXECUTION in MCP instru…
vibegui Mar 14, 2026
0e1abea
fix(tools): always show auth card after install, fix auth detection f…
vibegui Mar 14, 2026
63882c0
feat(chat): emit auth cards in Claude Code path after CONNECTION_AUTH…
vibegui Mar 14, 2026
c5c5058
fix(chat): prevent duplicate reasoning/thinking in Claude Code stream
vibegui Mar 14, 2026
f1f5ea6
fix(chat): detect CONNECTION_AUTHENTICATE via tool_progress, not tool…
vibegui Mar 14, 2026
d28a805
fix(chat): always emit auth cards for unhealthy connections, fix text…
vibegui Mar 14, 2026
d93c0fc
fix(chat): revert broken auth card hack, leave TODO for MCP elicitation
vibegui Mar 14, 2026
4effad3
feat(chat): implement auth cards via MCP elicitation protocol
vibegui Mar 14, 2026
fa576fd
fix(chat): use data-connection-auth part instead of MCP elicitation
vibegui Mar 14, 2026
733e37c
fix(chat): always check for unhealthy connections after Claude Code s…
vibegui Mar 14, 2026
c97a6e2
fix(chat): skip self connection when emitting auth cards
vibegui Mar 14, 2026
6bc1792
fix(chat): detect turn boundaries from stream_event content_block_start
vibegui Mar 14, 2026
82d3454
fix(chat): persist OAuth token after inline auth card authentication
vibegui Mar 14, 2026
7fedfc2
fix(chat): simplify auth card token persistence, add error logging
vibegui Mar 14, 2026
b8d0021
fix(connections): re-fetch tools after OAuth token save
vibegui Mar 14, 2026
8174d41
fix(connections): pass access token when re-fetching tools after OAuth
vibegui Mar 14, 2026
8694e17
fix(chat): check live auth status on mount, show connected state on r…
vibegui Mar 14, 2026
b38bd97
fix(chat): tell model auth card appears below, never say above
vibegui Mar 14, 2026
aa0f36e
fix(chat): only show auth cards for connections without tokens
vibegui Mar 14, 2026
ba8aa08
chore: remove GitHub CLI connection from Connect Studio
vibegui Mar 14, 2026
51f877d
chore: remove unused isClaudeCodeAvailable export (knip)
vibegui Mar 14, 2026
055d39c
fix(chat): unify Claude Code connection into AI provider card
vibegui Mar 14, 2026
67ba903
fix: address PR review feedback (Cubic + internal review)
vibegui Mar 14, 2026
6b76646
refactor: simplify review fixes after /simplify pass
vibegui Mar 14, 2026
9fa5008
fix(connections): inline API key auth for MCPs that need tokens (e.g.…
vibegui Mar 14, 2026
f721463
fix(connections): default to token auth when no oauth_config exists
vibegui Mar 14, 2026
a7e82df
fix(connections): detect MCP_CONFIGURATION for auth, fix status and c…
vibegui Mar 15, 2026
75010dd
fix(chat): fall back to API key input when OAuth discovery fails
vibegui Mar 15, 2026
688d617
fix(connections): simplify auth detection — show Needs API Key when t…
vibegui Mar 15, 2026
0b2afc4
fix(connections): only show Needs API Key for connections with config…
vibegui Mar 15, 2026
490c173
fix(connections): persist needs_auth flag in metadata for reliable UI…
vibegui Mar 15, 2026
c1d572a
fix(connections): set needs_auth in create call, not separate update
vibegui Mar 15, 2026
a24cd68
fix(connections): show Needs API Key in detail page sidebar
vibegui Mar 15, 2026
b6d9ab5
fix(connections): check connection_token before showing Needs API Key…
vibegui Mar 15, 2026
7694889
fix(connections): address cubic-dev review feedback
vibegui Mar 15, 2026
696ab9a
chore: revert unrelated schema.ts change from rebase conflict
vibegui Mar 15, 2026
de800e9
chore: remove out-of-scope changes to slim down PR
vibegui Mar 15, 2026
0e18062
fix: AI provider grid layout, proxy cleanup, and connect-studio relia…
vibegui Mar 15, 2026
1064993
fix(chat): only show auth cards when connection auth was attempted
vibegui Mar 15, 2026
4b212d5
fix(chat): emit auth cards when connections are created, not just whe…
vibegui Mar 15, 2026
f9ca1c1
fix(chat): also trigger auth cards on CONNECTION_INSTALL tool calls
vibegui Mar 15, 2026
eb34fec
fix(chat): show auth card for tokenless connections regardless of health
vibegui Mar 15, 2026
d360821
fix(chat): use timestamp-based auth card detection instead of SDK events
vibegui Mar 15, 2026
d177999
feat(chat): plan mode UI — fix CLS, purple styling, plan rendering wi…
vibegui Mar 15, 2026
08475ba
fix(chat): persist tool call parts so they survive after streaming ends
vibegui Mar 15, 2026
0e68876
fix(chat): render reasoning blocks inline where they occur in message…
vibegui Mar 15, 2026
290538c
feat(chat): add vision support for Claude Code models + inline reasoning
vibegui Mar 15, 2026
73113c8
fix(chat): correct token counting, persist reasoning, track tool call…
vibegui Mar 15, 2026
33e38b5
fix(chat): inject agent instructions into Claude Code system prompt
vibegui Mar 16, 2026
3729c67
fix(chat): remove unused tool-approval-registry (fixes knip CI)
vibegui Mar 16, 2026
baf0e99
fix: update conductor run script for local mode
vibegui Mar 17, 2026
c43e060
fix(chat): restore main's connection-sidebar, remove dead modal (fixe…
vibegui Mar 17, 2026
e4a033e
fix(chat): revert connections.tsx and modal changes — already shipped…
vibegui Mar 17, 2026
9b3642e
refactor(chat): deduplicate system prompts, merge auth tools
vibegui Mar 17, 2026
3e8d4ef
fix(chat): add missing cn import in no-llm-binding-empty-state
vibegui Mar 17, 2026
3489be3
fix(mcp-apps): timeout resource load and self-contain MCPAppRenderer …
vibegui Mar 17, 2026
702576c
fix(tool-detail): uncap iframe height so MCP app content is not cropped
vibegui Mar 17, 2026
51384a3
fix(mcp-apps): observe iframe content height when app doesn't report …
vibegui Mar 17, 2026
a40dc40
revert: undo mcp-apps UI fixes (applied to abuja instead)
vibegui Mar 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/mesh/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"prepublishOnly": "bun run build:client && bun run build:server"
},
"optionalDependencies": {
"@anthropic-ai/claude-agent-sdk": "^0.2.72",
"@duckdb/node-api": "^1.5.0-r.1"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion apps/mesh/public/logos/Claude Code.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion apps/mesh/src/ai-providers/adapters/deco-ai-gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const decoAiGatewayAdapter: ProviderAdapter = {
info: {
id: "deco",
name: "Deco AI Gateway",
description: "Deco-managed keys with access to 100+ models",
description: "Access to 100+ models",
logo: "/logos/deco logo.svg",
},

Expand Down
39 changes: 39 additions & 0 deletions apps/mesh/src/ai-providers/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,40 @@ import type { ModelListCache } from "./model-list-cache";
import type { MeshProvider, ModelInfo, OpenRouterAPIModel } from "./types";
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
import { PROVIDERS } from "./registry";

/** Static model list for the Claude Code local provider. */
const CLAUDE_CODE_MODEL_LIST: ModelInfo[] = [

@cubic-dev-ai cubic-dev-ai Bot Mar 12, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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
Check if this issue is valid — if so, understand the root cause and fix it. At apps/mesh/src/ai-providers/factory.ts, line 8:

<comment>Keep the Claude Code model variants in one shared source of truth; this duplicate list can drift from the runtime SDK mapping.</comment>

<file context>
@@ -4,6 +4,40 @@ import type { ModelListCache } from "./model-list-cache";
 import { PROVIDERS } from "./registry";
 
+/** Static model list for the Claude Code local provider. */
+const CLAUDE_CODE_MODEL_LIST: ModelInfo[] = [
+  {
+    providerId: "claude-code",
</file context>
Fix with Cubic

{
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";

Expand Down Expand Up @@ -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;
Expand Down
19 changes: 19 additions & 0 deletions apps/mesh/src/ai-providers/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,28 @@ import { decoAiGatewayAdapter } from "./adapters/deco-ai-gateway";

const isDecoAiGatewayEnabled = !!process.env.DECO_AI_GATEWAY_ENABLED;

/**
* Claude Code uses the local CLI — no API key or SDK adapter needed.
* This placeholder satisfies the registry type; the actual chat path
* bypasses the adapter entirely via the isClaudeCode branch.
*/
const claudeCodeAdapter: ProviderAdapter = {
info: {
id: "claude-code",
name: "Claude Code",
description: "Local Claude Code CLI",
logo: "/logos/Claude Code.svg",
},
supportedMethods: [],
create() {
throw new Error("Claude Code uses the local CLI, not an API adapter");
},
};

export const PROVIDERS: Partial<Record<ProviderId, ProviderAdapter>> = {
...(isDecoAiGatewayEnabled && { deco: decoAiGatewayAdapter }),
anthropic: anthropicAdapter,
google: googleAdapter,
openrouter: openrouterAdapter,
"claude-code": claudeCodeAdapter,
};
6 changes: 6 additions & 0 deletions apps/mesh/src/api/routes/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ export type AuthConfig = {
* When true, the frontend should auto-login and skip org selection.
*/
localMode: boolean;
/**
* Whether Claude Code is available locally.
* When true, the frontend can offer Claude Code as a chat provider.
*/
claudeCodeAvailable: boolean;
};

/**
Expand Down Expand Up @@ -105,6 +110,7 @@ app.get("/config", async (c) => {
},
stdioEnabled,
localMode: isLocalMode(),
claudeCodeAvailable: isLocalMode() && !!Bun.which("claude"),
};

return c.json({ success: true, config });
Expand Down
Loading
Loading