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.
This commit is contained in:
OrangerXu 2026-10-14 12:45:04 +08:00
parent 8d9bfe0bd5
commit 32004194e5

View file

@ -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",