Update dependency langchain-experimental to >=0.4.1,<0.5#2735
Update dependency langchain-experimental to >=0.4.1,<0.5#2735renovate[bot] wants to merge 1 commit into
Conversation
|
9157f31 to
d19c76e
Compare
13f0be5 to
f69a3f6
Compare
dc8bb8d to
93eda34
Compare
1ef9830 to
97fef88
Compare
OpenAPI ChangesNo changes detected Unexpected changes? Ensure your branch is up-to-date with |
| "jedi>=0.19.0,<0.20", | ||
| "langchain>=0.3.11,<0.4", | ||
| "langchain-experimental>=0.3.4,<0.4", | ||
| "langchain-experimental>=0.4.1,<0.5", |
There was a problem hiding this comment.
Bug: The upgrade of langchain-experimental may cause a runtime error in SemanticChunker because this functionality is not covered by integration tests, only mocked.
Severity: MEDIUM
Suggested Fix
Add an integration test that enables semantic chunking (CONTENT_FILE_EMBEDDING_SEMANTIC_CHUNKING_ENABLED = True) and invokes the document chunking logic without mocking SemanticChunker. This will validate the compatibility of the custom encoder with the new library version at test time.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: pyproject.toml#L57
Potential issue: Upgrading `langchain-experimental` to version 0.4.1 introduces a
potential runtime error. The `SemanticChunker` is used in `vector_search/utils.py` and
is instantiated with a custom `encoder` object. While one analysis suggests the custom
encoder might not conform to the `Embeddings` interface required by `SemanticChunker`,
another analysis states it does. However, both analyses agree that this code path is not
covered by tests with the actual `SemanticChunker` implementation, as it is mocked. This
lack of test coverage means that if there are any subtle breaking changes or
incompatibilities in the new version, they would not be caught by the CI/CD pipeline and
could lead to runtime errors in production when semantic chunking is enabled.
| "jedi>=0.19.0,<0.20", | ||
| "langchain>=0.3.11,<0.4", | ||
| "langchain-experimental>=0.3.4,<0.4", | ||
| "langchain-experimental>=0.4.1,<0.5", |
There was a problem hiding this comment.
Bug: The SemanticChunker is instantiated with a positional argument encoder, but the updated library version expects a keyword argument embeddings, which will cause a TypeError.
Severity: CRITICAL
Suggested Fix
In vector_search/utils.py, change the SemanticChunker instantiation to use a keyword argument. Modify the call from SemanticChunker(encoder, **settings.SEMANTIC_CHUNKING_CONFIG) to SemanticChunker(embeddings=encoder, **settings.SEMANTIC_CHUNKING_CONFIG).
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: pyproject.toml#L57
Potential issue: When semantic chunking is enabled via
`CONTENT_FILE_EMBEDDING_SEMANTIC_CHUNKING_ENABLED=True`, the code instantiates
`SemanticChunker` with a positional argument. However, the updated
`langchain-experimental==0.4.1` library requires this argument to be passed as a keyword
argument named `embeddings`. This mismatch will cause a `TypeError` at runtime, breaking
the content file embedding functionality entirely whenever this feature is used. The
issue is not caught by tests because `SemanticChunker` is mocked.
| "jedi>=0.19.0,<0.20", | ||
| "langchain>=0.3.11,<0.4", | ||
| "langchain-experimental>=0.3.4,<0.4", | ||
| "langchain-experimental>=0.4.1,<0.5", |
There was a problem hiding this comment.
Bug: The SemanticChunker is instantiated with a positional argument for the encoder, but the updated library expects this to be passed as the keyword argument embeddings, which will cause a TypeError.
Severity: HIGH
Suggested Fix
In vector_search/utils.py, change the instantiation of SemanticChunker to use the embeddings keyword argument. Update the call from SemanticChunker(encoder, **settings.SEMANTIC_CHUNKING_CONFIG) to SemanticChunker(embeddings=encoder, **settings.SEMANTIC_CHUNKING_CONFIG).
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: pyproject.toml#L57
Potential issue: The update to `langchain-experimental` to version 0.4.1 or higher
changes the constructor for `SemanticChunker`. The code instantiates it by passing an
`encoder` object as a positional argument. The new API expects this object to be passed
as a keyword argument named `embeddings`. This will cause a `TypeError` when the code is
executed. The functionality is currently behind a feature flag
`CONTENT_FILE_EMBEDDING_SEMANTIC_CHUNKING_ENABLED`, so the crash will only occur in
production when this flag is enabled. The issue is not caught by tests because all usage
of `SemanticChunker` is mocked.
| "jedi>=0.19.0,<0.20", | ||
| "langchain>=0.3.11,<0.4", | ||
| "langchain-experimental>=0.3.4,<0.4", | ||
| "langchain-experimental>=0.4.1,<0.5", |
There was a problem hiding this comment.
Bug: The upgrade of langchain-experimental to 0.4.1 is incompatible with the pinned version of langchain (<0.4), which will cause dependency installation to fail.
Severity: CRITICAL
Suggested Fix
To resolve the dependency conflict, the langchain package should be upgraded in pyproject.toml to a version compatible with langchain-experimental>=0.4.1. This likely means setting the constraint to langchain>=0.4.1 or a similar compatible range.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: pyproject.toml#L57
Potential issue: The update to `langchain-experimental>=0.4.1` in `pyproject.toml`
introduces a dependency conflict with the existing `langchain>=0.3.11,<0.4` constraint.
The newer version of `langchain-experimental` likely requires a newer version of the
core `langchain` library (e.g., `>0.4.x` or `>1.0.x`). This incompatibility will cause a
dependency resolution failure during installation, preventing the application from being
built or deployed. If the installation were to somehow bypass this, it would likely lead
to runtime import or API errors.
| "jedi>=0.19.0,<0.20", | ||
| "langchain>=0.3.11,<0.4", | ||
| "langchain-experimental>=0.3.4,<0.4", | ||
| "langchain-experimental>=0.4.1,<0.5", |
There was a problem hiding this comment.
Bug: The uv.lock file is out of sync with the updated langchain-experimental dependency in pyproject.toml, which will cause the CI build to fail.
Severity: HIGH
Suggested Fix
Regenerate the uv.lock file to align with the new dependency requirements in pyproject.toml. This can be done by running uv sync or uv lock --upgrade and committing the updated lock file.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: pyproject.toml#L57
Potential issue: The `pyproject.toml` file updates the `langchain-experimental`
dependency to require version `>=0.4.1,<0.5`. However, the `uv.lock` file was not
regenerated and still specifies the old version `0.3.4` with a constraint of
`>=0.3.4,<0.4`. The CI pipeline runs `uv sync --locked`, which enforces that the lock
file matches the project requirements. This version conflict will cause the dependency
installation step to fail, which will block the CI/CD pipeline.
This PR contains the following updates:
>=0.3.4,<0.4→>=0.4.1,<0.5Configuration
📅 Schedule: (in timezone US/Eastern)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.