Skip to content
47% off: the complete course for $79 (reg. $149)Order now →
AI Builder
Module 1Full course9 min read

Output Controls: Max Tokens, Stop Sequences, and Effort

The knobs you actually have over a model's output in 2026 — length limits, stop sequences, effort levels, and why sampling parameters like temperature are disappearing.

If you learned LLM APIs a couple of years ago, your mental toolkit probably has a temperature slider in it, maybe top_p, and the trick of starting the assistant's reply yourself to force a format. On current Claude models, all three are gone: send them and you get a 400 error. Other providers are moving the same way for their reasoning models.

What you have instead is a smaller, more honest set of controls: a hard length cap, stop sequences, an effort level, thinking settings, and structured output formats. This lesson covers what each one actually does, how to set them per feature, and what to do when you used to reach for temperature. You'll finish with a per-feature output configuration you can drop into any app.

The controls you actually have

Here's the full map, for the Anthropic Messages API:

ControlFieldWhat it controlsHard or soft
Length capmax_tokensMaximum tokens generated, thinking includedHard: generation stops
Stop sequencesstop_sequencesStrings that end generation when producedHard
Effortoutput_config.effortHow thorough the model is: thinking, length, number of tool callsSoft: a behavioral signal
ThinkingthinkingWhether and how thinking runs, and whether you see a summary of itVaries by model
Output formatoutput_config.formatConstrains the answer to a JSON schemaHard
Instructionssystem and messagesEverything else: tone, length, structureSoft

Notice what's missing: nothing controls randomness directly. On current Claude models you get consistency from clear instructions and constrained formats, not from a sampling dial. More on that below.

Structured output formats get their own lessons in Module 4, so this lesson focuses on the rest.