litellm-proxy-extras/build_and_publish.md
litellm-proxy-extrasThis runbook covers building and publishing a new version of the litellm-proxy-extras PyPI package. For use by litellm engineers only.
schema.prisma files are in sync (see migration_runbook.md Step 0)litellm-proxy-extras/ directoryUse commitizen to automatically bump the version across all files:
cd litellm-proxy-extras
cz bump --increment patch
This will automatically:
pyproject.toml (both [project].version and [tool.commitizen].version)../pyproject.toml (root)Then skip to Step 3 (Clean Old Artifacts).
Update the version in pyproject.toml:
cd litellm-proxy-extras
# Check current version
grep 'version' pyproject.toml
Edit pyproject.toml and bump the version (both [project].version and [tool.commitizen].version).
After bumping the version in litellm-proxy-extras/pyproject.toml, you must also update the version reference in the root pyproject.toml:
| File | Line to update |
|---|---|
pyproject.toml (root) | litellm-proxy-extras==X.Y.Z in [project.optional-dependencies].proxy |
# From the repo root — replace OLD with NEW version
sed -i '' 's/litellm-proxy-extras==OLD/litellm-proxy-extras==NEW/' pyproject.toml
Do NOT skip this step. The main
litellmpackage pins the extras version — if you don't update these, users will install the old version.
rm -rf dist/ build/ *.egg-info
uv build
This creates .tar.gz and .whl files in the dist/ directory.
Verify the build output:
ls -la dist/
uv tool run --from 'twine==6.2.0' twine upload dist/*
You will be prompted for your PyPI API token:
Enter your API token: pypi-...
Use
__token__as the username and your PyPI API token as the password.
cd litellm-proxy-extras
rm -rf dist/ build/ *.egg-info
uv build
uv tool run --from 'twine==6.2.0' twine upload dist/*
litellm-proxy-extras package? (y/n)If yes, run the following commands in order:
cd litellm-proxy-extras
rm -rf dist/ build/ *.egg-info
uv build
uv tool run --from 'twine==6.2.0' twine upload dist/*
When twine upload runs, enter your PyPI credentials:
__token__If no, you're done — no package publish needed.