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
format
retanojb1686ecbe5fd
diff --git a/litellm/google_genai/adapters/handler.py b/litellm/google_genai/adapters/handler.pyindex ee9083cbbf0..dcf707ebd51 100644--- a/litellm/google_genai/adapters/handler.py+++ b/litellm/google_genai/adapters/handler.py@@ -38,7 +38,7 @@ class GenerateContentToCompletionHandler:completion_kwargs: Dict[str, Any] = dict(completion_request)# feed metadata for custom callback- if "metadata" in extra_kwargs:+ if extra_kwargs is not None and "metadata" in extra_kwargs:completion_kwargs["metadata"] = extra_kwargs["metadata"]if stream: