Documentation Index
Fetch the complete documentation index at: https://to11.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Providers
A provider is a named entry in[providers.*] that tells the gateway how to reach an LLM API. It declares the base URL, which models the API serves, how to authenticate, and how long to wait for a response. Every request that passes through the gateway ultimately resolves to a provider.
Definition
Each provider is a named TOML table under the[providers] section. The table key becomes the provider’s identifier and is referenced by targets, routes, and the model-lookup system.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
base_url | string | Yes | The provider’s API base URL. |
models | array | Yes | Model names this provider handles. The gateway uses this list to resolve which provider serves a given model. |
credential | string | No | Credential location (see below). When omitted, the gateway uses a convention-based default. |
timeout_ms | integer | No | Request timeout in milliseconds. Defaults to the value in [defaults.provider], or 30 000 ms if that is also absent. |
auth_type | string | No | Authentication method: bearer (default), api_key_header, or query_param. |
auth_header_name | string | No | Custom header name when auth_type is api_key_header. Defaults to the provider’s standard header (e.g. api-key for Azure OpenAI). |
Credential resolution
The gateway never stores raw API keys in configuration files. Instead, credentials are referenced by location using theenv:: prefix.
Three patterns exist:
-
Convention default — When
credentialis omitted, the gateway derives the environment variable from the provider name.openairesolves toenv::OPENAI_API_KEY,anthropictoenv::ANTHROPIC_API_KEY, and so on for every known provider. -
Explicit env reference — Set
credential = "env::MY_CUSTOM_KEY"to point at a specific environment variable. -
No credential — For local providers like Ollama and vLLM, set
credential = "none". The gateway sends requests without anAuthorizationheader.
In passthrough mode the gateway resolves the provider’s credential leniently — if the environment variable is missing, the credential resolves to an empty string and the caller’s own
Authorization header is forwarded instead. Targets use strict resolution; see the Targets page.Auth types
Most providers use the defaultbearer type, which sends Authorization: Bearer <key>. Two alternatives exist for providers with different conventions:
api_key_header— Sends the key via a provider-specific header (e.g. Azure OpenAI’sapi-keyheader).query_param— Appends the key as a URL query parameter (e.g. Google Gemini’skey=parameter).
Timeout inheritance
When the gateway needs to determine the timeout for a request, it checks four levels in order:How providers relate to routing
Providers serve as the model registry — the foundation that all routing layers build upon.- Passthrough routing (L1) — The gateway looks up which provider registered a model and forwards the request with the caller’s own API key. No targets or routes are needed.
- Managed routing (L2) — Targets reference models that must exist in a provider’s
modelslist. Routes then group targets into strategies. The provider supplies the base URL and default credential. - Function routing (L3) — Functions reference either targets or model names. Model names are still resolved through the provider registry.
models list is unknown to the gateway and results in a 404 error.
Next steps
Models
Per-model overrides for timeouts and other settings.
Targets
Pairing models with gateway-owned credentials.
Configuration Reference
Full TOML configuration reference.