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(acompletion): allow dict for tool_choice argument (#11860)
Jianqi Panc4c8d9a25013
diff --git a/litellm/main.py b/litellm/main.pyindex 41294d84f35..d27411ad3b8 100644--- a/litellm/main.py+++ b/litellm/main.py@@ -344,7 +344,7 @@ async def acompletion(response_format: Optional[Union[dict, Type[BaseModel]]] = None,seed: Optional[int] = None,tools: Optional[List] = None,- tool_choice: Optional[str] = None,+ tool_choice: Optional[Union[str, dict]] = None,parallel_tool_calls: Optional[bool] = None,logprobs: Optional[bool] = None,top_logprobs: Optional[int] = None,