Zenaique

Order the lifecycle of a single extended thinking API call

Order steps·Easy·4.0 · 0·~1 min·Asked atBanana DevFractal AnalyticsTwo Sigma
Attempt it
  • 1Client sends the prompt with a thinking budget or effort setting attached
  • 2Usage metadata reports the reasoning token count, billed at the output rate
  • 3Provider hides or summarizes the raw reasoning in what it returns
  • 4Model generates internal reasoning (thinking) tokens before committing to an answer
  • 5Visible answer tokens stream back to the client
TL;DR

Send budget, model thinks internally, provider hides the trace, visible answer streams, usage metadata reports billed reasoning tokens last.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

Picture booking a consultant for a one-hour decision. Step one, you tell them how long they may spend thinking and what the question is. Step two, they close the door and work through the problem on a whiteboard. Step three, they erase the whiteboard before opening the door, you do not get to see their scratch work. Step four, they walk out and give you the answer. Step five, the receptionist hands you an invoice that counts both the closed-door time and the spoken answer. That is the entire lifecycle of an extended-thinking call. Budget in, deliberation hidden, answer visible, bill at the end.

Key concepts

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

Reasoning models look like normal chat completions on the outside, send a prompt, receive an answer, but internally they run a five-step lifecycle that explains why your bill, your latency, and your debuggability all differ from a standard chat call. Understanding this lifecycle is the prerequisite for every operational decision a reasoning-model deployment requires: cost dashboards, latency budgets, max-token settings, and incident response.

The five steps are: client sends prompt with budget, model generates hidden reasoning, provider hides or summarizes the trace, visible answer streams back, usage metadata reports the bill. The order is fixed across every major provider; the implementation policy at each step varies.

Step 1: the budget arrives with the prompt

Every reasoning provider exposes a knob that tells the model how much hidden thinking to spend. OpenAI's o-series uses reasoning_effort with discrete levels (minimal, low, medium, high). Anthropic Claude Opus 4.7 uses an explicit thinking budget measured in tokens. Gemini 3.1 Pro Thinking uses a thoughts budget. DeepSeek-R1 hosted endpoints toggle the feature with a boolean.

The budget is the most important production setting. It determines the upper bound on hidden thinking, which determines the upper bound on cost and the upper bound on latency. Per-class budget tuning is the central cost-control lever on the reasoning tier.

Clients also set max_tokens here, which is the completion-window cap shared by both thinking and visible tokens. The relationship between the two is the most-misunderstood operational concept in reasoning-model deployments: if max_tokens is smaller than the thinking budget plus the expected visible answer length, the visible answer can be truncated mid-stream or never emitted at all.

Step 2: the model generates hidden reasoning
Step 3: the provider hides or summarizes the trace
Step 4: visible answer tokens stream back
Step 5: usage metadata reports the bill
The complete reasoning-call lifecycle
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.

Real products, models, and research that use this idea.

  • OpenAI o-series reasoning calls return a redacted reasoning summary plus reasoning_tokens in usage; raw chain of thought is not exposed in 2026.
  • Anthropic Claude Opus 4.7 with extended thinking exposes a thinking budget in tokens and returns a redacted thinking block.
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QWhat changes if the provider exposes streaming of the reasoning trace incrementally?
A

Steps 2 and 4 interleave; client UX can show thinking progress, but the per-token billing still applies and total latency does not improve, only perceived latency does.

1 more follow-up an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Believing the reasoning trace streams back unfiltered. Providers hide or summarize it; what you see is the visible answer plus a token count for the hidden work.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • List the five lifecycle steps in order

  • Identify which step sets the thinking budget

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
Match each RL algorithm trait to PPO or GRPO.
Match pairs·Medium