From d204bfa52607169b9da21554b2f91e754420e36a Mon Sep 17 00:00:00 2001 From: moe-berri Date: Mon, 26 Oct 2026 13:13:57 -0700 Subject: [PATCH] fix(chatgpt): keep account lookup token argument immutable --- litellm/llms/chatgpt/authenticator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/llms/chatgpt/authenticator.py b/litellm/llms/chatgpt/authenticator.py index 40e605f444a..a5fb1c9c6b9 100644 --- a/litellm/llms/chatgpt/authenticator.py +++ b/litellm/llms/chatgpt/authenticator.py @@ -131,8 +131,8 @@ class Authenticator: if account_id: return account_id id_token: Final = auth_data.get("id_token") - access_token: Final = auth_data.get("access_token") - derived: Final = extract_chatgpt_account_id(_optional_str(id_token or access_token)) + saved_access_token: Final = auth_data.get("access_token") + derived: Final = extract_chatgpt_account_id(_optional_str(id_token or saved_access_token)) if derived: self._write_auth_file({**auth_data, "account_id": derived}) return derived