diff --git a/src/commands/model-picker.test.ts b/src/commands/model-picker.test.ts index 84acd9f99..f90f238eb 100644 --- a/src/commands/model-picker.test.ts +++ b/src/commands/model-picker.test.ts @@ -34,7 +34,7 @@ vi.mock("../agents/model-auth.js", () => ({ })); describe("promptDefaultModel", () => { - it("filters internal router models from the selection list", async () => { + it("includes openrouter/auto in the selection list", async () => { loadModelCatalog.mockResolvedValue([ { provider: "openrouter", @@ -64,15 +64,17 @@ describe("promptDefaultModel", () => { }); const options = select.mock.calls[0]?.[0]?.options ?? []; - expect(options.some((opt) => opt.value === "openrouter/auto")).toBe(false); - expect(options.some((opt) => opt.value === "openrouter/meta-llama/llama-3.3-70b:free")).toBe( - true, - ); + expect(options.some((opt: { value: string }) => opt.value === "openrouter/auto")).toBe(true); + expect( + options.some( + (opt: { value: string }) => opt.value === "openrouter/meta-llama/llama-3.3-70b:free", + ), + ).toBe(true); }); }); describe("promptModelAllowlist", () => { - it("filters internal router models from the selection list", async () => { + it("includes openrouter/auto in the selection list", async () => { loadModelCatalog.mockResolvedValue([ { provider: "openrouter", @@ -95,7 +97,7 @@ describe("promptModelAllowlist", () => { await promptModelAllowlist({ config, prompter }); const options = multiselect.mock.calls[0]?.[0]?.options ?? []; - expect(options.some((opt: { value: string }) => opt.value === "openrouter/auto")).toBe(false); + expect(options.some((opt: { value: string }) => opt.value === "openrouter/auto")).toBe(true); expect( options.some( (opt: { value: string }) => opt.value === "openrouter/meta-llama/llama-3.3-70b:free", diff --git a/src/commands/model-picker.ts b/src/commands/model-picker.ts index 5cceb1e94..8edada132 100644 --- a/src/commands/model-picker.ts +++ b/src/commands/model-picker.ts @@ -17,11 +17,6 @@ const KEEP_VALUE = "__keep__"; const MANUAL_VALUE = "__manual__"; const PROVIDER_FILTER_THRESHOLD = 30; -// Models that are internal routing features and should not be shown in selection lists. -// These may be valid as defaults (e.g., set automatically during auth flow) but are not -// directly callable via API and would cause "Unknown model" errors if selected manually. -const HIDDEN_ROUTER_MODELS = new Set(["openrouter/auto"]); - type PromptDefaultModelParams = { config: ClawdbotConfig; prompter: WizardPrompter; @@ -208,8 +203,6 @@ export async function promptDefaultModel( }) => { const key = modelKey(entry.provider, entry.id); if (seen.has(key)) return; - // Skip internal router models that can't be directly called via API. - if (HIDDEN_ROUTER_MODELS.has(key)) return; const hints: string[] = []; if (entry.name && entry.name !== entry.id) hints.push(entry.name); if (entry.contextWindow) hints.push(`ctx ${formatTokenK(entry.contextWindow)}`); @@ -336,7 +329,6 @@ export async function promptModelAllowlist(params: { }) => { const key = modelKey(entry.provider, entry.id); if (seen.has(key)) return; - if (HIDDEN_ROUTER_MODELS.has(key)) return; const hints: string[] = []; if (entry.name && entry.name !== entry.id) hints.push(entry.name); if (entry.contextWindow) hints.push(`ctx ${formatTokenK(entry.contextWindow)}`);