Configuration
All configuration is environment-driven and validated once at startup by
Config.from_env; a missing required variable fails fast with its name.
Required
Variable |
Meaning |
|---|---|
|
DynamoDB table of API-key digests |
|
DynamoDB table for the usage ledger and rollups |
|
Cloud Map namespace of GPU gateways (only when no local model) |
|
Cloud Map service GPU gateways register into (only when no local model) |
Local model execution
Variable |
Meaning |
|---|---|
|
checkpoint URI; when set, |
Optional
Variable |
Default |
Meaning |
|---|---|---|
|
|
listen port for |
|
|
per-attempt timeout for workers and the LLM provider |
|
|
request-body cap (413 above it) |
|
|
Cloud Map result cache |
|
|
API-key lookup cache; |
|
|
workers tried per request on connection failure |
|
|
per-customer token-bucket rate; |
|
|
token-bucket burst capacity |
|
— |
LLM provider credential; unset returns 503 on LLM paths |
|
|
OpenAI-compatible provider base |
|
|
model allowlist |
|
|
request-ledger TTL |
Semantics worth knowing
Auth caching applies to both hits and misses, so a revoked key keeps working for at most
AUTH_CACHE_SECONDSand an invalid key cannot hammer DynamoDB.Retry policy: only connection-level failures move to the next worker. An HTTP error from a worker is authoritative and returned as-is, because re-running a scoring request elsewhere could duplicate work.
Rate limiting is per-customer and in-memory — one gateway machine enforces it exactly; horizontal replicas each carry their own bucket.
/v1/modelsresponses are filtered toOPENAI_ALLOWED_MODELSso the provider’s full catalog is never exposed to customers.