Skip to content

fix: enable IBM watsonx.ai bundle on Python 3.14 - #13512

Merged
erichare merged 2 commits into
release-1.10.0from
fix/ibm-bundle-python314
Jun 4, 2026
Merged

fix: enable IBM watsonx.ai bundle on Python 3.14#13512
erichare merged 2 commits into
release-1.10.0from
fix/ibm-bundle-python314

Conversation

@erichare

@erichare erichare commented Jun 4, 2026

Copy link
Copy Markdown
Member

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 its requires-python at <3.14, so on the 3.14 images ibm-watsonx-ai and langchain-ibm were silently excluded from the install closure and WatsonxAIComponent / WatsonxEmbeddingsComponent (and the Db2 Vector Store's LLM/embeddings path) self-disabled. This is the "works on pip install langflow, broken in Docker" shape for IBM.

As of 2026-06-03, upstream shipped 3.14 support:

Package 3.14-capable release requires_python
ibm-watsonx-ai 1.5.13 >=3.11,<3.15
langchain-ibm 1.1.0 >=3.10,<3.15

So the IBM bundle no longer needs to be gated out on 3.14.

Changes

  • Lift the python_version < '3.14' markers on ibm-watsonx-ai and langchain-ibm in both the lfx-ibm bundle (src/bundles/ibm/pyproject.toml) and langflow-base (src/backend/base/pyproject.toml).
  • Bump langchain-ibm ~=1.0.2~=1.1.0. The 3.14-capable release is 1.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.
  • Regenerate uv.lock. The universal resolver now forks ibm-watsonx-ai:
    • 1.5.13 for python_full_version >= '3.11' (includes 3.14)
    • 1.3.42 for python_full_version < '3.11' (preserves 3.10)

ibm-db was never python-gated (its marker is the linux/aarch64 wheel gap) and is unaffected.

Verification

uv lock resolves cleanly (804 packages). Resolving the bundle per–Python version:

# Python 3.14
lfx-ibm v0.1.0
├── ibm-db v3.2.9
├── ibm-watsonx-ai v1.5.13      ← 3.14-capable build now included
├── langchain-community v0.4.2
└── langchain-ibm v1.1.0
    └── ibm-watsonx-ai v1.5.13 (*)

# Python 3.10 (no regression)
├── ibm-watsonx-ai v1.3.42      ← falls back to the 3.10-compatible build
└── langchain-ibm v1.1.0

Scope / still blocked

These remain capped at <3.14 upstream and are intentionally left gated (verified against PyPI latest):

  • ibm-watsonx-orchestrate-core / -clients 2.10.0 — the watsonx Orchestrate integration (separate from this bundle)
  • langchain-pinecone 0.2.13, cuga 0.2.28, langwatch 0.24.0

Test plan

  • uv lock resolves without conflict
  • uv tree --package lfx-ibm --python-version 3.14 includes ibm-watsonx-ai + langchain-ibm
  • uv tree --package lfx-ibm --python-version 3.10 still resolves (older watsonx-ai build)
  • CI green
  • Smoke-test WatsonxAIComponent / WatsonxEmbeddingsComponent on a 3.14 build

Note: the same markers exist on main; this likely needs forward-porting once merged here.

Summary by CodeRabbit

  • Chores
    • Updated IBM WatsonX Orchestrate integration dependencies to support Python 3.14 without version restrictions.
    • Bumped langchain-ibm to version 1.1.0 and ensured compatibility with latest upstream releases.

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.
@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6acaa6cc-e794-4388-b396-0745b4fca2c9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

This PR updates IBM WatsonX integration dependencies across the Langflow base package and IBM bundle to remove Python 3.14 version gatting. ibm-watsonx-ai is now unconditionally required as >=1.3.1,<2.0.0, and langchain-ibm is upgraded from ~=1.0.2 to ~=1.1.0 without version markers, enabling Python 3.14 support.

Changes

Python 3.14 Support for WatsonX Components

Layer / File(s) Summary
Base package WatsonX dependencies
src/backend/base/pyproject.toml
ibm-watsonx-ai pinned to >=1.3.1,<2.0.0 and langchain-ibm upgraded to ~=1.1.0, with both dependencies no longer gated to python_version < '3.14'.
IBM bundle dependencies and documentation
src/bundles/ibm/pyproject.toml
Dependency comments expanded to document Python 3.14 support and lockstep versioning with the base package, then ibm-watsonx-ai and langchain-ibm constraints updated to match the base package versions without Python 3.14 gatting.

🎯 1 (Trivial) | ⏱️ ~3 minutes


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 2 warnings)

Check name Status Explanation Resolution
Test Coverage For New Implementations ❌ Error PR adds Python 3.14 support to dependencies but test files still skip imports with outdated comments about python_version<'3.14' gating, and README documents old restrictions. Update test_model_utils.py and test_watsonx_embeddings.py to remove obsolete skip logic and comments; update README.md to reflect Python 3.14 compatibility.
Test Quality And Coverage ⚠️ Warning Test skip statements and README still reference outdated python_version<'3.14' gating that the PR was supposed to enable, contradicting PR objectives and masking regressions. Update skip statements in test_model_utils.py, test_watsonx.py, test_watsonx_embeddings.py and README to remove outdated <3.14 gating references, as upstream now supports Python 3.14.
Test File Naming And Structure ⚠️ Warning Test files follow correct patterns but contain outdated skip logic referencing removed Python 3.14 gating, masking importability issues per review comments. Remove/update pytest.skip() and outdated gating comments in test_model_utils.py, test_watsonx_embeddings.py, test_watsonx.py; update README.md platform notes.
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately describes the main objective: enabling IBM watsonx.ai bundle support on Python 3.14 by removing version gates and updating dependencies.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Excessive Mock Usage Warning ✅ Passed Mocks used appropriately for external dependencies only (requests, WatsonxEmbeddings, logger). Core logic tested with real objects and simple test doubles, not excessive mocking.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ibm-bundle-python314

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the bug Something isn't working label Jun 4, 2026
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

✅ Test Coverage Advisor

No source changes detected without accompanying tests. Thanks for keeping coverage up! 🎉

Advisory check only — never blocks merge.

@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels Jun 4, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between f08e9e1 and 12eb449.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • src/backend/base/pyproject.toml
  • src/bundles/ibm/pyproject.toml

Comment on lines +99 to +100
"ibm-watsonx-ai>=1.3.1,<2.0.0",
"langchain-ibm~=1.1.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 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.toml

Repository: 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-17 and src/bundles/ibm/tests/test_watsonx_embeddings.py:11-14 still pytest.skip(..., allow_module_level=True) on ImportError with comments referencing python_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-38 also no longer documents the old <3.14 gating 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

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.05%. Comparing base (f08e9e1) to head (9a552f4).

❌ 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

Impacted file tree graph

@@                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     
Flag Coverage Δ
backend 64.88% <ø> (-0.07%) ⬇️
frontend 57.42% <ø> (+0.10%) ⬆️
lfx 53.69% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 261 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 43%
43.03% (57321/133211) 69.39% (7805/11247) 41.4% (1282/3096)

Unit Test Results

Tests Skipped Failures Errors Time
4924 0 💤 0 ❌ 0 🔥 12m 19s ⏱️

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.
@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels Jun 4, 2026
@erichare
erichare merged commit 09ae9cf into release-1.10.0 Jun 4, 2026
117 of 118 checks passed
@erichare
erichare deleted the fix/ibm-bundle-python314 branch June 4, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant