Config fields
hlid loads hlid.toml (or hlid.yaml) from its working directory, then applies environment overrides.
Top level
| Field | Type | Default | Description |
|---|---|---|---|
bind_addr | string | 127.0.0.1:8080 | Address and port hlid listens on (loopback by default; the sample config binds 0.0.0.0:8080 for Docker) |
auth_key | string | unset | API key required on every request. Unset + loopback bind = auth skipped |
request_timeout_secs | integer | 120 | Max seconds to wait for an upstream response |
observe_buffer_size | integer | 1000 | How many request captures the ring buffer keeps |
[[backends]]
An ordered list — the first entry whose model_pattern matches wins.
| Field | Type | Required | Description |
|---|---|---|---|
model_pattern | string | yes | Glob matched against the requested model name. * is the catch-all |
url | string | yes | Base URL of the backend server |
dialect | string | yes | Protocol the backend speaks — see below |
credential_ref | string | no | Name of the env var holding this backend's API key |
Dialects
| Value | Protocol |
|---|---|
openai-chat | OpenAI Chat Completions (/v1/chat/completions) |
openai-responses | OpenAI Responses (/v1/responses) |
openai-completions | OpenAI Completions, legacy (/v1/completions) |
anthropic-messages | Anthropic Messages (/v1/messages) |
An invalid dialect string fails at startup, not at request time.
Environment overrides
| Variable | Overrides |
|---|---|
HLID_BIND_ADDR | bind_addr |
HLID_AUTH_KEY | auth_key |
Backend credentials are always read from the environment via credential_ref — they have no file-based form by design.
Full example
toml
bind_addr = "0.0.0.0:8080"
auth_key = "sk-hlid-my-secret-key"
request_timeout_secs = 120
observe_buffer_size = 1000
[[backends]]
model_pattern = "llama-*"
url = "http://localhost:8081"
dialect = "openai-chat"
[[backends]]
model_pattern = "claude-*"
url = "https://api.anthropic.com"
dialect = "anthropic-messages"
credential_ref = "ANTHROPIC_API_KEY"
[[backends]]
model_pattern = "*"
url = "http://localhost:8081"
dialect = "openai-chat"