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:
parent
aa0d7563ff
commit
9b8625b9d6
@ -794,7 +794,6 @@ export async function applyAuthChoiceApiProviders(
|
|||||||
options: [
|
options: [
|
||||||
{ value: "retry-apikey", label: "Re-enter API key" },
|
{ value: "retry-apikey", label: "Re-enter API key" },
|
||||||
{ value: "retry-baseurl", label: "Re-enter base URL" },
|
{ value: "retry-baseurl", label: "Re-enter base URL" },
|
||||||
{ value: "manual", label: "Enter model name manually" },
|
|
||||||
{ value: "cancel", label: "Go back to provider selection" },
|
{ value: "cancel", label: "Go back to provider selection" },
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
@ -832,31 +831,8 @@ export async function applyAuthChoiceApiProviders(
|
|||||||
return await applyAuthChoiceApiProviders(newParams);
|
return await applyAuthChoiceApiProviders(newParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Manual model entry
|
// This should never be reached, but throw error as fallback
|
||||||
const modelInput = await params.prompter.text({
|
throw new Error("Failed to configure LiteLLM provider");
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Strip litellm/ prefix if the API returned it (avoid litellm/litellm/model)
|
// Strip litellm/ prefix if the API returned it (avoid litellm/litellm/model)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user