Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion run_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -6786,7 +6786,14 @@ def _build_api_kwargs(self, api_messages: list) -> dict:
# This prevents thinking-capable models (Qwen3, etc.) from generating
# <think> blocks and producing empty-response errors when the user has
# set reasoning_effort: none.
if self.provider == "custom" and self.reasoning_config and isinstance(self.reasoning_config, dict):
# Only send think=false to Ollama — other custom providers
# (Mistral, Fireworks, Together.ai, vLLM) reject unknown params. (#11237)
_is_ollama = bool(
self._ollama_num_ctx
or "ollama" in self._base_url_lower
or ":11434" in self._base_url_lower
)
if _is_ollama and self.provider == "custom" and self.reasoning_config and isinstance(self.reasoning_config, dict):
_effort = (self.reasoning_config.get("effort") or "").strip().lower()
_enabled = self.reasoning_config.get("enabled", True)
if _effort == "none" or _enabled is False:
Expand Down
Loading