Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

docs(cli): say why a refused scrub does not roll the keychain back

mateo-berrib9ce630b0e47
diff --git a/litellm/litellm_core_utils/cli_token_utils.py b/litellm/litellm_core_utils/cli_token_utils.py
index 134e7e2331c..085448f8b63 100644
--- a/litellm/litellm_core_utils/cli_token_utils.py
+++ b/litellm/litellm_core_utils/cli_token_utils.py
@@ -332,6 +332,12 @@ def _apply_vault_secret(record: CliTokenRecord, blob: str, vault: SecretVault) -
secret is usually left on disk by a keychain that would not take it, which makes the file the
fresher of the two. It is the older one when a login the keychain did take could not replace
the file afterwards, and serving that one would put a superseded credential back in use.
+
+ A scrub the file refuses leaves that superseded secret where it lies, which is the state the
+ login already named when it could not replace the file, and which `lite logout` reports rather
+ than counting as a clean sweep. Rolling the vault back the way a migration does is not the
+ answer here, because the two stores hold different credentials and the rollback would hand the
+ superseded one back out.
"""
secret: Final = _decode_secret(blob, record.base_url)
if secret is None or (record.key is not None and secret.timestamp <= record.timestamp):