From 2913965ae755bbd9d908e126100b4b19838ecebc Mon Sep 17 00:00:00 2001 From: Colin L Date: Wed, 29 Apr 2026 17:50:17 -0700 Subject: [PATCH] fix: raise MAX_TOKENS_LIMIT default from 4096 to 16384 4096 is below what Claude Code requests for many turns (especially agentic tool-use loops), and reasoning-style Nebius models like Kimi-K2.5, DeepSeek-V3.2, GLM-5, and Qwen3 thinking variants burn a chunk of the budget on hidden reasoning before producing visible output. Empirically a 64-token request to Kimi-K2.5 returns empty text because the entire budget is consumed by reasoning; the default should leave headroom for both that and Claude Code's own usage. 16k is a conservative middle ground. Provider-specific caps still apply; users with tighter quotas can lower this. Co-Authored-By: Claude Opus 4.7 (1M context) --- .env.example | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 7dc5ed02..06d451fd 100644 --- a/.env.example +++ b/.env.example @@ -19,7 +19,12 @@ HOST=0.0.0.0 PORT=8083 LOG_LEVEL=INFO #DEBUG -MAX_TOKENS_LIMIT=4096 +# Claude Code routinely requests >4k tokens per turn, especially with +# tool-use loops; reasoning-style models (Kimi-K2.5, DeepSeek-V3.2, +# GLM-5, Qwen3 thinking variants) also burn budget on hidden reasoning +# before producing visible output. 16k is a safer default; lower it if +# your provider's per-request cap is tighter. +MAX_TOKENS_LIMIT=16384 #MIN_TOKENS_LIMIT=4096 REQUEST_TIMEOUT=90 MAX_RETRIES=2