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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
test(custom_httpx): pass the token resolver and two-argument client factory in the realtime bridge test
mateo-berri17c519c40a3c
diff --git a/tests/test_litellm/llms/custom_httpx/test_llm_http_handler.py b/tests/test_litellm/llms/custom_httpx/test_llm_http_handler.pyindex 1f71ffd43f6..82220d53375 100644--- a/tests/test_litellm/llms/custom_httpx/test_llm_http_handler.py+++ b/tests/test_litellm/llms/custom_httpx/test_llm_http_handler.py@@ -3780,11 +3780,17 @@ async def test_async_realtime_bridges_a_transcription_session_through_the_providyield script.pop(0)speech_client = FakeSpeechClient()++ async def resolve_access_token() -> str:+ return "token"+provider_config = VertexChirpRealtimeConfig(- access_token="token",+ resolve_access_token=resolve_access_token,project="proj-1",location="us",- backend_factory=lambda target: SpeechStreamingBackend(target, client_factory=lambda target: speech_client),+ backend_factory=lambda target: SpeechStreamingBackend(+ target, client_factory=lambda target, access_token: speech_client+ ),)audio = base64.b64encode(b"\x00\x01" * 800).decode()client_ws = _ScriptedClientWebSocket(