Files
DeepTutor/deeptutor/learning
elvisgraho 3bfdb0fc29 fix: give lesson preparation and grading room for reasoning models
Source selection asks for at most 1800 output tokens and grading for 2200.
Reasoning models count hidden reasoning against max_tokens. On a real course
page set, nvidia/nemotron-3.5-super-vl (OpenRouter) stopped with
finish_reason=length in 5 of 5 runs after spending all 1800 tokens on
reasoning, so the reply had no JSON and preparation failed with "invalid
source-selection response". The #2367 retry lowers reasoning_effort to "low",
which this model does not honour: on a small probe it reasoned more, not less,
and in the app the retry failed the same way.

Raise both caps to 8192. Replaying the same request with an 8000-token cap
finished in 3 of 3 runs (2.4k-4.1k reasoning tokens), and full preparation
then completed for 4 of 4 objectives. max_tokens is a ceiling, so models that
answer briefly are unaffected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 21:04:06 +01:00
..
2026-09-06 13:46:29 +08:00
2026-06-11 20:03:34 +08:00
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-09-21 02:30:40 +08:00