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.

Verificado em 2026-11-30

·Referência da API·Modelos

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.

ModeloSaída máximaOutput price per million tokensIllustration: 32,000 output tokens at that price
claude-fable-5.2128K$20.00$0.64
claude-fable-5.1128K$30.00$0.96
claude-fable-5128K$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:

bash
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:

bash
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

JobstreamRecommended max_tokenseffortRecommended timeout if not streamed
A short question, a classification or a rewrite of a paragraphoptional16,000low5 minutos
A summary or review of a long document (30,000 input tokens or more)sim32,000 or morelow or medium15 minutos
Multi-step analysis, a hard proof, code across many filessim64,000 or morehigh15 minutos
The longest single reply the model can writesim128Kto suit the taskstream 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 Referência da API.

Perguntas e respostas

Its reasoning used the whole max_tokens before the answer began. Fable models always reason first and the reasoning counts toward the cap. Such a request now fails with reasoning_exhausted and, for up to 20 of them per account in a rolling 24 hours, is charged for input only; send it again with max_tokens of 32,000 or more for a long document, a lower effort, or both.

Yes, as output tokens at the model's output price, and they are in the output count of usage. The exception is a reply that ends with nothing visible at all: it fails with reasoning_exhausted and bills the input alone, for the first 20 such replies per account in any rolling 24 hours, and in full after that.

No. The Fable models reason on every request. The least reasoning comes from effort low: reasoning_effort on chat completions, output_config.effort on messages.

Stream it, so the answer arrives as it is written. If you cannot stream, we recommend at least 15 minutes, since an unstreamed reply only arrives once the reasoning and the whole answer are done.
Entre no Telegram
Ajuda