diff --git a/litellm/utils.py b/litellm/utils.py index 7fd4dc5dc..8beb7c6d2 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -5265,7 +5265,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 # check safe_mode, random_seed: https://docs.mistral.ai/api/#operation/createChatCompletion safe_mode = passed_params.pop("safe_mode", None) random_seed = passed_params.pop("random_seed", None) @@ -5277,6 +5278,7 @@ def get_optional_params( optional_params["extra_body"] = ( extra_body # openai client supports `extra_body` param ) + elif custom_llm_provider == "groq": supported_params = get_supported_openai_params( model=model, custom_llm_provider=custom_llm_provider