Latest model and suffixes
Name the newest model of a family, and steer which providers serve it.
- Ask for the newest model of a family.
- Add a suffix to steer the providers.
- Leave the retired suffixes out.
1. Ask for the newest model of a family
Write ~, the lab, and the family with -latest. The request goes to the newest model of that family, whichever it is the day you send it.
| You send | You get |
|---|---|
~anthropic/claude-sonnet-latest | the newest Sonnet |
~google/gemini-flash-latest | the newest Gemini Flash |
~openai/gpt-mini-latest | the newest mini model of OpenAI |
Each alias is a line of the catalogue: copy it from there, as you copy any model IDModel IDThe name a request calls a model by, lab/model, copied from Models.More on Models →.
import json
import os
import urllib.request
API_KEY = os.environ["OPENDUNES_API_KEY"]
ADDRESS = "https://opendunes.com/v1/chat/completions"
MODEL = "~anthropic/claude-sonnet-latest"
PROMPT = "Write a one-line welcome for a bakery in Tlemcen."
body = {
"model": MODEL,
"messages": [{"role": "user", "content": PROMPT}],
}
request = urllib.request.Request(
ADDRESS,
data=json.dumps(body).encode(),
headers={
"Authorization": "Bearer " + API_KEY,
"Content-Type": "application/json",
},
)
with urllib.request.urlopen(request) as response:
reply = json.load(response)
print(reply["model"])
print(reply["choices"][0]["message"]["content"])The answer's model names the model that really answered, as lab/model. Read it, and log it.
Use an alias for a prototype or a tool that should always be on the newest model. Use the full ID in production code whose answers you have tested.
An alias moves the day a newer model of its family arrives: the same request then gets a different model, a different style of answer and a different charge. usage.cost is the charge of the model that answered.
2. Add a suffix to steer the providers
A suffix goes after the model name, after a colon. It does not change the model; it changes which providers are tried first.
| Suffix | Tries first |
|---|---|
:nitro | the fastest provider. A priority endpoint may serve it, at that endpoint's price |
:floor | the cheapest provider. A flex endpoint may serve it, at that endpoint's price |
:exacto | the providers sorted for reliable tool calls |
Write it on the ID: anthropic/claude-sonnet-4.5:nitro. Among :nitro, :floor and :exacto, the last one wins.
A request that names no routing goes to the cheapest provider first. For an order of your own, a list to pick from or a ceiling on the price, use the provider field: Provider routing.
The key's list of models matches a model by its name without suffixes. A key that may use anthropic/claude-sonnet-4.5 may use anthropic/claude-sonnet-4.5:nitro.
When no provider meets the ordering you asked for, the request fails with a 503.
3. Leave the retired suffixes out
Four more suffixes exist in the supplier's names. None is for new code.
| Suffix | What happens | Use instead |
|---|---|---|
:online | web search results are attached; retiredRetiredA model withdrawn from sale. A call to its ID returns 404.More on Models → in favour of the web search helperHelperA tool run for you when a model reaches for it mid-answer: a web search, a page read, a sandbox. Named opendunes:‹name›.More on Helpers → | the web search helper: Helpers |
:thinking · :extended | a 404, unless the model's own page lists that exact name | the model's reasoning field: Parameters |
:free | a 404: no free model answers on the API | a paid model |
:batch | a 400 on a single request: only the batch routes pick this entry | send the plain ID; for a batch, Batches |
Errors
The body says why. What to do on every status: Errors and retries.
| Status | Means |
|---|---|
| 400 | a :batch name on a route that takes one request |
| 402 | the balanceBalanceWhat you can spend, in DA.More on Balance and charges → cannot cover the request |
| 403 | the key may not use the model |
| 404 | no such model or alias, a retired model, or a suffix that is not offered |
| 503 | no provider meets the ordering you asked for |