Skip to content

chore: gitignore rust bridge build artifacts - #31349

Merged
ishaan-berri merged 1 commit into
litellm_internal_stagingfrom
litellm_gitignore-rust-bridge-artifacts-2b32
Jun 25, 2026
Merged

chore: gitignore rust bridge build artifacts#31349
ishaan-berri merged 1 commit into
litellm_internal_stagingfrom
litellm_gitignore-rust-bridge-artifacts-2b32

Conversation

@mateo-berri

Copy link
Copy Markdown
Contributor

Relevant issues

None; spotted while reviewing git status on a local checkout

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Screenshots / Proof of Fix

Before, the locally built Rust extension shows up as untracked:

$ git status
On branch litellm_internal_staging
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        litellm/rust_bridge/_native.cpython-312-darwin.so

After the change, the same artifact is ignored, and the rule matches as expected:

$ touch litellm/rust_bridge/_native.cpython-312-darwin.so
$ git check-ignore -v litellm/rust_bridge/_native.cpython-312-darwin.so
.gitignore:14:litellm/rust_bridge/_native*.so  litellm/rust_bridge/_native.cpython-312-darwin.so
$ git status --short
 M .gitignore

I also verified that no currently-tracked file becomes newly ignored:

$ git ls-files | git check-ignore --stdin -v
(no output)

Type

🧹 Refactoring
🚄 Infrastructure

Changes

The optional Rust extension (litellm-rust/ crates, exposed via litellm/rust_bridge/) compiles to a platform-specific shared library that the loader imports as litellm.rust_bridge._native, falling back to None when it's absent. Building it locally with maturin/cargo drops litellm/rust_bridge/_native.cpython-312-darwin.so (or the Linux/Windows equivalent) into the tree, where it showed up as an untracked file because nothing in .gitignore covered *.so, *.pyd, _native*, or the Rust target/ dir. These are regenerable build outputs and shouldn't be committed, so this adds rules for them

While in there I also removed the two stale .gitignore self-references. .gitignore is tracked, so listing it inside itself did nothing except add confusion (and won't suppress edits to the file either way)

Slack Thread

Open in Web Open in Cursor 

Ignore the compiled, platform-specific Rust extension output (litellm/rust_bridge/_native*.so/.pyd) and the litellm-rust/target/ build dir so local maturin/cargo builds don't show up as untracked files.

Also drop the two stale self-referential .gitignore entries; .gitignore is tracked, so ignoring it did nothing except add confusion.

Co-authored-by: Mateo Wang <mateo-berri@users.noreply.github.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@mateo-berri
mateo-berri requested a review from ishaan-berri June 25, 2026 21:05
@mateo-berri
mateo-berri marked this pull request as ready for review June 25, 2026 21:05
@greptile-apps

greptile-apps Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates .gitignore to cover locally-built Rust extension artifacts that were previously showing up as untracked files after a maturin/cargo build.

  • Adds patterns for litellm/rust_bridge/_native*.so and litellm/rust_bridge/_native*.pyd (platform-specific compiled extensions) and litellm-rust/target/ (Rust build output directory).
  • Removes two stale self-referential .gitignore lines that had no practical effect since .gitignore itself is tracked.

Confidence Score: 5/5

Safe to merge — the change only adds three new ignore patterns and removes two no-op self-references; no tracked files are affected and no source code is modified.

The change is confined to .gitignore. The new patterns are specific, well-scoped to the Rust build output paths, and the author verified with git ls-files | git check-ignore --stdin -v that no currently-tracked files are newly ignored. The self-referential .gitignore removals are purely cosmetic.

No files require special attention.

Important Files Changed

Filename Overview
.gitignore Adds ignore rules for Rust bridge build artifacts (_native*.so, _native*.pyd, litellm-rust/target/) and removes two duplicate self-referential .gitignore entries that had no effect

Reviews (1): Last reviewed commit: "chore: gitignore rust bridge build artif..." | Re-trigger Greptile

@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ishaan-berri
ishaan-berri merged commit f98e935 into litellm_internal_staging Jun 25, 2026
122 checks passed
@ishaan-berri
ishaan-berri deleted the litellm_gitignore-rust-bridge-artifacts-2b32 branch June 25, 2026 21:28
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.

4 participants