fix(deps): require litellm>=1.93.0 for Python 3.14 support - #2950
Merged
Conversation
litellm ships its own Rust extension (litellm-rust python-bridge ->
litellm.rust_bridge._native, built via maturin/PyO3). Releases before
1.93.0 publish no cp314 wheel, so on Python 3.14 uv falls back to the
sdist and the build fails:
error: the configured Python interpreter version (3.14) is newer
than PyO3's maximum supported version (3.13)
1.93.0 adds cp314 wheels and a PyO3 that builds on 3.14. Raising the
floor fixes the failure at its source, so the interpreter no longer has
to be constrained.
That lets us drop the UV_PYTHON=3.13 workaround added in #2801: the
_set_uvx_python_compat() helper and its call sites are removed from the
claude-code, codex, cursor, and cursor-cli daemons, along with the tests
that pinned that behaviour. Dropping the pin costs nothing — litellm
publishes no macOS wheels at all, so macOS builds from the sdist on every
version regardless, while Linux now gets a real cp314 wheel instead of a
source build.
Also strengthen the build-api-python-versions CI matrix. It previously
ran only `uv build`, which just packages the source and passes even when
the dependency set cannot install or import on the target interpreter --
it would not have caught this. It now installs into a fresh venv,
byte-compiles, and runs an import smoke test on each version.
Verified on CPython 3.14.4 with UV_PYTHON unset: litellm 1.93.0 installs,
the Rust bridge builds, and hindsight_api plus the engine import cleanly.
Refs #2783
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The local daemon fails to start on systems where Python 3.14 is the default interpreter (#2783).
uvxresolves an old litellm, whose Rust extension refuses to build:Root cause
litellm ships its own Rust extension —
litellm-rust/crates/python-bridge→litellm.rust_bridge._native, built with maturin/PyO3. (Nottokenizers, which is a red herring:tokenizers0.23.1 has cp314 wheels and installs fine.)Two things worth knowing:
--dry-runcannot detect this. Resolution happily selects the sdist; only a real install surfaces the build failure.Fix
Raise the floor to
litellm>=1.93.0inhindsight-api-slimandhindsight-integrations/litellm, fixing the failure at its source rather than constraining the interpreter.This lets us drop the
UV_PYTHON=3.13workaround from #2801 —_set_uvx_python_compat()and its call sites are removed from the claude-code, codex, cursor, and cursor-cli daemons, along with the tests pinning that behaviour. Removing the pin costs nothing: macOS needed a Rust toolchain either way, and Linux now gets a real cp314 wheel instead of a source build.CI
build-api-python-versionsalready had 3.14 in its matrix, but ran onlyuv build— which packages the source and passes even when the dependency set cannot install or import on the target interpreter. It would not have caught this. It now installs into a fresh venv, byte-compiles, and runs an import smoke test on each version.Verification
UV_PYTHONunset → litellm 1.93.0 installs, Rust bridge builds,hindsight_api+ engine import cleanlylint.shcleanNote
The floor only protects
hindsight-apiversions published after this bump. The old pin lived in the integration wrapper, so it also shielded already-published versions (the daemon runsuvx hindsight-api@{version}). A user pinned to an olderhindsight-apion 3.14 will still resolve an old litellm until they move to a release carrying this floor — inherent to fixing it at the dependency level.Refs #2783