From 3084f32852074a6d2978cc9b227f4b944348ef1b Mon Sep 17 00:00:00 2001 From: "paseo-bot[bot]" <266920839+paseo-bot[bot]@users.noreply.github.com> Date: Tue, 3 Nov 2026 20:59:32 +0000 Subject: [PATCH] Show effort controls for Claude settings models (#8699) * fix(claude): show thinking options for models from settings.json Models appended from Claude's settings.json were pushed to the catalog without thinkingOptions, so the composer had no effort selector for them. Resolve them like profile and additionalModels entries: manifest options for built-in IDs, the standard Claude effort levels otherwise. * docs(claude): clarify effort selection for settings models Describe explicit effort selection without promising how every client initializes an unsaved value. Co-authored-by: Okan YILDIRIM <63511519+ragokan@users.noreply.github.com> Co-authored-by: wangyahao --------- Co-authored-by: Okan YILDIRIM <63511519+ragokan@users.noreply.github.com> Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com> Co-authored-by: wangyahao --- docs/custom-providers.md | 2 ++ .../agent/providers/claude/models.test.ts | 23 ++++++++++++++++++- .../server/agent/providers/claude/models.ts | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) 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;