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
fix(realtime): resolve the vertex token resolver at call time
Mateod643136895d6
diff --git a/litellm/realtime_api/main.py b/litellm/realtime_api/main.pyindex 56b3931711e..4e02be36daa 100644--- a/litellm/realtime_api/main.py+++ b/litellm/realtime_api/main.py@@ -2,7 +2,7 @@import asyncioimport os-from typing import Any, Final, cast+from typing import Any, Final, Literal, castimport litellmfrom litellm.constants import (@@ -43,7 +43,6 @@ openai_realtime: Final = OpenAIRealtime()bedrock_realtime: Final = BedrockRealtime()xai_realtime: Final = XAIRealtime()vertex_llm_base: Final = VertexBase()-vertex_access_token_resolver: Final[VertexAccessTokenResolver] = vertex_llm_base._ensure_access_token_asyncbase_llm_http_handler = BaseLLMHTTPHandler()@@ -288,6 +287,18 @@ async def arealtime_calls()+async def vertex_access_token_resolver(+ credentials: VERTEX_CREDENTIALS_TYPES | None,+ project_id: str | None,+ custom_llm_provider: Literal["vertex_ai", "vertex_ai_beta", "gemini"],+) -> tuple[str, str]:+ return await vertex_llm_base._ensure_access_token_async(+ credentials=credentials,+ project_id=project_id,+ custom_llm_provider=custom_llm_provider,+ )++async def _resolve_vertex_access_token_bounded(credentials: VERTEX_CREDENTIALS_TYPES | None,project_id: str | None,