From 088bf9057fc879a49dd0d9fc1e2a0047a8f2aa09 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Sat, 4 Apr 2026 11:14:53 +0530 Subject: [PATCH] fix: vision tool respects auxiliary.vision.temperature from config (#4661) The vision tool hardcoded temperature=0.1, ignoring the user's config.yaml setting. This broke providers like Kimi/Moonshot that require temperature=1 for vision models. Now reads temperature from auxiliary.vision.temperature, falling back to 0.1. --- tools/vision_tools.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/vision_tools.py b/tools/vision_tools.py index 2bcf256b2..d3019b1d0 100644 --- a/tools/vision_tools.py +++ b/tools/vision_tools.py @@ -553,18 +553,23 @@ async def vision_analyze_tool( # Read timeout from config.yaml (auxiliary.vision.timeout), default 120s. # Local vision models (llama.cpp, ollama) can take well over 30s. vision_timeout = 120.0 + vision_temperature = 0.1 try: from hermes_cli.config import load_config _cfg = load_config() - _vt = _cfg.get("auxiliary", {}).get("vision", {}).get("timeout") + _vision_cfg = _cfg.get("auxiliary", {}).get("vision", {}) + _vt = _vision_cfg.get("timeout") if _vt is not None: vision_timeout = float(_vt) + _vtemp = _vision_cfg.get("temperature") + if _vtemp is not None: + vision_temperature = float(_vtemp) except Exception: pass call_kwargs = { "task": "vision", "messages": messages, - "temperature": 0.1, + "temperature": vision_temperature, "max_tokens": 2000, "timeout": vision_timeout, }