Basic Server Settings
Host and Port
Control which network interface and port the server binds to:config.yaml
Network interface to bind. Empty string binds all interfaces (IPv4 + IPv6). Use
"127.0.0.1" or "localhost" to restrict to local-only access.TCP port for the HTTP/HTTPS server.
TLS Configuration
Enable HTTPS with TLS certificates:config.yaml
Enable HTTPS mode. When
true, server listens with TLS.Path to TLS certificate file (PEM format). Required when TLS is enabled.
Path to TLS private key file (PEM format). Required when TLS is enabled.
Authentication Directory
Specify where authentication tokens and session data are stored:config.yaml
Directory for authentication token files and session data. Supports
~ for home directory expansion.- OAuth tokens for providers (Google Gemini, etc.)
- Session state
- Authentication cache
Logging Configuration
Debug Mode
config.yaml
Enable debug-level logging and detailed error messages. Useful for troubleshooting but verbose in production.
File Logging
config.yaml
When
true, write logs to rotating files in ./logs/ instead of stdout.Maximum total size (MB) of log files. Oldest logs are deleted when limit is exceeded. Set to
0 to disable limit.WebSocket Configuration
config.yaml
Enable authentication for WebSocket API (
/v1/ws). Recommended to keep enabled for security.Usage Statistics
config.yaml
Enable in-memory usage statistics aggregation. When
false, usage data is discarded.Proxy Settings
Configure a global proxy for outbound requests:config.yaml
Global proxy URL. Supports
socks5://, http://, and https:// protocols.Individual providers can override the global proxy using their own
proxy-url setting.Request Retry Configuration
config.yaml
Number of retry attempts for requests that fail with specific HTTP errors (403, 408, 500, 502, 503, 504).
Maximum wait time in seconds before retrying a cooled-down credential.
0 means no limit.Streaming Configuration
Control SSE heartbeats and bootstrap retry behavior:config.yaml
Heartbeat interval in seconds for SSE streams. Set to
0 to disable keepalive messages.Number of retries before the first byte is sent to handle auth rotation.
0 disables bootstrap retries.Quota Exceeded Behavior
Configure automatic failover when API quotas are hit:config.yaml
Automatically switch to the next available project/credential when quota is exceeded.
Fallback to preview models (if available) when quota is exceeded on stable models.
Routing Strategy
Configure how credentials are selected when multiple match:config.yaml
Credential selection strategy. Options:
round-robin: Distribute requests evenly across credentialsfill-first: Use first credential until quota/error, then move to next
Priority list for “auto” model resolution. System checks models in order and picks the first active one. Supports
provider:model syntax.Model Prefix Enforcement
config.yaml
When
true, unprefixed model requests only use credentials without a prefix. When false, unprefixed requests can match any available credential.force-model-prefix: true:
- Request for
gemini-pro→ Only uses unprefixed Gemini credentials - Request for
team-a/gemini-pro→ Only uses credentials withprefix: "team-a"
Complete Example
config.yaml