Different from context rejectionThe partial assistant message is kept and
turn/end records max-tokens.Three ceilings. The smallest wins.
maxTokensWhat this conversation asks the route to permit.effective output = min(request cap, provider cap, context − prompt − reserve)Follow the terminal signal.
lengthgeneration ceiling reachedturn/end: max-tokensnot completed successRoute one occurrence.
output = request capConfigured ceilingRaise carefully or split the output.prompt + output = contextHeadroom exhaustedCompact, shorten, or enlarge context.below both valuesProvider capInspect server metadata and logs.no output; request rejectedInput overflowUse the separate context guide.Recover with a bounded next turn.
Twelve regression gates.
- DeepSeek length maps.
- pi-ai length maps.
- Partial text persists.
- Truncated tools never run.
- Turn reason is durable.
- Later turn can complete.
- Explicit cap wins.
- Default provenance logs.
- Overflow stays distinct.
- Web names truncation.
- Headless is nonzero.
- Usage identifies ceiling.