fix(huggingface): bump transformers and sentence-transformers lower bounds (#35522)

Bump `transformers` and `sentence-transformers` lower bounds in
`langchain-huggingface` to resolve a dependency conflict with
`huggingface-hub` 1.x. The existing constraints allowed
`huggingface-hub>=0.33.4,<2.0.0` (so hub 1.x is valid), but
`transformers` 4.x requires `huggingface-hub<1.0` — causing the
pre-release CI job to fail when `uv pip install --force-reinstall`
resolved hub to 1.5.0 while leaving `transformers` at 4.56.2.

Breaking change for users on transformers 4.x or
sentence-transformers<5.2.0 who install langchain-huggingface[full].
This commit is contained in:
Mason Daugherty
2026-03-02 10:45:06 -05:00
committed by GitHub
parent 93d63b9919
commit 6d39b72892
2 changed files with 105 additions and 134 deletions

View File

@@ -40,8 +40,8 @@ Reddit = "https://www.reddit.com/r/LangChain/"
[project.optional-dependencies]
full = [
"transformers>=4.39.0,<6.0.0",
"sentence-transformers>=2.6.0,<3.0.0",
"transformers>=5.0.0,<6.0.0",
"sentence-transformers>=5.2.0,<6.0.0",
]
[dependency-groups]
@@ -53,8 +53,8 @@ test = [
"scipy>=1.0.0,<2.0.0; python_version < \"3.12\"",
"scipy>=1.7.0,<2.0.0; python_version >= \"3.12\" and python_version < \"3.13\"",
"scipy>=1.14.1,<2.0.0; python_version >= \"3.13\"",
"transformers>=4.39.0,<6.0.0",
"sentence-transformers>=2.6.0,<3.0.0",
"transformers>=5.0.0,<6.0.0",
"sentence-transformers>=5.2.0,<6.0.0",
"langchain-core",
"langchain-tests",
"langchain-community",