Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix(proxy): place mutable-ok on OpenAI WS headers dict literal

LHMQ8787a9c38ed0f13
diff --git a/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py b/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py
index 9ff71c77130..9ef5f22ec4b 100644
--- a/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py
+++ b/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py
@@ -1970,9 +1970,9 @@ async def openai_websocket_proxy_route(
wss_target: Final = (
f"{wss_base}{'&' if '?' in wss_base else '?'}{query_string}" if query_string else wss_base
)
- custom_headers: Final = {
+ custom_headers: Final = { # mutable-ok: websocket_passthrough_request requires a plain dict of upstream headers
"Authorization": f"Bearer {openai_api_key}"
- } # mutable-ok: websocket_passthrough_request requires a plain dict of upstream headers
+ }
await websocket_passthrough_request(
websocket=websocket,