fix(camofox): honor auxiliary vision temperature\n\n- forward auxiliary.vision.temperature in camofox screenshot analysis\n- add regression tests for configured and default behavior

This commit is contained in:
kshitijk4poor 2026-04-20 12:49:33 +05:30 committed by Teknium
parent 9d88bdaf11
commit fd5df5fe8e
2 changed files with 72 additions and 2 deletions

View file

@ -545,9 +545,12 @@ def camofox_vision(question: str, annotate: bool = False,
try:
from hermes_cli.config import load_config
_cfg = load_config()
_vision_timeout = int(_cfg.get("auxiliary", {}).get("vision", {}).get("timeout", 120))
_vision_cfg = _cfg.get("auxiliary", {}).get("vision", {})
_vision_timeout = float(_vision_cfg.get("timeout", 120))
_vision_temperature = float(_vision_cfg.get("temperature", 0.1))
except Exception:
_vision_timeout = 120
_vision_timeout = 120.0
_vision_temperature = 0.1
response = call_llm(
messages=[{
@ -563,6 +566,7 @@ def camofox_vision(question: str, annotate: bool = False,
],
}],
task="vision",
temperature=_vision_temperature,
timeout=_vision_timeout,
)
analysis = (response.choices[0].message.content or "").strip() if response.choices else ""