From 1b0120dc0b09aa7bdd336234bfab318e0b43da3d Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 24 Jun 2026 13:09:52 -0700 Subject: [PATCH] fix(proxy): builtin dict generics (UP006 strict budget) + hide internal auth route from OpenAPI/UI schema --- litellm/proxy/auth/internal_auth_endpoints.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/litellm/proxy/auth/internal_auth_endpoints.py b/litellm/proxy/auth/internal_auth_endpoints.py index 61c553f7aa5..baad3dffec5 100644 --- a/litellm/proxy/auth/internal_auth_endpoints.py +++ b/litellm/proxy/auth/internal_auth_endpoints.py @@ -19,7 +19,7 @@ Security model: import hmac import json import os -from typing import Any, Dict, Optional +from typing import Any, Optional from fastapi import APIRouter, Depends, HTTPException, Request from pydantic import BaseModel @@ -77,7 +77,7 @@ def _synthetic_request(route: str, api_key: str, model: Optional[str]) -> Reques """ body = json.dumps({"model": model} if model is not None else {}).encode() - async def receive() -> Dict[str, Any]: + async def receive() -> dict[str, Any]: return {"type": "http.request", "body": body, "more_body": False} scope = { @@ -103,8 +103,11 @@ router = APIRouter() @router.post( "/internal/v1/auth/verify", dependencies=[Depends(require_data_plane_key)], + # Internal data-plane route: keep it out of the public OpenAPI spec / docs + # (and the generated UI schema.d.ts). It's not a client- or UI-facing API. + include_in_schema=False, ) -async def verify_key(body: VerifyKeyRequest) -> Dict[str, Any]: +async def verify_key(body: VerifyKeyRequest) -> dict[str, Any]: """ Verify a virtual key on behalf of the Rust ai-gateway (data plane).