Thank you for your interest in contributing to litellm-rs!
- Rust 1.87+ (install via rustup)
- Docker and Docker Compose (for integration tests)
# Clone the repository
git clone https://github.com/majiayu000/litellm-rs.git
cd litellm-rs
# Quick profile (recommended for most contributors)
make build
make test
make lint
# Standard profile (gateway/common bundle)
make build-standard
make test-standard
make lint-standard
# Full profile (heavy, release/nightly validation)
make build-full
make test-full
make lint-full
# Format code
cargo fmt --all# Start PostgreSQL and Redis for development
make dev-services
# Stop services
make dev-stop- Follow Rust standard formatting (
cargo fmt) - All code must pass
cargo clippywithout warnings - Use meaningful variable and function names
- Add documentation comments for public APIs
We use Conventional Commits:
<type>(<scope>): <description>
[optional body]
Signed-off-by: Your Name <email@example.com>
feat: New featurefix: Bug fixdocs: Documentation onlystyle: Code style (formatting, etc.)refactor: Code refactoringperf: Performance improvementtest: Adding testschore: Maintenance tasks
git commit -m "feat(router): add weighted load balancing"
git commit -m "fix(auth): resolve JWT validation issue"
git commit -m "docs: update API examples"- Fork the repository
- Create a feature branch (
git checkout -b feat/my-feature) - Make your changes
- Run tests and lints
- Commit with DCO sign-off (
git commit -s) - Push and create a Pull Request
All commits must be signed off to certify you have the right to submit the code:
git commit -s -m "feat: add new feature"This adds Signed-off-by: Your Name <email> to the commit.
# Quick profile (lightweight default)
make test
# Standard gateway/common tests
make test-standard
# Full feature tests (heavy)
make test-full
# Run specific test (API-only profile)
cargo test test_name --no-default-features --features "lite"
# Run with logging (standard profile example)
RUST_LOG=debug cargo test --lib --tests --features "postgres sqlite redis s3 metrics tracing websockets analytics"- Create a new module in
src/core/providers/ - Implement the
Providertrait - Register in
src/core/providers/mod.rs - Add tests
- Update documentation
- Open an issue for bugs or feature requests
- Check existing issues before creating new ones
By contributing, you agree that your contributions will be licensed under the MIT License.