From fb054122b199ba4943e610a3b49c19e471cbb9dc Mon Sep 17 00:00:00 2001 From: michelligabriele Date: Thu, 26 Mar 2026 21:25:58 +0100 Subject: [PATCH] fix: guard skip_budget_checks from zero-cost model overwrite --- litellm/proxy/auth/user_api_key_auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/proxy/auth/user_api_key_auth.py b/litellm/proxy/auth/user_api_key_auth.py index ed82f0442bc..b06e24384be 100644 --- a/litellm/proxy/auth/user_api_key_auth.py +++ b/litellm/proxy/auth/user_api_key_auth.py @@ -1264,7 +1264,7 @@ async def _user_api_key_auth_builder( # noqa: PLR0915 # enforcement happens at user/team level in common_checks. if valid_token.token == CLI_JWT_TOKEN_NAME: skip_budget_checks = True - if model is not None and llm_router is not None: + if model is not None and llm_router is not None and not skip_budget_checks: from litellm.proxy.auth.auth_checks import _is_model_cost_zero skip_budget_checks = _is_model_cost_zero(