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 <noreply@anthropic.com>
This commit is contained in:
Charles-Henri ROBICHE 2026-01-29 10:33:19 +01:00
parent aa0d7563ff
commit 9b8625b9d6
No known key found for this signature in database

View File

@ -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)