LangChain Python v1 release information
langchain
langchain-core
langchain-anthropic
langchain-openai
.content_blocks
property on message objects. This property provides a
fully typed view of message content and standardizes modern LLM features across
providers, including reasoning, citations, server-side tool calls, and more.
There are no breaking changes associated with the new message content. Refer to
the message content docs for more info.
langgraph
chains and agents in langchain
. The surface area of
the langchain
package has been reduced to focus on popular and essential
abstractions. A new langchain-legacy
package is available for backward
compatibility. Refer to the new agents docs and to the
release notes
for more detail.
Dropped Python 3.9 support
Some legacy code moved to `langchain-legacy`
langchain
package features a reduced surface area that focuses on
standard interfaces for LangChain components (e.g., init_chat_model
and
init_embeddings
) as well as pre-built chains and agents backed by the
langgraph
runtime.Existing functionality outside this focus, such as the indexing API and
exports of langchain-community
features, have been moved to the
langchain-legacy
package.To restore the previous behavior, update package installs of langchain
to
langchain-legacy
, and replace imports:Before:Updated return type for chat models
BaseMessage
to AIMessage
. Custom chat models implementing bind_tools
should update their return signature to avoid type checker errors:Before:Default message format for OpenAI Responses API
langchain-openai
now defaults to
storing response items in message content
. This behavior was previously
opt-in by specifying output_version="responses/v1"
when instantiating
ChatOpenAI
. This was done to resolve BadRequestError
that can arise in
some multi-turn contexts.To restore previous behavior, set the LC_OUTPUT_VERSION
environment
variable to v0
, or specify output_version="v0"
when instantiating
ChatOpenAI
:Default `max_tokens` in `langchain-anthropic`
max_tokens
parameter in ChatAnthropic
will now default to new values
that are higher than the previous default of 1024
. The new default will
vary based on the model chosen.Removal of deprecated objects
`.text()` is now a property
.text()
method on message objects should be updated to drop the
parentheses:.text()
) will continue to function but now
emit a warning.langchain
release focuses on reducing LangChain’s surface area and
narrowing in on popular and essential abstractions.
create_react_agent
has moved from langgraph
to langchain
with
significant enhancements:
Enhanced structured output
create_react_agent
enhances coercion of outputs to structured data types:
ProviderStrategy
hintresponse_format
argument.handle_errors
arg to ToolStrategy
:
ToolMessage
asking model to
retry (unchanged)ToolException
by default instead of
retrying (prevents infinite loops)handle_tool_errors
arg to ToolNode
.
create_react_agent
no longer supports
pre-bound models with tools or configuration:
'v1'
label.