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(utils.py): support passing response_format for together ai calls

Krrish Dholakia6d2ae5a0d87a
diff --git a/litellm/utils.py b/litellm/utils.py
index c1e1586b621..af602584556 100644
--- a/litellm/utils.py
+++ b/litellm/utils.py
@@ -3125,6 +3125,8 @@ def get_optional_params(
optional_params["tools"] = tools
if tool_choice is not None:
optional_params["tool_choice"] = tool_choice
+ if response_format is not None:
+ optional_params["response_format"] = response_format
elif custom_llm_provider == "ai21":
## check if unsupported param passed in
supported_params = get_supported_openai_params(