From 966b047dd5ff7e67b6afe4156172c1e3d53ba0fa Mon Sep 17 00:00:00 2001 From: jibanez-staticduo Date: Thu, 1 Oct 2026 11:37:01 +0200 Subject: [PATCH] fix: keep legacy SDP rejection response immutable --- litellm/proxy/realtime_endpoints/endpoints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/proxy/realtime_endpoints/endpoints.py b/litellm/proxy/realtime_endpoints/endpoints.py index 1e40c41e9d6..59c3f59e427 100644 --- a/litellm/proxy/realtime_endpoints/endpoints.py +++ b/litellm/proxy/realtime_endpoints/endpoints.py @@ -429,7 +429,7 @@ async def proxy_realtime_calls( decoded_payload: Final = _decode_realtime_token_payload(decrypted_token_value) if decoded_payload is None and decrypted_token_value.lstrip().startswith(("{", "[")): return Response( - content=json.dumps({"error": "Invalid or expired token"}), + content='{"error":"Invalid or expired token"}', status_code=http_status.HTTP_401_UNAUTHORIZED, media_type="application/json", )