Conversation
litellm is no longer pure-Python: since the 1.9x line it builds via maturin and ships a PyO3/Rust extension (litellm.rust_bridge._native). The pyo3 crate enables abi3-py310, so upstream publishes a single cp310-abi3 wheel per arch (loadable on CPython 3.10-3.14) and no free-threaded wheel. Build shape (sdist -> bdist): - python_sdist (ubuntu-latest): build the sdist ourselves from the upstream v1.97.0 checkout. It is self-contained and arch-independent - bundles the committed litellm-rust/Cargo.lock (pinned crates, no floating resolve) and the prebuilt Next.js admin UI under litellm/proxy/_experimental/out/** - so the riscv64 bdist needs no npm/codegen. - build_wheels (ubuntu-24.04-riscv): one cibuildwheel run selecting cp312/cp313/cp314. It compiles the Rust once (-> cp310-abi3 wheel), reuses that wheel for the other interpreters (find_compatible_wheel "Skipping build step"), and still runs the test phase on each - one wheel out, load-tested on three CPythons. cp314t is excluded (no upstream free-threaded wheel; fastuuid and other riscv64 runtime deps have no cp314t wheels). Rust toolchain via rustup in CIBW_BEFORE_ALL_LINUX; musllinux skipped (no riscv64 musl host toolchain). - Smoke test exercises the compiled extension directly: the bridge loader swallows ImportError and returns None, so it asserts native_bridge_available() and calls _native.gil_stats() rather than relying on `import litellm` alone. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Member
Author
justeph
requested changes
Aug 21, 2026
Git tag has features=["extension-module"] (no abi3); upstream adds abi3-py310 only at release time. Building from source produced 3 per-interpreter wheels + 3x Rust compile. Set abi3-py312 on the sdist so maturin emits one cp312-abi3 wheel, deduped across cp312/313/314. - use pypa/cibuildwheel action with sdist as package-dir; drop manual tar + uv install - drop MANYLINUX_RISCV64_IMAGE override (cibuildwheel pins by digest) - CIBW_BUILD "cp312 cp313 cp314" + CIBW_SKIP musllinux - drop UV_* env and CIBW_BUILD_VERBOSITY Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
justeph
reviewed
Aug 21, 2026
Co-authored-by: Julien Stephan <jstephan@baylibre.com>
Member
Author
|
@justeph I updated based on your review and it's green, all good to go? |
justeph
approved these changes
Aug 24, 2026
justeph
left a comment
Collaborator
There was a problem hiding this comment.
thank you for fixing everything. LGTM
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.
What
Adds
.github/workflows/build-litellm.ymlto build litellm 1.97.0 riscv64 wheels and publish them topypi.riseproject.dev.Why litellm is special
As of the 1.9x line, litellm is no longer pure-Python: its build backend is maturin and it ships a PyO3/Rust extension (
litellm.rust_bridge._native, crate atlitellm-rust/crates/python-bridge). The pyo3 crate enablesabi3-py310, so upstream publishes exactly onecp310-abi3wheel per arch (loadable on CPython 3.10–3.14) and no free-threaded wheel.Build shape (sdist → bdist)
python_sdist(ubuntu-latest): builds the sdist itself from the upstreamv1.97.0checkout (never the prebuilt PyPI sdist). The sdist is self-contained and arch-independent — it bundles the committedlitellm-rust/Cargo.lock(pinned crates, no floating resolve; upstream's owntest-rust.ymlbuilds--locked) and the prebuilt Next.js admin UI underlitellm/proxy/_experimental/out/**— so the riscv64 bdist needs no npm/codegen.build_wheels(ubuntu-24.04-riscv): a singlecibuildwheelrun selectingcp312/cp313/cp314. It compiles the Rust once (→cp310-abi3wheel), reuses that wheel for the other interpreters (find_compatible_wheel→ "Skipping build step…"), and still runs the test phase on each — one wheel out, load-tested on three CPythons.cp314tis excluded (no upstream free-threaded wheel;fastuuidand other riscv64 runtime deps have no cp314t wheels yet). Rust toolchain installed viarustupinCIBW_BEFORE_ALL_LINUX; musllinux skipped (rustup ships no riscv64 musl host toolchain).publish: the sharedpublish-wheelsaction (dry-runs off PR branches).Testing
The bridge loader (
litellm/rust_bridge/loader.py) swallowsImportErrorand returnsNone, soimport litellmalone would pass even with a broken/missing_native. The smoke test therefore exercises the compiled extension directly: assertsnative_bridge_available() is Trueand calls the zero-arg native_native.gil_stats().Local validation done
yaml.safe_load+actionlintclean (only the expectedubuntu-24.04-riscvunknown-label warning).cp310-abi3.soloads on CPython 3.12 and the exactCIBW_TEST_COMMANDruns green with the full runtime-dep chain installed.--only-binaryfor cp312/cp313/cp314 (public PyPI + RISE registry).aws-lc-sys 0.43.0(pinned inCargo.lock) ships a prebuiltriscv64gc_unknown_linux_gnu_crypto.rsbinding at its tag, andring 0.17.14builds for riscv64.🤖 Generated with Claude Code