HKUDS/DeepTutor · error · ValueError
No model configured for reason tool
Error message
No model configured for reason tool
What it means
Error "No model configured for reason tool" thrown in HKUDS/DeepTutor.
Source
Thrown at deeptutor/tools/reason.py:81
Returns:
dict with keys ``query``, ``answer``, ``model``.
"""
from deeptutor.services.config import get_agent_params
from deeptutor.services.llm import get_token_limit_kwargs
from deeptutor.services.llm import stream as llm_stream
from deeptutor.services.llm.config import get_llm_config
# ---- resolve LLM config ------------------------------------------------
try:
llm_cfg = get_llm_config()
api_key = api_key or llm_cfg.api_key
base_url = base_url or llm_cfg.base_url
model = model or llm_cfg.model
except ValueError:
pass # caller must supply explicitly
if not model:
raise ValueError("No model configured for reason tool")
agent_params = get_agent_params("solve")
if max_tokens is None:
max_tokens = agent_params.get("max_tokens", 4096)
if temperature is None:
temperature = agent_params.get("temperature", 0.0)
# ---- build user prompt --------------------------------------------------
parts: list[str] = []
if context:
parts.append(f"## Context\n{context}")
parts.append(f"## Reasoning Focus\n{query}")
user_prompt = "\n\n".join(parts)
# ---- call LLM -----------------------------------------------------------
kwargs: dict[str, Any] = {"temperature": temperature}
if max_tokens:
kwargs.update(get_token_limit_kwargs(model, max_tokens))View on GitHub (pinned to 3e82f13042)
When it happens
Trigger: Thrown at deeptutor/tools/reason.py:81 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of HKUDS/DeepTutor@3e82f13042 (2026-08-27).
Data as JSON: /api/errors/6dc5ba0ba4fcd089.
Report an issue: GitHub.