From d531f7d9a44b644b9c0269196cd8127915af99a3 Mon Sep 17 00:00:00 2001 From: Charles-Henri ROBICHE Date: Thu, 29 Jan 2026 10:48:16 +0100 Subject: [PATCH] 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 --- src/commands/auth-choice.apply.api-providers.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/commands/auth-choice.apply.api-providers.ts b/src/commands/auth-choice.apply.api-providers.ts index b308d3084..f31e94a57 100644 --- a/src/commands/auth-choice.apply.api-providers.ts +++ b/src/commands/auth-choice.apply.api-providers.ts @@ -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") {