{% extends "admin/base.html" %} {% from "partials/_macros.html" import pill, empty_state, notice %} {% block page %} {% if saved %}{{ notice('Saved. Settings reloaded.', tone='success') }}{% endif %} {% if error %}{{ notice(error, tone='danger') }}{% endif %}

{{ icon('plug-zap') }} Providers

Configure each upstream first — base URL, API key, timeouts. Connection badges below reflect whether each provider has enough config to attempt a request (no network probe). Use Test connection on each card for a live check. Secret values use ${ENV:NAME} references — the raw value is never stored in YAML.

{{ icon('sliders') }} Router

The classifier always runs (so traces stay intact). When the router is on, the requested model is overridden with the tier chosen for that classification. When off, the request's model field is honoured verbatim against the default tier's provider — useful for A/B comparison and for clients that need a specific model.

{{ icon('layers') }} Model tiers

Each tier (cheap, default, strong, deep) maps to one configured provider + model. Routes below point at a tier by name. Pick the provider first; the model dropdown then shows what that provider exposes, with per-1M-token prices inline so you can see the trade-off before you save. Pick Custom model id… at the bottom of the dropdown to type an unlisted model id.

{{ icon('network') }} Routes

Maps a logical route (e.g. brain.plan, brain.execute) to a tier defined above. Unknown tier names are rejected on save.

{{ icon('zap') }} Global limits

Process-wide throttles applied per API key. 0 disables.

Advanced — raw overlay editor

Fallback for debugging or scripting changes the structured editors don't cover. Saves to the same overlay file via the legacy form endpoint.

Current overlay file

{{ overlay_json }}
{% endblock %}