kmail.at
contact

elsewhere

EnglishEN
← learning

langchain · difficulty ◆◆

reasoning_effort: A Standard Chat Model Parameter

Dial reasoning depth without touching provider-specific params

You were hardcoding provider-specific thinking parameters that broke on every swap.

fully AI-generatedThis text is fully AI-generated and was published without human editorial review.

2026-07-21 · 8 min read

$ pip install -U langchain-core>=1.5.0
1.5.0
Release

langchain-core

#38887
PR

standard param

low/med/high
Levels

reasoning

What it does

reasoning_effort is a new standard parameter added across LangChain chat model implementations. Passing "low", "medium", or "high" to ChatOpenAI, ChatAnthropic, or any supporting model instructs the provider to allocate more or less compute to the internal reasoning chain. It maps to provider-specific knobs: OpenAI o-series thinking budget, Anthropic Claude extended thinking tokens, and Fireworks reasoning steps.

Why it matters

Different requests have different quality/latency trade-offs. A quick classification task does not need "high" reasoning; a complex multi-step planning task absolutely does. Before reasoning_effort, you had to know each provider\u2019s proprietary parameter name. Now LangChain abstracts it into one consistent interface so you can swap providers without rewriting your prompting strategy.

Example

$ Loop over low, medium, and high reasoning_effort for the same prompt.
[LOW] The sky appears blue because of Rayleigh scattering, where shorter blue wavelengths scatter more than other colors...\n[MEDIUM] The sky is blue primarily due to a process called Rayleigh scattering - when sunlight...\n[HIGH] The blue color of the sky is a fascinating consequence of atmospheric physics. Sunlight appears white but is actually...

Actual output varies by model version and provider.

Common flags

init_chat_model
Unified entry point to initialise any supported chat model
model_kwargs
Dict of provider-specific params passed through to the API
retry_with_reasoning_effort
Fallback handler retrying with a different effort on failure
set_debug
Enable debug logging to see parameters sent to the provider

History

Origin

Controlling reasoning depth meant provider-specific kwargs like max_tokens for thinking or thinking_depth, handled separately per integration.

The change

langchain-core 1.5.0 (PR #38887) promoted reasoning_effort to a standard parameter so providers map it to their own knobs transparently.

Under the hood

The unified dial

reasoning_effort is a dial from fast and snappy to deep and deliberate. LangChain reads the value and injects the correct provider kwarg (thinking tokens for OpenAI o-series, extended thinking for Anthropic, reasoning steps for Fireworks), so your app code stays provider-agnostic.

Fun facts

Pros & cons

pros

  • + Provider-agnostic reasoning control
  • + Cost and latency tuning
  • + Swap providers without rewrites

cons

  • − Not every model supports every level
  • − Output verbosity varies by provider

Takeaways

  1. 1Scope reasoning effort to task complexity
  2. 2Measure the latency difference
  3. 3Keep provider names out of app code

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 →

← all learning