Name opendunes/auto as the model, and the router picks one for each prompt.
The Auto Router picks the model for you. Send opendunes/auto as the model; the router classifies the prompt into a task type — debugging code, planning an agent's steps, answering a knowledge question, writing a report — and routes it to the models most spent on for that kind of task over the past week, with fallbacks.
| Model | Runs |
|---|---|
opendunes/auto | the router |
opendunes/auto-beta | the same router, on its next version first |
curl https://opendunes.com/v1/chat/completions \
-H "Authorization: Bearer $OPENDUNES_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "opendunes/auto",
"messages": [{ "role": "user", "content": "Write a SQL query that lists the top 10 wilayas by orders this month." }]
}'The answer's model is the model that served; everything else is an ordinary answer. To see the task type the prompt was given, send X-OpenDunes-Metadata: enabled — see Router Metadata.
Send them in a plugin: auto-router for opendunes/auto, auto-beta-router for opendunes/auto-beta. Each router reads only its own.
{
"model": "opendunes/auto",
"plugins": [
{
"id": "auto-router",
"allowed_models": ["anthropic/*", "openai/gpt-5*"],
"excluded_models": ["*/claude-haiku-*"],
"cost_tier": "medium"
}
],
"messages": [{ "role": "user", "content": "…" }]
}| Setting | Does |
|---|---|
allowed_models | only these models may be picked; anthropic/* matches a whole lab |
excluded_models | these never are, applied after allowed_models |
cost_tier | the price band: low, medium, high, xhigh or max. A band, not a ceiling — models cheaper than the band are left out too |
If your settings leave no model, the request answers 404.
The router may pick a different model on each turn. It prefers the model a conversation already landed on while that model stays among the best for the new prompt. Send the same session_id on every turn to mark the conversation.
You pay the model that served, at its own price in DA — the router adds nothing. provider.max_price still caps the price of the endpoints it may use.