fix: enable IBM watsonx.ai bundle on Python 3.14 - #13512
Conversation
ibm-watsonx-ai (1.5.13) and langchain-ibm (1.1.0) added Python 3.14 support upstream on 2026-06-03, so the official 3.14 Docker image no longer needs to silently drop the IBM integration. - Lift the `python_version < '3.14'` markers on ibm-watsonx-ai and langchain-ibm in both the lfx-ibm bundle and langflow-base. - Bump langchain-ibm from `~=1.0.2` to `~=1.1.0`; the 3.14-capable release is 1.1.0, which the old `~=1.0.2` pin excluded. - Regenerate uv.lock: the resolver now forks ibm-watsonx-ai into 1.5.13 for py>=3.11 (incl. 3.14) and 1.3.42 for py<3.11, so 3.10 keeps working while 3.14 gains the integration. watsonx-orchestrate (ibm-watsonx-orchestrate-core/clients) stays gated at <3.14 since upstream 2.10.0 still caps there.
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThis PR updates IBM WatsonX integration dependencies across the Langflow base package and IBM bundle to remove Python 3.14 version gatting. ChangesPython 3.14 Support for WatsonX Components
🎯 1 (Trivial) | ⏱️ ~3 minutes Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 2 warnings)
✅ Passed checks (6 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Test Coverage AdvisorNo source changes detected without accompanying tests. Thanks for keeping coverage up! 🎉
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/backend/base/pyproject.toml`:
- Around line 99-100: Tests currently skip on ImportError with legacy
python_version<'3.14' gating which can hide real import regressions; update the
two test modules (test_model_utils.py and test_watsonx_embeddings.py) to remove
the pytest.skip(..., allow_module_level=True) import-based skip and instead
directly import/assert the IBM Watsonx client/package import path that should
now succeed per the pinned deps ("ibm-watsonx-ai" and "langchain-ibm"); remove
or update the inline comments referencing "<3.14" gating and replace with a
simple import/assert check (or an explicit failure message) so failures surface,
and similarly edit the IBM bundle README section describing `<3.14` gating to
reflect the new supported 3.14 importability.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 2f2eb39f-8bfd-451d-a68d-b80806c380b1
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (2)
src/backend/base/pyproject.tomlsrc/bundles/ibm/pyproject.toml
| "ibm-watsonx-ai>=1.3.1,<2.0.0", | ||
| "langchain-ibm~=1.1.0", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Check for stale 3.14-gating assumptions in tests/docs.
rg -n -C2 "python_version<'3\\.14'|Python 3\\.14\\+|not available on Python 3\\.14|upstream pins exclude 3\\.14|pytest\\.skip\\(" \
src/backend/tests/unit/base/models/test_model_utils.py \
src/bundles/ibm/tests/test_watsonx_embeddings.py \
src/bundles/ibm/README.md
# Confirm base and bundle Watsonx constraints are still aligned.
rg -n -C1 "\"ibm-watsonx-ai|langchain-ibm" \
src/backend/base/pyproject.toml \
src/bundles/ibm/pyproject.tomlRepository: langflow-ai/langflow
Length of output: 2720
Fix lingering Python 3.14 “upstream gated” skips in IBM Watsonx tests
src/backend/tests/unit/base/models/test_model_utils.py:12-17andsrc/bundles/ibm/tests/test_watsonx_embeddings.py:11-14stillpytest.skip(..., allow_module_level=True)onImportErrorwith comments referencingpython_version<'3.14'gating; this can mask real 3.14 importability regressions.- Update these tests to assert the newly supported 3.14 import path (and remove/adjust the outdated gating rationale/skip logic) in line with the dependency pins in
src/backend/base/pyproject.toml:99-100. - Ensure
src/bundles/ibm/README.md:29-38also no longer documents the old<3.14gating behavior.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/backend/base/pyproject.toml` around lines 99 - 100, Tests currently skip
on ImportError with legacy python_version<'3.14' gating which can hide real
import regressions; update the two test modules (test_model_utils.py and
test_watsonx_embeddings.py) to remove the pytest.skip(...,
allow_module_level=True) import-based skip and instead directly import/assert
the IBM Watsonx client/package import path that should now succeed per the
pinned deps ("ibm-watsonx-ai" and "langchain-ibm"); remove or update the inline
comments referencing "<3.14" gating and replace with a simple import/assert
check (or an explicit failure message) so failures surface, and similarly edit
the IBM bundle README section describing `<3.14` gating to reflect the new
supported 3.14 importability.
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (53.69%) is below the target coverage (60.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## release-1.10.0 #13512 +/- ##
==================================================
+ Coverage 57.99% 58.05% +0.05%
==================================================
Files 2280 2279 -1
Lines 218123 218873 +750
Branches 30984 32252 +1268
==================================================
+ Hits 126502 127062 +560
- Misses 90183 90374 +191
+ Partials 1438 1437 -1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
The watsonx test modules skipped at module load (pytest.skip with allow_module_level=True) when langchain-ibm / ibm-watsonx-ai failed to import, with comments tying the skip to the upstream <3.14 cap. Now that those deps are importable on 3.14 (this PR's dep bump), the import-based skip can hide real import regressions instead of surfacing them. - test_model_utils.py, test_watsonx.py, test_watsonx_embeddings.py: replace the try/except pytest.skip(allow_module_level=True) guards with direct top-level imports so a missing or broken IBM SDK fails loudly. Drop the now-unused `import pytest` in test_model_utils.py. - src/bundles/ibm/README.md: update the platform note to reflect that the watsonx components are now importable on Python 3.10-3.14. The Db2 tests (test_db2*, test_optional_dependency) are left untouched -- they gate on ibm-db's linux/aarch64 platform exclusion, not the Python version, which is still valid. Validated locally (Python 3.13): 63 tests pass (13 + 50), ruff clean.
Problem
The official Langflow Docker images run Python 3.14 (
python:3.14-slim-trixie, since #13085). Until recently, the IBM watsonx.ai integration capped itsrequires-pythonat<3.14, so on the 3.14 imagesibm-watsonx-aiandlangchain-ibmwere silently excluded from the install closure andWatsonxAIComponent/WatsonxEmbeddingsComponent(and the Db2 Vector Store's LLM/embeddings path) self-disabled. This is the "works onpip install langflow, broken in Docker" shape for IBM.As of 2026-06-03, upstream shipped 3.14 support:
requires_pythonibm-watsonx-ai>=3.11,<3.15langchain-ibm>=3.10,<3.15So the IBM bundle no longer needs to be gated out on 3.14.
Changes
python_version < '3.14'markers onibm-watsonx-aiandlangchain-ibmin both thelfx-ibmbundle (src/bundles/ibm/pyproject.toml) andlangflow-base(src/backend/base/pyproject.toml).langchain-ibm~=1.0.2→~=1.1.0. The 3.14-capable release is1.1.0; the old~=1.0.2(>=1.0.2,<1.1.0) pin excluded it, so dropping the marker alone would not have helped.uv.lock. The universal resolver now forksibm-watsonx-ai:1.5.13forpython_full_version >= '3.11'(includes 3.14)1.3.42forpython_full_version < '3.11'(preserves 3.10)ibm-dbwas never python-gated (its marker is the linux/aarch64 wheel gap) and is unaffected.Verification
uv lockresolves cleanly (804 packages). Resolving the bundle per–Python version:Scope / still blocked
These remain capped at
<3.14upstream and are intentionally left gated (verified against PyPI latest):ibm-watsonx-orchestrate-core/-clients2.10.0 — the watsonx Orchestrate integration (separate from this bundle)langchain-pinecone0.2.13,cuga0.2.28,langwatch0.24.0Test plan
uv lockresolves without conflictuv tree --package lfx-ibm --python-version 3.14includesibm-watsonx-ai+langchain-ibmuv tree --package lfx-ibm --python-version 3.10still resolves (older watsonx-ai build)WatsonxAIComponent/WatsonxEmbeddingsComponenton a 3.14 buildSummary by CodeRabbit
langchain-ibmto version 1.1.0 and ensured compatibility with latest upstream releases.