diff --git a/docs/custom-providers.md b/docs/custom-providers.md index 1d6d67d453..ef0281ec7f 100644 --- a/docs/custom-providers.md +++ b/docs/custom-providers.md @@ -777,6 +777,8 @@ The built-in `claude` provider appends concrete model IDs from `~/.claude/settin This lets users who already configured Claude Code for Bedrock, OpenRouter, ollama, Z.AI, or another Anthropic-compatible gateway select the exact model ID in Paseo. Explicit model IDs are passed unchanged to Claude Code, even when the same string is a compatibility alias for a built-in model. When `agents.providers.claude.models` is set it **replaces** both the hardcoded first-party Claude list and any settings.json-discovered entries; use `agents.providers.claude.additionalModels` to keep the first-party list and append curated entries on top. +Paseo's effort selector does not inherit `effortLevel` from Claude's settings.json. Select an effort in Paseo to choose a specific value. + ### Gotcha: `extends: "claude"` with third-party endpoints When a custom provider extends `"claude"` but points `ANTHROPIC_BASE_URL` at a non-Anthropic API (Z.AI, Alibaba/Qwen, proxies), the Claude Agent SDK may try to use Anthropic-only server-side tools like `WebSearch`. Third-party APIs don't support these tools, causing errors. diff --git a/packages/server/src/server/agent/providers/claude/models.test.ts b/packages/server/src/server/agent/providers/claude/models.test.ts index 0daa5e533a..464964cf3a 100644 --- a/packages/server/src/server/agent/providers/claude/models.test.ts +++ b/packages/server/src/server/agent/providers/claude/models.test.ts @@ -365,7 +365,21 @@ describe("ClaudeAgentClient.fetchCatalog", () => { ); }); - it("appends concrete models from Claude settings.json", async () => { + it("appends concrete models from Claude settings.json with thinking options", async () => { + const customModelThinkingOptions = [ + { id: "low", label: "Low" }, + { id: "medium", label: "Medium" }, + { id: "high", label: "High", isDefault: true }, + { id: "max", label: "Max" }, + ]; + const fableThinkingOptions = [ + { id: "low", label: "Low" }, + { id: "medium", label: "Medium" }, + { id: "high", label: "High", isDefault: true }, + { id: "xhigh", label: "Extra High" }, + { id: "max", label: "Max" }, + { id: CLAUDE_ULTRACODE_THINKING_OPTION_ID, label: "Ultra Code" }, + ]; const configDir = await createClaudeConfigDir({ model: "us.anthropic.claude-opus-4-7[1m]", env: { @@ -393,42 +407,49 @@ describe("ClaudeAgentClient.fetchCatalog", () => { id: "us.anthropic.claude-opus-4-7[1m]", label: "us.anthropic.claude-opus-4-7[1m]", description: "From Claude settings.json model", + thinkingOptions: customModelThinkingOptions, }, { provider: "claude", id: "openrouter/anthropic/claude-sonnet-4.5", label: "openrouter/anthropic/claude-sonnet-4.5", description: "From Claude settings.json env.ANTHROPIC_MODEL", + thinkingOptions: customModelThinkingOptions, }, { provider: "claude", id: "ollama/qwen3-coder", label: "ollama/qwen3-coder", description: "From Claude settings.json env.ANTHROPIC_SMALL_FAST_MODEL", + thinkingOptions: customModelThinkingOptions, }, { provider: "claude", id: "claude-fable-5-1[1M]", label: "claude-fable-5-1[1M]", description: "From Claude settings.json env.ANTHROPIC_DEFAULT_FABLE_MODEL", + thinkingOptions: fableThinkingOptions, }, { provider: "claude", id: "bedrock-opus-from-env", label: "bedrock-opus-from-env", description: "From Claude settings.json env.ANTHROPIC_DEFAULT_OPUS_MODEL", + thinkingOptions: customModelThinkingOptions, }, { provider: "claude", id: "glm-5.1", label: "glm-5.1", description: "From Claude settings.json env.ANTHROPIC_DEFAULT_SONNET_MODEL", + thinkingOptions: customModelThinkingOptions, }, { provider: "claude", id: "glm-5", label: "glm-5", description: "From Claude settings.json env.ANTHROPIC_DEFAULT_HAIKU_MODEL", + thinkingOptions: customModelThinkingOptions, }, ]); expect(models.filter((model) => model.id === "claude-fable-5-1[1M]")).toHaveLength(1); diff --git a/packages/server/src/server/agent/providers/claude/models.ts b/packages/server/src/server/agent/providers/claude/models.ts index 2a9b801fdb..80f5a38e68 100644 --- a/packages/server/src/server/agent/providers/claude/models.ts +++ b/packages/server/src/server/agent/providers/claude/models.ts @@ -83,7 +83,7 @@ export async function getClaudeModelsWithSettings( const manifestModel = getClaudeModels(claudeCodeVersion).find( (candidate) => candidate.id === model.id, ); - models.push({ ...manifestModel, ...model }); + models.push(resolveConfiguredClaudeModel({ ...manifestModel, ...model })); } return models;