fix(proxy): add realtime WebRTC HTTP sub-routes to openai_routes

Fixes #29923

The realtime WebRTC HTTP routes /realtime/client_secrets and /realtime/calls
(and their /v1/ and /openai/v1/ prefixed variants) were registered in
realtime_endpoints/endpoints.py but absent from LiteLLMRoutes.openai_routes
in _types.py.

As a result, is_llm_api_route() returned False for these paths, and any
non-admin virtual key (e.g. role=internal_user_viewer) was blocked with 401
instead of being treated as a standard LLM API call.

Fix: add the six missing paths to openai_routes, mirroring how the WSS
/realtime paths were added via PR #27323.
This commit is contained in:
PRABHU KIRAN VANDRANKI 2026-06-08 13:30:17 -04:00
parent a72414a061
commit f8f6494f35

View file

@ -358,6 +358,13 @@ class LiteLLMRoutes(enum.Enum):
"/realtime?{model}",
"/v1/realtime?{model}",
"/openai/v1/realtime?{model}",
# realtime WebRTC HTTP sub-routes (client_secrets, calls) - fixes #29923
"/realtime/client_secrets",
"/v1/realtime/client_secrets",
"/openai/v1/realtime/client_secrets",
"/realtime/calls",
"/v1/realtime/calls",
"/openai/v1/realtime/calls",
# responses API
"/responses",
"/v1/responses",