mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-24 02:25:29 +00:00
feat(ollama): set 'think' to False when reasoning effort is not high/medium/low (#15763)
This commit is contained in:
@@ -188,7 +188,7 @@ class OllamaChatConfig(BaseConfig):
|
||||
if model.startswith("gpt-oss"):
|
||||
optional_params["think"] = value
|
||||
else:
|
||||
optional_params["think"] = True
|
||||
optional_params["think"] = value in {"low", "medium", "high"}
|
||||
### FUNCTION CALLING LOGIC ###
|
||||
if param == "tools":
|
||||
## CHECK IF MODEL SUPPORTS TOOL CALLING ##
|
||||
|
||||
@@ -183,7 +183,7 @@ class OllamaConfig(BaseConfig):
|
||||
if model.startswith("gpt-oss"):
|
||||
optional_params["think"] = value
|
||||
else:
|
||||
optional_params["think"] = True
|
||||
optional_params["think"] = value in {"low", "medium", "high"}
|
||||
elif param == "response_format" and isinstance(value, dict):
|
||||
if value["type"] == "json_object":
|
||||
optional_params["format"] = "json"
|
||||
|
||||
Reference in New Issue
Block a user