Skip to content

Configuration

Configuration uses TOML with a schema version. The validator rejects unknown fields and invalid values before the service starts.

The repository includes tests/fixtures/config/valid-phase1.toml:

version = 1
[server]
listen = "127.0.0.1:4000"
request_timeout_ms = 120000
max_body_bytes = 1048576
max_concurrent_requests = 16
[[providers]]
id = "mock"
kind = "openai-compatible"
base_url = "http://127.0.0.1:4100/v1"
locality = "local"
authentication = "none"
[[models]]
id = "mock-chat"
provider = "mock"
upstream_model = "mock-chat-v1"

The mock destination is example configuration: this file does not start a model server. LiteGate does not run or download user models either.

Use an explicit path for reproducible results:

Terminal window
cargo run -p litegate-cli -- config validate --config tests/fixtures/config/valid-phase1.toml

The LITEGATE_CONFIG environment variable is also available. Selection prioritizes --config, then that variable, and finally the platform path. When getting started, use --config to avoid ambiguity.

Validation does not check network availability, credentials or actual model capabilities. Provider secrets will be managed through the operating system’s credential store; do not add them to the example.