fix(litellm): update cancel option label and behavior

- Change label from 'Go back to provider selection' to 'Go back to auth method selection'
- Throw AUTH_CHOICE_CANCELLED error to signal proper navigation level
- More accurate description of where user will be taken

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Charles-Henri ROBICHE 2026-01-29 10:48:16 +01:00
parent 9b8625b9d6
commit d531f7d9a4
No known key found for this signature in database

View File

@ -794,12 +794,14 @@ export async function applyAuthChoiceApiProviders(
options: [
{ value: "retry-apikey", label: "Re-enter API key" },
{ value: "retry-baseurl", label: "Re-enter base URL" },
{ value: "cancel", label: "Go back to provider selection" },
{ value: "cancel", label: "Go back to auth method selection" },
],
});
if (action === "cancel") {
return null; // Return null to go back to provider selection
// Throw an error with a specific message that signals to restart auth selection
// The caller should catch this and re-prompt for auth choice
throw new Error("AUTH_CHOICE_CANCELLED");
}
if (action === "retry-apikey") {