From 371b527d6055e785e1e2968aa9e729dd6c4dadca Mon Sep 17 00:00:00 2001 From: nate-berri Date: Mon, 5 Oct 2026 16:42:22 -0700 Subject: [PATCH] fix(build): rebuild the Rust bridge when uv sync sees Rust sources change (#44708) uv only rebuilds the editable litellm package when its cache keys change, and the default keys are pyproject.toml, setup.py and setup.cfg. Editing or switching to a branch with different Rust code left the old litellm/rust_bridge/_native.abi3.so installed. Key the build on the Rust toolchain pin, Cargo config, lockfile, workspace manifest and every file under litellm-rust/crates, since crates embed .sql, .json and .jinja files at compile time. Co-authored-by: Nate Armstrong Co-authored-by: Claude Opus 5.5 --- pyproject.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 3722dbca350..8543649d806 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -338,6 +338,14 @@ exclude = [ ] [tool.uv] +cache-keys = [ + { file = "pyproject.toml" }, + { file = "rust-toolchain.toml" }, + { file = ".cargo/config.toml" }, + { file = "litellm-rust/Cargo.lock" }, + { file = "litellm-rust/Cargo.toml" }, + { file = "litellm-rust/crates/**/*" }, +] constraint-dependencies = [ "tornado>=6.5.8", "aiohttp>=3.14.2,<4.0",