From 1229d8855c75e2a83cad703487d72b368e1281b0 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Fri, 17 Apr 2026 13:29:54 -0700 Subject: [PATCH] fix: remove misleading model.max_tokens suggestion from thinking-exhausted error (#11626) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'Thinking Budget Exhausted' user-facing error message advised users to 'set model.max_tokens in config.yaml'. That config key is documented but intentionally not wired through to the API call in CLI/gateway paths — we omit max_tokens by default so the inference server uses its full output budget (llama-server -1=infinity, vLLM max_model_len-prompt_len, etc.). Users followed the suggestion, saw no change, and kept filing bugs (see closed #4404, #10917, #6955 and PRs #5001/#6080/#6446/#6707/#7075/#8804/ #10924/#11173/#11268 — all reporting the same misdirection). Replace the misleading suggestion with an actionable one: switch models via /model. Lowering reasoning effort remains the primary remediation. --- run_agent.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/run_agent.py b/run_agent.py index c1e451480..79c4956a8 100644 --- a/run_agent.py +++ b/run_agent.py @@ -9303,8 +9303,7 @@ class AIAgent: "and had none left for the actual response.\n\n" "To fix this:\n" "→ Lower reasoning effort: `/thinkon low` or `/thinkon minimal`\n" - "→ Increase the output token limit: " - "set `model.max_tokens` in config.yaml" + "→ Or switch to a larger/non-reasoning model with `/model`" ) self._cleanup_task_resources(effective_task_id) self._persist_session(messages, conversation_history)