The maximum output token setting places a hard cap on how much the model can generate. Provider names differ, but the idea is the same: generation stops when the limit is reached.
If that happens, the finish reason normally indicates a length limit. The text may end mid-sentence, and JSON or tool arguments may be incomplete. A larger context window does not remove the need for a separate output cap.
Set the limit high enough for the expected response, then ask for a bounded structure or length in the prompt. Check the finish reason before parsing. Retrying with a larger limit may work for a read-only response, but continuing or repeating side-effectful agent work requires careful state handling.
Rewriting in plainer words…
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.