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(main.py): response_format typing for acompletion

Krrish Dholakia89791d9285fb
diff --git a/litellm/main.py b/litellm/main.py
index 24ae12631d2..96496c7177e 100644
--- a/litellm/main.py
+++ b/litellm/main.py
@@ -253,7 +253,7 @@ async def acompletion(
logit_bias: Optional[dict] = None,
user: Optional[str] = None,
# openai v1.0+ new params
- response_format: Optional[dict] = None,
+ response_format: Optional[Union[dict, Type[BaseModel]]] = None,
seed: Optional[int] = None,
tools: Optional[List] = None,
tool_choice: Optional[str] = None,