LangChain 1.5 adds decision models and router middleware, and drops Python 3.10 (November 11, 2026)
langchain 1.5.0 and core 1.8.0 need Python 3.11, add decision models, and the router and auto mode middleware now need classifier=.
What changed
On November 11, 2026 LangChain released langchain 1.5.0. It needs langchain-core 1.8.0 or later. Both drop Python 3.10, so you need Python 3.11 or later. On Python 3.10, pip keeps resolving langchain 1.4.x.
The new langchain_core.decisions module adds BaseDecisionModel for typed, probabilistic answers: yes/no (Noul), choice (Choice), score (Score) and bounding box (Box).
Two middleware, released earlier in langchain-typesafe, now live in langchain.agents.middleware, marked beta:
ModelRouterMiddlewarepicks a model for each run from your configured choices and instructions.AutoModeMiddlewareclassifies configured tool calls and blocks the ones it judges risky.
Both now require an explicit decision model passed as classifier=. The experimental imports in langchain-typesafe are deprecated; TypeSafe 0.1 ships TypeSafeClassifier for this.
SummarizationMiddleware now accepts a separate model or a custom callable through summarizer=.
Prerequisites
- Python 3.11 or later
- A Python app that uses
langchain - No API key is needed for the upgrade itself
Steps
- Check your Python version with
python --version. Move to 3.11 or later if needed, including CI, Docker images and deploy runtimes. - Upgrade:
pip install -U "langchain>=1.5.0" "langchain-core>=1.8.0". - If you used the
langchain-typesafeexperimental middleware, import it fromlangchain.agents.middlewareinstead and passclassifier=TypeSafeClassifier().
Test it
Run pip show langchain and check it reports 1.5.0. Then start your agent with the middleware imported from langchain.agents.middleware and classifier= set: it should start without a deprecation warning.
Not confirmed
- Which providers besides TypeSafe ship a
BaseDecisionModel.
