Skip to main content

Contributing

Prerequisites

  • Rust toolchain — rustup.rs
  • Docker Desktop, or another reachable Postgres database
  • An Anthropic API key (for end-to-end testing)

Run the server locally

1. Clone and build
The Rust crate is named litellm-rust, and the binary is lite. 2. Create a config
config.yaml.example ships with local provider entries. The api_key, master_key, and database_url fields read from environment variables by default:
3. Start Postgres The compose Postgres service is reachable from other containers as postgres:5432 and from your host as 127.0.0.1:${POSTGRES_PORT:-15432}. Start only the database when you want to run the Rust gateway directly:
If that host port is already in use, pick another before starting compose:
The gateway runs database migrations on startup. 4. Start the server
Server listens on http://localhost:4000 by default. 5. Verify
The proxy exposes /v1/messages (Anthropic-native protocol). There is no /v1/chat/completions (OpenAI-compat) route yet.

Run tests

Most integration tests in tests/ spin up a local wiremock server — no real API calls needed. Postgres-backed tests are skipped unless TEST_DATABASE_URL is set. To run them against the compose database:

Add a provider

Drop a new folder under src/sdk/providers/:
build.rs auto-discovers the folder and wires it in. No other files need editing. See src/sdk/providers/anthropic/anthropic_messages/ for a reference implementation.

Project layout

See Internal SDK contract for runtime adapter types and event normalization.