Skip to content

build: migrate packaging, CI, and Docker from Poetry to uv#25007

Merged
krrish-berri-2 merged 35 commits intoBerriAI:litellm_oss_staging_04_09_2026from
stuxf:feat/uv-migration
Apr 9, 2026
Merged

build: migrate packaging, CI, and Docker from Poetry to uv#25007
krrish-berri-2 merged 35 commits intoBerriAI:litellm_oss_staging_04_09_2026from
stuxf:feat/uv-migration

Conversation

@stuxf
Copy link
Copy Markdown
Collaborator

@stuxf stuxf commented Apr 2, 2026

Relevant issues

Pre-Submission checklist

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

  • I have Added testing in the tests/test_litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • 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

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.

Type

🚄 Infrastructure

Changes

This PR migrates the repository from Poetry / ad hoc pip install paths to uv across packaging, CI, Docker, and contributor workflows.

Main changes:

  • Convert root and workspace package metadata from Poetry layout to PEP 621 + uv workspace metadata
  • Add and commit uv.lock, remove Poetry lockfiles, and move active install paths to uv sync --frozen
  • Update GitHub Actions, CircleCI, Makefile, publish scripts, devcontainer setup, and contributor docs to use uv
  • Migrate Docker build/install paths to uv and preserve runtime dependency parity for the proxy images
  • Fix the health-check image so dependencies are installed at build time, not resolved at container startup
  • Remove active Poetry / requirements.txt dependencies from release and validation paths
  • Tighten uv-related pinning for build and CI tooling
  • Add test-isolation fixes under tests/test_litellm/
  • Stub live image download dependencies in the Bedrock request-formatting test so it only validates request shaping

Local verification run:

  • uv lock --check
  • uv build --package litellm
  • uv build --package litellm-enterprise
  • uv build --package litellm-proxy-extras
  • uv run --no-sync pytest tests/test_litellm/test_main.py::test_url_with_format_param -q
  • docker build -f docker/Dockerfile.health_check -t litellm-healthcheck-test .

Notes:

  • The branch is intentionally split into focused commits for packaging, CI, Docker, docs, tests, and pinning hardening.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Apr 9, 2026 6:26pm

Request Review

@codspeed-hq
Copy link
Copy Markdown
Contributor

codspeed-hq Bot commented Apr 2, 2026

Merging this PR will improve performance by 10.7%

⚡ 1 improved benchmark
✅ 15 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
test_get_model_info_openai 88.7 µs 80.1 µs +10.7%

Comparing stuxf:feat/uv-migration (9932d46) with main (cd9c511)

Open in CodSpeed

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@stuxf stuxf marked this pull request as ready for review April 2, 2026 23:28
@stuxf stuxf requested a review from a team April 2, 2026 23:28
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 2, 2026

Too many files changed for review. (170 files found, 100 file limit)

@stuxf
Copy link
Copy Markdown
Collaborator Author

stuxf commented Apr 3, 2026

Looks like the CodSpeed benchmark regressions may be as a result of it running in a different environment

Comment thread .github/workflows/llm-translation-testing.yml Fixed
Comment thread .github/workflows/llm-translation-testing.yml Fixed
Comment thread .github/workflows/publish_to_pypi.yml Fixed
The conflict resolution imported only the function but the test body
references check_migration as a module throughout.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…Docker layer caching

- Move google-generativeai, Pillow, tenacity back to ci group (they are
  lazily imported and bloat the base SDK install needlessly)
- Remove nodejs-wheel-binaries from extra_proxy and proxy-dev (redundant
  in Docker where system Node.js is already installed via apk)
- Remove all nodejs-wheel node replacement and venv npm patching blocks
  from Dockerfiles since the wheel is no longer installed
- Add --no-default-groups to CodSpeed benchmark workflow so the benchmark
  environment matches the old minimal pip install footprint
- Apply standard uv two-phase Docker pattern: copy metadata first, install
  deps (cached layer), then copy source and install project
- Replace CircleCI enterprise no-op with proper uv sync command

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The old workflow used actions/cache/restore (read-only). The uv migration
changed it to actions/cache (read-write), which zizmor flags as a cache
poisoning risk. Restore the safer read-only variant.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread .github/workflows/llm-translation-testing.yml Fixed
…lert

The setup-uv action enables caching by default, which zizmor flags as a
cache poisoning risk. Disable it since we already use a read-only
cache/restore step.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Silences zizmor cache-poisoning alert. Publishing workflow runs
infrequently on protected branches so caching adds no real benefit.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add redis_caching_coverage to coverage combine list (from upstream)
- Remove e2e_ui_testing job (deleted upstream)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The logger was patched twice — first via mocker.patch() then via
mocker.patch.object(autospec=True). The second call fails because
autospec cannot inspect an already-mocked attribute. Remove the
redundant first patch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Dockerfile.non_root build ran out of disk on the CI runner. Remove
Android SDK, .NET, Boost, and GHC toolchains (~12GB) to free space.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@krrish-berri-2 krrish-berri-2 changed the base branch from main to litellm_oss_staging_04_08_2026 April 9, 2026 18:35
@krrish-berri-2 krrish-berri-2 changed the base branch from litellm_oss_staging_04_08_2026 to main April 9, 2026 18:35
@krrish-berri-2 krrish-berri-2 changed the base branch from main to litellm_oss_staging_04_09_2026 April 9, 2026 18:35
@krrish-berri-2 krrish-berri-2 changed the base branch from litellm_oss_staging_04_09_2026 to main April 9, 2026 18:36
@krrish-berri-2 krrish-berri-2 changed the base branch from main to litellm_oss_staging_04_09_2026 April 9, 2026 18:46
@krrish-berri-2 krrish-berri-2 merged commit a6c30b3 into BerriAI:litellm_oss_staging_04_09_2026 Apr 9, 2026
47 of 50 checks passed
Chesars added a commit that referenced this pull request Apr 25, 2026
Sync CI configs with upstream/litellm_internal_staging:
- Migrate from Poetry to uv (PR #25007)
- Pull in zizmor security fixes for workflows
- Add isolated unit test workflows + reusable bases
- Drop redundant matrix workflow and azure-batches workflow
- Drop .circleci/requirements.txt (replaced by uv lockfile)
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.

3 participants