langchain · difficulty ◆◆
reasoning_effort as a Standard Chat Model Parameter
One dial to control how hard a reasoning model thinks - across every provider.
Reasoning models will happily burn tokens on the trivial - reasoning_effort is the dial that stops them.
fully AI-generatedThis text is fully AI-generated and was published without human editorial review.$ pip install -U langchain-core==1.5.4- 1.5.4
- release
- #38887
- PR
- low / medium / high
- levels
- multi-provider
- coverage
langchain-core
What it does
reasoning_effort is a new standard chat model parameter added to langchain-core (PR #38887). It controls how much thinking a reasoning-capable model performs before answering, using named levels - typically low, medium, and high. Because it is now a standard parameter on the base chat model interface, you can pass it uniformly across providers through the common ChatOpenAI/ChatAnthropic constructors or via bind, instead of reaching into provider-specific kwargs. Internally LangChain maps the standard value to each provider\u2019s native field.
Why it matters
Reasoning models are powerful but expensive and slow - every extra thinking token costs money and latency. In a real project you rarely want maximum reasoning on every call. reasoning_effort gives you a single provider-agnostic dial: use low for high-volume, low-stakes tasks (classification, extraction, summarization) to cut cost and latency, and high only for hard problems. Because it is standard, one code path works across providers and you can tune effort per request without vendor-specific branching.
Example
$ One parameter across OpenAI and Anthropicfast_model = ChatOpenAI(model="gpt-5-mini", reasoning_effort="low")
hard_model = ChatOpenAI(model="gpt-5", reasoning_effort="high")
claude = ChatAnthropic(model="claude-sonnet-4-5", reasoning_effort="medium")
The Q3 report shows revenue of $4.1 billion, up 12% year-over-year.The same standard parameter is accepted uniformly across providers.
$ Bind per-call without changing the base modelmodel = ChatOpenAI(model="gpt-5")
hard_call = model.bind(reasoning_effort="high")
# chain = prompt | fast_model works unchangedCommon flags
- #38887
- add reasoning_effort as a standard chat model parameter.
- bind
- Attach per-call kwargs without mutating the base model.
- init_chat_model
- Factory that instantiates a chat model by name across providers.
History
The cost of thinking
Reasoning models burst onto the scene with chain-of-thought under the hood, but their appetite for tokens made \u201calways think hard\u201d untenable. Providers each invented their own knob - OpenAI reasoning_effort, Anthropic thinking budget - with different names. Standardizing reasoning_effort across the base interface lets LangChain map one value to each provider\u2019s native control.
Under the hood
The mapping layer
Under the hood, LangChain takes the standard reasoning_effort value and maps it to each provider\u2019s native field - OpenAI\u2019s reasoning_effort, Anthropic\u2019s thinking budget, and so on. The base chat model interface now exposes reasoning_effort uniformly, so bind and the constructors accept it without vendor-specific kwargs.
Fun facts
Pros & cons
pros
- + One parameter across providers
- + Easy cost/latency tuning
- + Portable chains
cons
- − Provider semantics vary slightly
- − Not every model supports all levels
Takeaways
- 1Set reasoning_effort per task, not per app.
- 2Default to low and escalate to high only where it pays.
- 3Keep your code provider-agnostic by using the standard parameter.
Related commands
archive entry — written and published by a scheduled job, never editorially reviewed. Kept for reference: out of the site’s search index, and no ads run here. the reviewed library →
