SESK: Stuff Everyone Should Know · sesk.info/ai-max-tokens-cuts-off
If a reply hits the max_tokens limit, what happens?
It is cut off, maybe mid-sentence or even mid-word.
- It is cut off, maybe mid-sentence ✔
- The model rewrites it to fit
- The API returns an error and no text
Why: max_tokens is a hard stop, not a request to be brief. The model does not plan its answer around it, so if you want short replies, ask for them in the prompt.
Huh, didn't know that: Asking for a number of sentences or paragraphs works better than an exact word count, because models count tokens, not words.
I set max_tokens on my uncle's stories. Now they just stop in the middle of the best p
Like this card?
References
Answer: It is cut off, maybe mid-sentence. max_tokens is a hard stop, not a request to be brief. The model does not plan its answer around it, so if you want short replies, ask for them in the prompt.
- Claude API Docs: Reducing latency platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/reduce-latency
the response will be cut off, perhaps mid-sentence or mid-word, so this is a blunt technique
Checked 2026-10-10.
Think this answer is wrong? Tap "Challenge this answer" on the card in the game and tell us why.
More stuff everyone should know
That's stuff everyone should know.