सामग्री पर जाएँ

लेसन 7 · Generating Text

Models and Reasoning Effort

Compare OpenAI API models as of December 2026, set reasoning effort, understand reasoning tokens, and choose a model by testing quality, speed and cost.

The model argument has a big effect on quality, speed and price. OpenAI offers several general models and also specialized ones for images, speech and search vectors. There is no single best choice. The right model is the cheapest and fastest one that does your task well enough.

This lesson shows the main general models as of December 2026, explains reasoning effort, and gives you a method for choosing.

The general models

OpenAI's model page listed these flagship models as of December 2026. Prices are for standard processing, in US dollars per 1 million tokens, for requests with up to 272K input tokens. Longer requests cost more.

Model ID Described use Input Cached input Output
gpt-6.2-astra Complex reasoning and coding $8.00 $0.40 $40.00
gpt-6.2-sol Everyday work, coding and agents $2.00 $0.10 $10.00
gpt-6.1-terra Fast visual reasoning, computer use, writing $1.00 $0.05 $5.00
gpt-6-luna Efficient, high-volume tasks $0.10 $0.01 $0.50

The page lists a context window of 1.05M tokens and a maximum output of 128K for these four.

This table will age. Before you decide or budget, open the official model and pricing pages. Some older model IDs have announced shutdown dates, listed on the official deprecations page.

Reasoning models and effort

These models can spend reasoning tokens before they answer. Think of it as internal working. You do not see the raw reasoning, but it uses context space and is billed as output tokens.

You control depth with reasoning.effort.

Python
# Read-only
response = client.responses.create(
    model="gpt-6.2-sol",
    reasoning={"effort": "low"},
    input="Extract the city from: 'Ship it to our Lyon office.'",
)
print(response.output_text)
print(response.usage.output_tokens_details.reasoning_tokens)

The possible values are none, minimal, low, medium, high, xhigh and max, but each model supports only some of them. For example, the reasoning guide says GPT-6.2 Astra and GPT-6.2 Sol reject none with an error. Defaults also differ between models, so check the model's own page rather than assume.

In general, more effort means more time and more tokens. It can help with multi-step problems such as debugging or planning. It rarely helps a simple lookup. For a new GPT-6.2 integration, OpenAI's migration guide suggests starting at medium and then testing.

Some newer models also accept a reasoning.mode setting with a pro option that does more work on hard tasks at higher token use. It is separate from effort.

Reasoning summaries

You can ask for a short summary of the reasoning by setting reasoning.summary to "auto". Summaries are opt-in, and some models may require organization verification. A summary helps with debugging, but do not treat it as a complete or guaranteed record of how the answer was produced. Verify the answer itself.

Settings that changed

Older tutorials tune temperature or top_p to make output more or less varied. OpenAI's guide for GPT-6.2 says to omit temperature and top_p (and log probability settings) with these models. If you copy old code and get an error about an unsupported parameter, this is a likely reason. Steer style and consistency with clear instructions, schemas and tests instead.

How to choose a model

Use evidence, not a feeling from one chat.

  1. Collect examples. Take 20 to 100 realistic inputs, including hard and strange ones.
  2. Define success. For each, say what a good answer must contain or avoid.
  3. Start capable. Confirm that the task can be done well with a strong model.
  4. Go down. Try smaller models and lower effort on the same examples.
  5. Compare pass rate, time and cost together.
  6. Re-test whenever you change the model, prompt or settings.

This runnable helper applies that rule to results you would measure yourself. The numbers are invented to show the calculation. They are not measurements of any real model.

Python Pick the cheapest option that passes your bar

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Change MIN_PASS_RATE to 0.95 and see how the choice changes. Notice that some failures matter more than others. If one mistake is very costly, count it separately and require zero of them.

Routing between models

Some apps send easy work to a small model and hard work to a larger one. You might route by task type in your code, or escalate when a check fails. Keep routing rules simple and measurable. A confident small model can be wrong without any signal, so escalation should depend on checks you can run, such as schema validation or a business rule.

Keep the model ID in configuration

Python
import os

MODEL = os.environ.get("OPENAI_MODEL", "gpt-6.2-sol")

This lets you switch models without editing code in many places. Record the model name from each response in your logs, so you can connect behavior changes to model changes. Where a model offers dated snapshots, pinning one can make behavior more stable. Check which snapshots exist for your model.

Revisit the choice

A good choice does not stay good forever. New models appear, prices change and your own inputs drift. Repeat the comparison when OpenAI releases a model you might use, when a deprecation affects you, or when your quality or cost numbers move. Because you already have the examples and the rule for passing, this takes little effort. Keep a short record of what you tested, when, and why you chose it, so the next person does not have to guess.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. How are reasoning tokens billed?

    They are not shown in full, but they count as output tokens and use context space.
  2. 2. Does every reasoning model accept every effort value?

    Check the documentation for your model. Some reject none, for example.
  3. 3. Copied code sets temperature on a GPT-6.2 model. What should you do?

    The GPT-6.2 migration guide says to omit sampling settings such as temperature and top_p.
  4. 4. What is the best way to choose a model?

    Your task and your quality bar decide, and only tests on realistic input show them.

Summary

  • As of December 2026, the main general models range from large and capable to small and cheap.
  • Reasoning effort trades time and tokens for deeper work; support varies by model.
  • Reasoning tokens are billed as output.
  • Omit sampling parameters where the model guide says so.
  • Choose with your own test set, and keep the model ID in configuration.

Next: Structured Outputs with JSON Schema

आपकी प्रगति इसी ब्राउज़र में सेव होती है। खाते की ज़रूरत नहीं है।