Long requests and thinking models: max_tokens and effort
Why an always-reasoning model can return no answer, how to size max_tokens and effort, and when to stream rather than wait on a long request.
A thinking model writes its reasoning before its answer, and on a long request that order decides whether an answer arrives at all. The Claude Fable models at https://api.uplinkswitch.com/v1 (claude-fable-5.2, claude-fable-5.1, claude-fable-5 and their uncensored builds) reason on every request; no parameter turns that off. This page covers how the reasoning shares max_tokens with the answer, what an unstreamed long request runs into, the effort setting on each endpoint, and the error you get when the reasoning uses the whole budget.
Reasoning is paid for out of max_tokens
max_tokens is one cap on everything the model writes in a reply: the reasoning and the answer together. The reasoning comes first. When the cap is small for the job, the model can spend all of it thinking and stop on the length limit (finish_reason: "length" on chat completions, stop_reason: "max_tokens" on messages) before a single word of the answer.
Reasoning tokens are output tokens. They count toward max_tokens, they appear in the output figure of usage, and they bill at the model's output price, even though the reasoning text itself is not part of the reply you read. That is why a reply can report thousands of output tokens and show a short answer.
How much reasoning a request takes grows with the input and with the effort, and on a long document it can run to many thousands of tokens before the first word of the answer. Our recommendation for a long document, not a limit, is a max_tokens of 32,000 or more; the only ceiling is the model's maximum output.
| Model | Max output | Output price per million tokens | Illustration: 32,000 output tokens at that price |
|---|---|---|---|
claude-fable-5.2 | 128K | $20.00 | $0.64 |
claude-fable-5.1 | 128K | $30.00 | $0.96 |
claude-fable-5 | 128K | $15.00 | $0.48 |
The maximum output and the prices come from the live catalog, GET https://api.uplinkswitch.com/v1/catalog, which needs no key. A large max_tokens is a ceiling, not a charge: you pay for the tokens the model actually writes.
When the reasoning uses the whole budget: reasoning_exhausted
A reply that stops on the length limit with no visible text, no tool call and no visible reasoning is not passed on to you as an empty success. An unstreamed request answers HTTP 400 with the code reasoning_exhausted; a streamed request ends with an error event carrying the same code. The error arrives in the wire format of the endpoint you called, so the OpenAI SDK and the Anthropic SDK each raise their usual API error, and the body states what was charged in charge_usd.
Such an answer is charged for its input tokens only, for at most 20 of them per account in any rolling 24 hours. Past that, a reply that runs out the same way is billed in full, input and output, and still returns the same error and explanation, so a loop that keeps resending a cap that is too small does not run for free. A request that is refused or fails is not charged at all.
Retry the same request with a higher max_tokens, a lower effort, or both. A request that ends on the length limit after part of the answer is a normal truncated reply, billed as usual; raise max_tokens for the rest.
Effort: how much the model reasons
Effort sets how long the model thinks before it answers. A lower effort means fewer reasoning tokens, an earlier answer and a smaller bill; a request that names no effort runs at the model's own default. Use low or medium for routine work such as summarizing, reviewing or extracting from a long text, and keep high for problems that need working through.
On /v1/chat/completions the setting is reasoning_effort:
curl https://api.uplinkswitch.com/v1/chat/completions \
-H "Authorization: Bearer sk-uplink-live-..." \
-H "Content-Type: application/json" \
-d '{"model":"claude-fable-5.2","stream":true,"max_tokens":32000,"reasoning_effort":"medium","messages":[{"role":"user","content":"Review this chapter for pacing and continuity: ..."}]}'On /v1/messages the same choice goes in output_config.effort:
curl https://api.uplinkswitch.com/v1/messages \
-H "x-api-key: sk-uplink-live-..." \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{"model":"claude-fable-5.2","stream":true,"max_tokens":32000,"output_config":{"effort":"low"},"messages":[{"role":"user","content":"Summarize this contract clause by clause: ..."}]}'Both take low, medium or high. The effort changes how much the model reasons, not the cap: max_tokens still has to leave room for the answer.
Streaming and client timeouts
Without streaming, the response is one piece. Nothing reaches your client until the model has finished reasoning and written the whole answer, and on a long document that takes minutes, not seconds. A client that gives up first never sees the answer, and many HTTP clients and workflow tools stop waiting after a few minutes by default.
With "stream": true the answer is delivered as it is written instead of all at once at the end, so a long reply never depends on one wait lasting long enough. Stream every long request your client can.
If your client cannot stream, we recommend a client timeout of at least 15 minutes for long Fable requests. The gateway itself allows an unstreamed request up to 10 minutes, so a client timeout above that is never the first to give up.
Which settings for which job
| Job | stream | Recommended max_tokens | effort | Recommended timeout if not streamed |
|---|---|---|---|---|
| A short question, a classification or a rewrite of a paragraph | optional | 16,000 | low | 5 minutes |
| A summary or review of a long document (30,000 input tokens or more) | yes | 32,000 or more | low or medium | 15 minutes |
| Multi-step analysis, a hard proof, code across many files | yes | 64,000 or more | high | 15 minutes |
| The longest single reply the model can write | yes | 128K | to suit the task | stream it |
These figures are recommendations to start from, not limits the gateway enforces. Each Fable model page carries the same guidance with that model's own numbers: Claude Fable 5.2, Claude Fable 5.1 and Claude Fable 5. Other reasoning models in the catalog say on their own pages how much room to leave. How the output cap differs from the context window is its own post: the context window and the max output. The other error codes are in the API reference.