MAX_THINKING_TOKENS >= 64000 falls back to 21332 instead of using requested value
Resolved 💬 3 comments Opened Nov 7, 2025 by bukzor Closed Jan 9, 2026
Bug Description
When setting MAX_THINKING_TOKENS to 64000 or any higher value, the actual <max_thinking_length> value received in the system prompt falls back to 21332 instead of using the requested value.
Reproduction Steps
- Set
MAX_THINKING_TOKENS=63999- works correctly, value appears as 63999 - Set
MAX_THINKING_TOKENS=64000- fails, value falls back to 21332 - Set any value > 64000 - also falls back to 21332
Expected Behavior
Values >= 64000 should either:
- Be accepted and passed through to
<max_thinking_length>, OR - Show a clear error message indicating the maximum allowed value
Actual Behavior
Values >= 64000 silently fall back to 21332 with no error or warning.
Observed Values
Working values:
- 62251 ✓
- 63780 ✓
- 63971 ✓
- 63994 ✓
- 63999 ✓
Failing values:
- 64000 → falls back to 21332
- Any value > 64000 → falls back to 21332
Notes
There appears to be a threshold check at exactly 64000 that's causing this fallback behavior. The value 21332 appears to be a hardcoded default.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗