Skip to content

build(packaging): relax core runtime pins to ranges (rc2 backport of #27241) - #27545

Merged
yuneng-berri merged 1 commit into
litellm_1.84.0rc2from
litellm_/charming-sammet-8d77c3
May 9, 2026
Merged

build(packaging): relax core runtime pins to ranges (rc2 backport of #27241)#27545
yuneng-berri merged 1 commit into
litellm_1.84.0rc2from
litellm_/charming-sammet-8d77c3

Conversation

@yuneng-berri

Copy link
Copy Markdown
Collaborator

Summary

Backport of #27241 onto litellm_1.84.0rc2.

The 12 entries in [project.dependencies] are exact == pins, a side effect of the Poetry → uv migration. This forces every downstream package that lists litellm as a dependency to downgrade common runtime libraries (openai, pydantic, aiohttp, click, jsonschema, python-dotenv, …) to the exact versions we ship.

Switches to lower-bounded ranges with upper bounds on packages that are pre-1.0 or follow a breaking-major-version policy. Reproducibility for our Docker proxy and CI continues to come from uv.lock, which is regenerated here as a metadata-only diff (no resolved versions or hashes change).

See #27241 for full motivation, floor table, and validation methodology.

Conflict resolution vs upstream

git cherry-pick -m 1 40a490ae produced two uv.lock conflicts. Both were caused by entries that exist in staging but not in rc2 — they were unchanged context in the source PR, not part of #27241's intent:

  • nvidia-riva-client (stt-nvidia-riva extra)
  • soundfile (stt-nvidia-riva extra)

Those lines were dropped from the resolution; rc2's existing requires-dist entry set is preserved. Only the 12 specifier strings changed.

Test plan

  • uv lock --check after pyproject change — passes (392 packages, no resolved-version drift)
  • Diff vs rc2 limited to the 12 specifier rewrites in both pyproject.toml and uv.lock
  • CI green

Backport of #27241 onto litellm_1.84.0rc2.

The 12 entries in `[project.dependencies]` were exact `==` pins, a side
effect of the Poetry -> uv migration. This forces every downstream
package that lists litellm as a dependency to downgrade common runtime
libraries (openai, pydantic, aiohttp, click, jsonschema, ...) to the
exact versions we ship.

Switch to lower-bounded ranges with upper bounds where the upstream
package is pre-1.0 or has a known breaking-major-version policy.
Reproducibility for our Docker proxy and CI continues to come from
`uv.lock`, which is regenerated here as a metadata-only diff.

Conflict resolution vs upstream merge:
- The upstream merge commit also surfaced unrelated context entries
  (nvidia-riva-client, soundfile/stt-nvidia-riva extra) that exist in
  staging but not in rc2. Those are not part of #27241's intent and
  were dropped from the resolution; the rc2 uv.lock keeps its existing
  entry set, only the 12 specifier strings changed.
- `uv lock --check` passes (392 packages resolved, no drift).
@greptile-apps

greptile-apps Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This backport relaxes all 12 core runtime == pins in pyproject.toml to lower-bounded ranges, fixing a regression introduced during the Poetry → uv migration that forced downstream consumers to downgrade common libraries. The uv.lock update is metadata-only — resolved versions and hashes are unchanged, so Docker/CI reproducibility is unaffected.

  • pyproject.toml: 12 exact specifiers replaced with >=floor,<upper ranges; floors are set well below the previously-pinned versions to maximize downstream flexibility.
  • uv.lock: Only the requires-dist metadata section is updated to mirror the new specifiers; no resolved package versions or hashes changed.
  • CI is marked as pending in the test plan; the uv pip install --resolution=lowest-direct . validation claimed in the description should ideally be complemented by a functional smoke test against each floor before this ships.

Confidence Score: 4/5

Safe to merge for Docker/CI consumers since uv.lock hashes are unchanged; downstream SDK consumers picking up the lowest allowed versions of openai or jsonschema could hit runtime incompatibilities.

The lock file is unchanged in its resolved graph, so the proxy/Docker path is unaffected. The two observations — the openai floor being 13 minor versions below the last pin, and the jsonschema floor spanning a major referencing-subsystem rewrite — are real compatibility risks for downstream SDK consumers who resolve to the floor. Neither is a blocking issue for the project's own CI since uv.lock still dictates exact versions there.

The floor versions in pyproject.toml for openai and jsonschema deserve a second look, particularly whether a functional test at those exact floor versions has been run.

Important Files Changed

Filename Overview
pyproject.toml Switches 12 core runtime dependencies from exact == pins to lower-bounded ranges; floors are intentionally set below the previously-pinned versions to allow downstream consumers flexibility.
uv.lock Metadata-only update to requires-dist entries mirroring the pyproject.toml specifier rewrites; resolved versions and hashes are unchanged.

Reviews (1): Last reviewed commit: "build(packaging): relax core runtime pin..." | Re-trigger Greptile

Comment thread pyproject.toml
# Python with: `uv pip install --resolution=lowest-direct .`
"fastuuid>=0.14.0,<1.0",
"httpx>=0.28.0,<1.0",
"openai>=2.20.0,<3.0.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.

P2 openai floor is 13 minor versions below the previously pinned release

The floor >=2.20.0 is significantly below the formerly-pinned ==2.33.0. The openai Python v2 SDK adds new streaming types, response models, and client methods across minor versions. If litellm calls any method or reads any field introduced after 2.20.0, a downstream consumer installing at the floor will get a runtime AttributeError or ImportError. The PR description mentions uv pip install --resolution=lowest-direct . as validation — it would be worth confirming that a full litellm.completion() call (not just an import) succeeds against openai==2.20.0 before merging.

Comment thread pyproject.toml
"tokenizers>=0.21.0,<1.0",
"click>=8.0.0,<9.0",
"jinja2>=3.1.0,<4.0",
"aiohttp>=3.10,<4.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.

P2 jsonschema floor drops from 4.23.0 to 4.0.0 — referencing subsystem changed significantly mid-range

Between jsonschema 4.0.0 and 4.23.0, the library split out referencing as a separate dependency and rewired how $ref resolution works. Any schema validation code in litellm that relies on the post-split behavior (e.g., jsonschema.validate with cross-document $ref) may fail silently or raise an unexpected exception when resolved against 4.0.0–4.17.x. The floor could safely be raised to >=4.17.0 (when the referencing integration landed) or at minimum >=4.21.1 to narrow this window.

Comment thread pyproject.toml
"importlib-metadata>=8.0.0,<9.0",
"tokenizers>=0.21.0,<1.0",
"click>=8.0.0,<9.0",
"jinja2>=3.1.0,<4.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.

High: Sandbox escape in user-submitted prompt templates

Lowering this floor admits Jinja2 3.1.0 through 3.1.5, which contain the sandbox attr filter bypass fixed in 3.1.6. LiteLLM renders caller-supplied dotprompt_content through ImmutableSandboxedEnvironment in /prompts/test, so an authenticated user on an install resolved to those versions can submit a template that escapes the sandbox instead of being limited to prompt variables.

Suggested change
"jinja2>=3.1.0,<4.0",
"jinja2>=3.1.6,<4.0",

@veria-ai

veria-ai Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

High: Vulnerable Jinja2 versions allowed for prompt rendering

This PR relaxes core runtime dependency pins for package consumers. The new Jinja2 lower bound permits versions with a known sandbox bypass while LiteLLM renders caller-supplied dotprompt templates in a sandboxed Jinja environment.


Status: 1 new · 1 open
Risk: 7/10

@yuneng-berri
yuneng-berri merged commit 5bb2803 into litellm_1.84.0rc2 May 9, 2026
112 of 114 checks passed
@yuneng-berri
yuneng-berri deleted the litellm_/charming-sammet-8d77c3 branch May 9, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants