Nick Hollon
ffaac42bf9
ci(infra): add pytest-xdist to partner test groups ( #36988 )
2026-04-24 13:23:03 +00:00
Mason Daugherty
7e81d09f2a
chore(deps): bump pytest to 9.0.3 ( #36801 )
...
CVE-2025-71176 (medium severity)
All are dev-only (test dependency group) — no impact on published
packages.
### Why syrupy was also bumped
syrupy 4.x (`<5.0.0`) constrains pytest to `<9.0.0`, blocking the CVE
fix. Widening to `<6.0.0` allows syrupy 5.x which supports pytest 9.x.
2026-04-15 21:46:40 -06:00
Mason Daugherty
b8698eacbd
release(ollama): 1.1.0 ( #36574 )
2026-04-06 22:34:32 -04:00
Mohammad Mohtashim
0aa482d0cd
feat(ollama): logprobs support in Ollama ( #34218 )
...
Closes #34207
---
Expose log probabilities from the Ollama Python SDK through
`ChatOllama`. The ollama client already returns a `logprobs` field on
chat responses for supported models, but `ChatOllama` had no way to
request or surface it.
## Changes
- Add `logprobs` and `top_logprobs` fields to `ChatOllama`, forwarded to
the client via `_build_chat_params`. Setting `top_logprobs` without
`logprobs=True` auto-enables it with a warning; setting it with
`logprobs=False` raises a `ValueError`
- Surface per-token logprobs on intermediate streaming chunks (both sync
`_create_chat_stream` and async `_create_async_chat_stream`) via
`response_metadata["logprobs"]`, accumulated into the final response on
`invoke()`
- Bump minimum `ollama` SDK from `>=0.6.0` to `>=0.6.1` — the version
that added logprobs support
---------
Co-authored-by: Mason Daugherty <mason@langchain.dev >
Co-authored-by: Mason Daugherty <github@mdrxy.com >
2026-04-06 17:06:51 -04:00
Mason Daugherty
d7575ffac9
chore(ollama): switch to ty ( #36571 )
2026-04-06 15:07:09 -04:00
Mason Daugherty
555bdfbade
chore: add comment explaining pygments>=2.20.0 ( #36570 )
2026-04-06 15:07:07 -04:00
John Kennedy
0f4f3f74c8
chore: pygments>=2.20.0 across all packages (CVE-2026-4539) ( #36385 )
...
## Summary
Bumps `pygments` to `>=2.20.0` across all 21 affected packages to
address [CVE-2026-4539](https://github.com/advisories/GHSA-XXXX ) — ReDoS
via inefficient GUID regex in Pygments.
- **Severity:** Low
- **Fixed in:** 2.20.0 (was 2.19.2)
- **Change:** Added `pygments>=2.20.0` to `constraint-dependencies` in
`[tool.uv]` for each package, then ran `uv lock --upgrade-package
pygments` to regenerate lock files.
Closes Dependabot alerts #3435–#3455.
## Release Note
Patch deps
### Test Plan
- [x] CI Green 🙏
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-03-30 23:26:59 -04:00
Mason Daugherty
1778b082ec
chore(partners): bump langchain-core min to 1.2.21 ( #36183 )
...
Bump the minimum `langchain-core` dependency to `>=1.2.21` across all 14
partner packages in the monorepo. Aligns partner lower bounds with the
latest core release so consumers pick up recent fixes (notably the
`ModelProfile` schema drift fix from core 1.2.21).
2026-03-23 19:39:35 -04:00
Mason Daugherty
5c018f5cd1
chore: enrich pyproject.toml files ( #34980 )
2026-02-02 13:07:05 -05:00
Mason Daugherty
3d687ea8fb
chore: update twitter URLs ( #34736 )
2026-01-13 01:54:11 -05:00
Mason Daugherty
18c25e9f10
chore: ban relative imports on all packages ( #34691 )
2026-01-09 17:02:24 -05:00
Mason Daugherty
5842110dbc
release(ollama): 1.0.1 ( #34330 )
2025-12-12 16:46:28 -05:00
Mason Daugherty
e023201d42
style: some cleanup ( #33857 )
2025-11-06 23:50:46 -05:00
Mason Daugherty
64e6798a39
chore: update pyproject.toml url entries ( #33587 )
2025-10-17 17:16:55 -04:00
Mason Daugherty
69c6e7de59
release(ollama): 1.0.0 ( #33567 )
2025-10-17 11:39:24 -04:00
Mason Daugherty
31eeb50ce0
chore: drop UP045 ( #33362 )
...
Python 3.9 EOL
2025-10-08 21:17:53 -04:00
Mason Daugherty
cda336295f
chore: enrich pyproject.toml files with links to new references, others ( #33343 )
2025-10-07 16:17:14 -04:00
Mason Daugherty
8bcdfbb24e
chore: clean up pyproject.toml files, use core a7 ( #33334 )
2025-10-07 10:49:04 -04:00
Mason Daugherty
90e4d944ac
chore(infra): pdm -> hatchling ( #33289 )
2025-10-05 23:52:52 -04:00
Mason Daugherty
eaa6dcce9e
release: v1.0.0 ( #32567 )
...
Co-authored-by: Mohammad Mohtashim <45242107+keenborder786@users.noreply.github.com >
Co-authored-by: Caspar Broekhuizen <caspar@langchain.dev >
Co-authored-by: ccurme <chester.curme@gmail.com >
Co-authored-by: Christophe Bornet <cbornet@hotmail.com >
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com >
Co-authored-by: Sadra Barikbin <sadraqazvin1@yahoo.com >
Co-authored-by: Vadym Barda <vadim.barda@gmail.com >
2025-10-02 10:49:42 -04:00
Mason Daugherty
48b77752d0
release(ollama): 0.3.9 ( #33200 )
2025-10-01 22:31:20 -04:00
Mason Daugherty
a9eda18e1e
refactor(ollama): clean up tests ( #33198 )
2025-10-01 21:52:01 -04:00
Mason Daugherty
986302322f
docs: more standardization ( #33124 )
2025-09-25 20:46:20 -04:00
Christophe Bornet
eaf8dce7c2
chore: bump ruff version to 0.13 ( #33043 )
...
Co-authored-by: Mason Daugherty <mason@langchain.dev >
2025-09-25 12:27:39 -04:00
Mason Daugherty
b92b394804
style: repo linting pass ( #33089 )
...
enable docstring-code-format
2025-09-24 15:25:55 -04:00
Mason Daugherty
781db9d892
chore: update pyproject.toml files, remove codespell ( #33028 )
...
- Removes Codespell from deps, docs, and `Makefile`s
- Python version requirements in all `pyproject.toml` files now use the
`~=` (compatible release) specifier
- All dependency groups and main dependencies now use explicit lower and
upper bounds, reducing potential for breaking changes
2025-09-20 22:09:33 -04:00
Mason Daugherty
115e20a0bc
release(ollama): 0.3.8 ( #32906 )
2025-09-11 16:00:41 -04:00
Mason Daugherty
7a158c7f1c
revert: "chore: remove ruff target-version" ( #32895 )
...
Reverts langchain-ai/langchain#32880
Not needed at the moment, will do when finishing v1
2025-09-10 20:56:48 -04:00
Christophe Bornet
b274416441
chore: remove ruff target-version ( #32880 )
...
This is not needed anymore since `requires-python` was added when moving
to `uv`.
2025-09-10 11:12:30 -04:00
Mason Daugherty
7851f66503
release(ollama): 0.3.7 ( #32651 )
2025-08-22 15:18:40 -04:00
Mason Daugherty
ee4c2510eb
feat: port various nit changes from wip-v0.4 ( #32506 )
...
Lots of work that wasn't directly related to core
improvements/messages/testing functionality
2025-08-11 15:09:08 -04:00
niceg
0d6f915442
fix: LLM mimicking Unicode responses due to forced Unicode conversion of non-ASCII characters. ( #32222 )
...
fix: Fix LLM mimicking Unicode responses due to forced Unicode
conversion of non-ASCII characters.
- **Description:** This PR fixes an issue where the LLM would mimic
Unicode responses due to forced Unicode conversion of non-ASCII
characters in tool calls. The fix involves disabling the `ensure_ascii`
flag in `json.dumps()` when converting tool calls to OpenAI format.
- **Issue:** Fixes ↓↓↓
input:
```json
{'role': 'assistant', 'tool_calls': [{'type': 'function', 'id': 'call_nv9trcehdpihr21zj9po19vq', 'function': {'name': 'create_customer', 'arguments': '{"customer_name": "你好啊集团"}'}}]}
```
output:
```json
{'role': 'assistant', 'tool_calls': [{'type': 'function', 'id': 'call_nv9trcehdpihr21zj9po19vq', 'function': {'name': 'create_customer', 'arguments': '{"customer_name": "\\u4f60\\u597d\\u554a\\u96c6\\u56e2"}'}}]}
```
then:
llm will mimic outputting unicode. Unicode's vast number of symbols can
lengthen LLM responses, leading to slower performance.
<img width="686" height="277" alt="image"
src="https://github.com/user-attachments/assets/28f3b007-3964-4455-bee2-68f86ac1906d "
/>
---------
Co-authored-by: Mason Daugherty <github@mdrxy.com >
Co-authored-by: Mason Daugherty <mason@langchain.dev >
2025-07-24 17:01:31 -04:00
Mason Daugherty
a6896794ca
release(ollama): 0.3.6 ( #32180 )
2025-07-22 13:24:17 -04:00
Mason Daugherty
491f63ca82
release(ollama): release 0.3.5 ( #32076 )
2025-07-16 18:45:32 -04:00
Mason Daugherty
8064d3bdc4
ollama: bump core ( #31929 )
2025-07-08 16:53:18 -04:00
Mason Daugherty
791c0e2e8f
ollama: release 0.3.4 ( #31928 )
2025-07-08 16:44:36 -04:00
Mason Daugherty
1f829aacf4
ollama[patch]: ruff fixes and rules ( #31924 )
...
* bump ruff deps
* add more thorough ruff rules
* fix said rules
2025-07-08 13:42:19 -04:00
Mason Daugherty
e7eac27241
ruff: more rules across the board & fixes ( #31898 )
...
* standardizes ruff dep version across all `pyproject.toml` files
* cli: ruff rules and corrections
* langchain: rules and corrections
2025-07-07 17:48:01 -04:00
Mason Daugherty
d0dce5315f
langchain-ollama[patch]: Add ruff bandit rules to linter ( #31811 )
...
- Add ruff bandit rules
2025-07-01 18:16:07 +00:00
Mason Daugherty
2fb27b63f5
ollama: update tests, docs ( #31736 )
...
- docs: for the Ollama notebooks, improve the specificity of some links,
add `homebrew` install info, update some wording
- tests: reduce number of local models needed to run in half from 4 → 2
(shedding 8gb of required installs)
- bump deps (non-breaking) in anticipation of upcoming "thinking" PR
2025-06-25 20:13:20 +00:00
ccurme
a401d7e52a
ollama: release 0.3.3 ( #31253 )
2025-05-15 16:24:04 -04:00
Sydney Runkle
7e926520d5
packaging: remove Python upper bound for langchain and co libs ( #31025 )
...
Follow up to https://github.com/langchain-ai/langsmith-sdk/pull/1696 ,
I've bumped the `langsmith` version where applicable in `uv.lock`.
Type checking problems here because deps have been updated in
`pyproject.toml` and `uv lock` hasn't been run - we should enforce that
in the future - goes with the other dependabot todos :).
2025-04-28 14:44:28 -04:00
rylativity
dbf9986d44
langchain-ollama (partners) / langchain-core: allow passing ChatMessages to Ollama (including arbitrary roles) ( #30411 )
...
Replacement for PR #30191 (@ccurme)
**Description**: currently, ChatOllama [will raise a value error if a
ChatMessage is passed to
it](https://github.com/langchain-ai/langchain/blob/master/libs/partners/ollama/langchain_ollama/chat_models.py#L514 ),
as described
https://github.com/langchain-ai/langchain/pull/30147#issuecomment-2708932481 .
Furthermore, ollama-python is removing the limitations on valid roles
that can be passed through chat messages to a model in ollama -
https://github.com/ollama/ollama-python/pull/462#event-16917810634 .
This PR removes the role limitations imposed by langchain and enables
passing langchain ChatMessages with arbitrary 'role' values through the
langchain ChatOllama class to the underlying ollama-python Client.
As this PR relies on [merged but unreleased functionality in
ollama-python](
https://github.com/ollama/ollama-python/pull/462#event-16917810634 ), I
have temporarily pointed the ollama package source to the main branch of
the ollama-python github repo.
Format, lint, and tests of new functionality passing. Need to resolve
issue with recently added ChatOllama tests. (Now resolved)
**Issue**: resolves #30122 (related to ollama issue
https://github.com/ollama/ollama/issues/8955 )
**Dependencies**: no new dependencies
[x] PR title
[x] PR message
[x] Lint and test: format, lint, and test all running successfully and
passing
---------
Co-authored-by: Ryan Stewart <ryanstewart@Ryans-MacBook-Pro.local >
Co-authored-by: Chester Curme <chester.curme@gmail.com >
2025-04-18 10:07:07 -04:00
ccurme
ca39680d2a
ollama: release 0.3.2 ( #30865 )
2025-04-16 09:14:57 -04:00
Sydney Runkle
8c6734325b
partners[lint]: run pyupgrade to get code in line with 3.9 standards ( #30781 )
...
Using `pyupgrade` to get all `partners` code up to 3.9 standards
(mostly, fixing old `typing` imports).
2025-04-11 07:18:44 -04:00
ccurme
a2bec5f2e5
ollama: release 0.3.1 ( #30716 )
2025-04-07 20:31:25 +00:00
ccurme
e8e3b2bfae
ollama: release 0.3.0 ( #30420 )
2025-03-21 15:50:08 +00:00
Lance Martin
46d6bf0330
ollama[minor]: update default method for structured output ( #30273 )
...
From function calling to Ollama's [dedicated structured output
feature](https://ollama.com/blog/structured-outputs ).
---------
Co-authored-by: Chester Curme <chester.curme@gmail.com >
2025-03-18 12:44:22 -04:00
Erick Friis
1a225fad03
multiple: fix uv path deps ( #29790 )
...
file:// format wasn't working with updates - it doesn't install as an
editable dep
move to tool.uv.sources with path= instead
2025-02-13 21:32:34 +00:00
ccurme
d172984c91
infra: migrate to uv ( #29566 )
2025-02-06 13:36:26 -05:00