Smart routing with auto
Let the gateway choose a model that fits the request, with automatic failover.
How auto works
Set model to auto. The gateway works out what the request needs (tools, vision, JSON mode), keeps only models that support it and are currently deployable, then orders them by your organization's strategy. The first is used; the rest become automatic fallbacks if it errors or is cooling down.
curl -i https://api.eggsplain.com/v1/chat/completions \
-H "Authorization: Bearer $EGGSPLAIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"messages": [{ "role": "user", "content": "Hello" }]
}'The response headers show the decision: x-egg-requested-model: auto, x-egg-resolved-model (what actually ran) and x-egg-routing-strategy.
Strategies
| Parameter | Type | Description |
|---|---|---|
balanced | strategy | Default. A mix of quality, cost and speed. |
cheapest | strategy | Lowest-cost model that meets the request's requirements. |
fastest | strategy | Lowest-latency eligible model. |
quality | strategy | Highest-quality eligible model. |
Owners and admins set the strategy, preferred models, and cloud traffic split (split, AWS only, Azure only) in the console. Clients just send auto.
Pinning a model
Send a concrete ID such as sovereign/gpt-6-luna to bypass auto selection. Try both presets and compare the headers.