models.yaml

Config resolution: -config flag > ./models.yaml > ~/.config/routsi/models.yaml. API keys are referenced by env-var name, never by value.

Reference

models.yaml
listen: ":8080"          # overridable with -listen / -port
default: gpt-cheap
sticky_ttl: 10m

tiers:                   # what "auto" routes over
  cheap: gpt-cheap
  strong: gpt-strong

models:
  - name: gpt-cheap
    type: forward                         # raw byte passthrough
    base_url: https://api.deepseek.com/v1
    api_key_env: DEEPSEEK_API_KEY         # env-var NAME, not the value
    upstream_model: deepseek-chat

  - name: gpt-strong
    type: forward
    base_url: https://api.openai.com/v1
    api_key_env: OPENAI_API_KEY
    upstream_model: gpt-5.2

Model types: forward (any OpenAI-compatible upstream), devin|codex|copilot|claude (local agent CLIs, see Agents as models), dynamic (a virtual model with levels, see Routing & stickiness), queue (a pull-worker, see Pull-workers), custom (an in-process Go handler). Use variants: or discover_models: true to expand one entry into many.

Keys are env-var names, not values

api_key_env and auth.tokens_env hold the name of an environment variable — routsi reads the value at request time and never prints it. Where those variables actually get set (shell export, an -env file, or .env layering) is covered in full on Auth & mTLS → Secrets via .env.

Next: Routing & stickiness →