npm / @langchain/ollama
@langchain/ollama
What changed in @langchain/ollama 0.3 to 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.
1 breaking1 security5 new APIs and options2 behavior and defaults5 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@langchain/ollama 113 changes
Breaking changes 1
When aborted during streaming with streaming callback handlers, invoke() throws ModelAbortError containing the accumulated partialOutput; an already-aborted signal is checked immediately.
New APIs and options 5
Structured output now supports standard schema, allowing developers to use standard schemas with Ollama.
The Ollama LLM class now supports the think parameter.
Adds support for specifying a custom baseUrl.
Adds support for native structured outputs in Ollama.
Thinking content is separated into the reasoning_content field.
Behavior and default changes 2
Adds native streamEvents event conversion for Ollama.
Runnable traces include package version metadata in LangSmith trace metadata, stamped at construction time.
Fixes and other changes 5
Preserves tool_calls when AIMessage content is a string.
stream() throws a regular AbortError when aborted, and streaming loops check abort signals so cancellation returns early.
Sets additional_kwargs.reasoning_content when using streamEvents via createAgent.
Reasoning tokens are now properly elevated.
Fix compatibility with moduleResolution set to node.
@langchain/ollama 0.31 changes
Security 1
A fix for CVE 2025 12735 was included.