Skip to content

chore: enable LiteLLM on Python 3.14 - #14170

Merged
erichare merged 2 commits into
release-1.11.0from
agent/update-litellm-1.93.0
Jul 20, 2026
Merged

chore: enable LiteLLM on Python 3.14#14170
erichare merged 2 commits into
release-1.11.0from
agent/update-litellm-1.93.0

Conversation

@erichare

@erichare erichare commented Jul 20, 2026

Copy link
Copy Markdown
Member

Why

LiteLLM 1.93.0 is the first release above Langflow's existing floor that supports Python 3.14. Its PyPI metadata declares Requires-Python >=3.10,<3.15 and publishes CPython 3.14 Linux wheels, so the Docker Python 3.14 install no longer needs to exclude LiteLLM or features that depend on it.

What changed

  • require litellm>=1.93.0,<2.0.0 in langflow-base and the workspace override
  • lock LiteLLM 1.93.0 and resolve its Python 3.14 dependency graph
  • remove the Python 3.14 gates from LiteLLM, ToolGuard, Opik, and ALTK while retaining ALTK's Intel macOS exclusion
  • remove the corresponding import-test skips and stale explanatory comments
  • add regression coverage for the LiteLLM floor and Python 3.14 marker policy

Other Python 3.14 markers audited

The remaining markers are intentionally retained:

  • langchain-pinecone, CUGA, OpenDsStar, and LangWatch still declare Requires-Python <3.14 in the versions Langflow permits
  • ONNX Runtime still needs its version split because the Python 3.14-capable line drops Python 3.10
  • FAISS still needs its split: collapsing older Pythons onto the 3.14-capable release would raise supported macOS deployment targets, especially on Intel

Validation

  • installed and imported LiteLLM 1.93.0 on CPython 3.14.6 on macOS (built successfully from the published sdist)
  • created a locked CPython 3.14.3 environment with LiteLLM 1.93.0 and ToolGuard 0.2.21; imported both and the affected policy component
  • uv lock --check
  • uv sync --frozen --dry-run --all-extras --python 3.14 (688-package resolution succeeds)
  • 64 targeted tests passed on Python 3.14
  • Ruff check and format check passed
  • built langflow-base, lfx, and lfx-bundles wheels and verified their final Requires-Dist metadata

Summary by CodeRabbit

  • New Features

    • Optional integrations now support Python 3.14, including LiteLLM, ToolGuard, Opik, and ALTK where platform-compatible.
    • LiteLLM now requires version 1.93.0 or newer.
  • Bug Fixes

    • Improved dependency selection across supported Python versions and platforms.
    • Updated validation to ensure supported integrations load correctly without unnecessary skips.

@coderabbitai

coderabbitai Bot commented Jul 20, 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: 9fe45114-5c31-46d5-a98c-40789492f517

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 change removes Python 3.14 gating from selected optional dependencies, raises the LiteLLM minimum version, preserves platform restrictions, updates dependency-management fixtures, and adjusts component availability tests.

Changes

Optional dependency availability

Layer / File(s) Summary
Dependency declaration updates
pyproject.toml, src/backend/base/pyproject.toml, src/bundles/lfx-bundles/pyproject.toml, src/lfx/pyproject.toml
LiteLLM now requires >=1.93.0; ALTK, ToolGuard, and Opik no longer use the Python 3.14 marker, while ALTK platform restrictions remain.
Marker tooling and migration alignment
scripts/ci/*, scripts/migrate/consolidate_bundles.py
CI fixtures, expected dependency pinning, and curated ALTK metadata use the updated marker expressions.
Availability validation and test behavior
src/backend/tests/unit/**, src/lfx/src/lfx/interface/components.py
ToolGuard tests no longer skip when the dependency is absent, component import checks no longer bypass selected Python 3.14 components, and ALTK/LiteLLM availability assertions were updated.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested labels: bug

Suggested reviewers: jordanrfrazier

🚥 Pre-merge checks | ✅ 8 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 76.92% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (8 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main change: enabling LiteLLM on Python 3.14.
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.
Test Coverage For New Implementations ✅ Passed PR adds real regression tests for LiteLLM floor/markers and removes module-level toolguard skips so the affected unit tests now run.
Test Quality And Coverage ✅ Passed Tests cover the main dependency-marker changes with real assertions (idempotence, error paths, marker evaluation) and use pytest/pytest-asyncio consistently.
Test File Naming And Structure ✅ Passed All changed backend tests use pytest-style test_*.py naming, descriptive test names, and logical fixtures/classes; no frontend or integration test issues appeared.
Excessive Mock Usage Warning ✅ Passed Touched tests mostly remove skips; new regression tests use real pyproject parsing. Existing mocks are narrow doubles for external deps, not excessive.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/update-litellm-1.93.0

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.

@erichare
erichare marked this pull request as ready for review July 20, 2026 19:22
@erichare
erichare requested a review from Adam-Aghili July 20, 2026 19:23
@github-actions

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.

@erichare erichare added lgtm This PR has been approved by a maintainer chore Maintenance tasks and housekeeping and removed ignore-for-release labels Jul 20, 2026

@Adam-Aghili Adam-Aghili left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM over all just some minor comments on comments

Comment thread scripts/ci/update_lf_base_dependency.py
"langchain_community",
# Gated to python_version<'3.14' in pyproject.toml until
# upstream caps lift.
# Optional dependencies with platform-specific availability.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe the comment is confusing me but isn't litellm and toolguard still not allowed on Intel macOS? Maybe the old comment made more sense?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

LiteLLM and ToolGuard are allowed on Intel macOS now. The remaining Intel macOS exclusion is only on ALTK because of its PyTorch dependency. I clarified the comment in 1fa087a5f to make that distinction explicit.

@github-actions github-actions Bot added ignore-for-release and removed chore Maintenance tasks and housekeeping labels Jul 20, 2026
@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.34%. Comparing base (19579ab) to head (1fa087a).
⚠️ Report is 2 commits behind head on release-1.11.0.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##           release-1.11.0   #14170      +/-   ##
==================================================
+ Coverage           61.08%   61.34%   +0.25%     
==================================================
  Files                2386     2394       +8     
  Lines              237067   238037     +970     
  Branches            33477    36746    +3269     
==================================================
+ Hits               144817   146021    +1204     
+ Misses              90495    90261     -234     
  Partials             1755     1755              
Flag Coverage Δ
backend 68.72% <ø> (-0.01%) ⬇️
frontend 59.72% <ø> (+0.40%) ⬆️
lfx 59.87% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/lfx/src/lfx/interface/components.py 51.33% <ø> (ø)

... and 211 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 Jul 20, 2026

Copy link
Copy Markdown
Contributor

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 46%
46.82% (66559/142159) 70.1% (9324/13300) 45.21% (1526/3375)

Unit Test Results

Tests Skipped Failures Errors Time
5334 0 💤 0 ❌ 0 🔥 15m 30s ⏱️

@erichare
erichare merged commit 6c0d9ec into release-1.11.0 Jul 20, 2026
170 checks passed
@erichare
erichare deleted the agent/update-litellm-1.93.0 branch July 20, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ignore-for-release lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants