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 <narmstrong@Nates-MacBook-Pro.local>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
nate-berri 2026-10-05 16:42:22 -07:00 • committed by GitHub
parent c561372a02
commit 371b527d60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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",