From 347807a3c1b30b2d5a821ddfa263adb91077860a Mon Sep 17 00:00:00 2001 From: yassin Date: Tue, 29 Sep 2026 17:54:39 +0000 Subject: [PATCH] fix(cli): keep cached credential reads from initiating renewal Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm/proxy/client/cli/commands/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/proxy/client/cli/commands/auth.py b/litellm/proxy/client/cli/commands/auth.py index 13266e2f72d..95af9088c38 100644 --- a/litellm/proxy/client/cli/commands/auth.py +++ b/litellm/proxy/client/cli/commands/auth.py @@ -263,7 +263,7 @@ def get_stored_api_key( if expected_base_url is not None and token_data.get("base_url") != expected_base_url.rstrip("/"): return None if is_cli_token_fresh(token_data) or not token_data.get("refresh_token"): - return _key_from_record(token_data, vault) + return _key_from_record({**token_data, "refresh_token": None}, vault) try: with _credential_lock(): return _get_stored_api_key(expected_base_url, vault)