From 9b8625b9d65556b50fe8e595f9d4a4ea9c0fcbfe Mon Sep 17 00:00:00 2001 From: Charles-Henri ROBICHE Date: Thu, 29 Jan 2026 10:33:19 +0100 Subject: [PATCH] fix(litellm): remove manual model entry fallback option - Remove 'Enter model name manually' from error recovery menu - Only allow retry with different credentials or cancel - Ensures users fix the actual connection issue rather than bypass it Co-Authored-By: Claude --- .../auth-choice.apply.api-providers.ts | 28 ++----------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/src/commands/auth-choice.apply.api-providers.ts b/src/commands/auth-choice.apply.api-providers.ts index cfdaa6475..b308d3084 100644 --- a/src/commands/auth-choice.apply.api-providers.ts +++ b/src/commands/auth-choice.apply.api-providers.ts @@ -794,7 +794,6 @@ export async function applyAuthChoiceApiProviders( options: [ { value: "retry-apikey", label: "Re-enter API key" }, { value: "retry-baseurl", label: "Re-enter base URL" }, - { value: "manual", label: "Enter model name manually" }, { value: "cancel", label: "Go back to provider selection" }, ], }); @@ -832,31 +831,8 @@ export async function applyAuthChoiceApiProviders( return await applyAuthChoiceApiProviders(newParams); } - // Manual model entry - const modelInput = await params.prompter.text({ - message: "Enter model name (as configured in your LiteLLM server)", - placeholder: "e.g., gpt-4, claude-opus-4-5, etc.", - validate: (value) => { - if (!value?.trim()) return "Model name is required"; - return undefined; - }, - }); - normalizedModelId = String(modelInput).trim(); - - // Prompt for context window since we couldn't auto-detect it - const contextInput = await params.prompter.text({ - message: "Enter context window size (tokens) - optional", - placeholder: "e.g., 200000 for Claude Opus 4.5", - validate: (value) => { - if (!value?.trim()) return undefined; // Optional - const num = Number.parseInt(value, 10); - if (Number.isNaN(num) || num <= 0) return "Must be a positive number"; - return undefined; - }, - }); - if (contextInput && String(contextInput).trim()) { - contextWindow = Number.parseInt(String(contextInput).trim(), 10); - } + // This should never be reached, but throw error as fallback + throw new Error("Failed to configure LiteLLM provider"); } // Strip litellm/ prefix if the API returned it (avoid litellm/litellm/model)