diff --git a/litellm/litellm_core_utils/cli_keyring.py b/litellm/litellm_core_utils/cli_keyring.py index 0cb683d4a88..441880abd91 100644 --- a/litellm/litellm_core_utils/cli_keyring.py +++ b/litellm/litellm_core_utils/cli_keyring.py @@ -292,9 +292,10 @@ class KeyringVault: match result: case _KeyringCallAnswered(): return SecretErased() - case _KeyringCallFailed() | _KeyringCallTimedOut(): - if isinstance(result, _KeyringCallTimedOut): - self.stopped_answering.set() + case _KeyringCallFailed(): + return SecretStranded() + case _KeyringCallTimedOut(): + self.stopped_answering.set() return SecretStranded() diff --git a/litellm/proxy/client/cli/commands/auth.py b/litellm/proxy/client/cli/commands/auth.py index 4347ade2dde..d5b391c5e3b 100644 --- a/litellm/proxy/client/cli/commands/auth.py +++ b/litellm/proxy/client/cli/commands/auth.py @@ -153,10 +153,7 @@ def storage_notice(outcome: SecretSave) -> str: f"(owner-only) instead. For OS keychain storage, run: {KEYRING_ENABLE_HINT}" ) case SecretTooLarge(): - return ( - f"Your credential is too large for the OS keychain, so it was stored in {path} " - "(owner-only) instead." - ) + return f"Your credential is too large for the OS keychain, so it was stored in {path} (owner-only) instead." case CredentialNotSaved(detail=detail): return ( f"Signed in, but the credential could not be saved to {path}: {detail}. "