Configuration
Configuration uses TOML with a schema version. The validator rejects unknown fields and invalid values before the service starts.
An available example
Section titled “An available example”The repository includes tests/fixtures/config/valid-phase1.toml:
version = 1
[server]listen = "127.0.0.1:4000"request_timeout_ms = 120000max_body_bytes = 1048576max_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.
Select and validate the file
Section titled “Select and validate the file”Use an explicit path for reproducible results:
cargo run -p litegate-cli -- config validate --config tests/fixtures/config/valid-phase1.tomlThe 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.