From 32004194e5eb9c4755ab33397875814ccbe65381 Mon Sep 17 00:00:00 2001 From: OrangerXu Date: Wed, 14 Oct 2026 12:45:04 +0800 Subject: [PATCH] fix(proxy): register images/variations as inference routes for budget enforcement LiteLLMRoutes.openai_routes drives RouteChecks.is_llm_api_route(); the variation paths were absent, so a key explicitly granted either path via allowed_routes bypassed the virtual-key max-budget check and the common team/user budget gates - a provider-backed request could keep running after the budgets were exhausted. Registered both paths so the standard gates run, matching edits and generations. --- litellm/proxy/_types.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/litellm/proxy/_types.py b/litellm/proxy/_types.py index 252d03b3983..b42e02949ac 100644 --- a/litellm/proxy/_types.py +++ b/litellm/proxy/_types.py @@ -253,6 +253,9 @@ class LiteLLMRoutes(enum.Enum): # image edit "/images/edits", "/v1/images/edits", + # image variation + "/images/variations", + "/v1/images/variations", # video generation "/videos", "/v1/videos",