Skip to content
ProductSeptember 30, 2026

Latest aliases: name a family, always get a live model

Models get retired or go down. A -latest alias calls the newest model in a family that is available right now, skips dead ones, and bills the model that answered.

Pinned ids break

If your code pins google/gemini-3.5-flash, you edit it every time a newer Flash ships, and it breaks the day that model is retired or goes down.

A latest alias names the family instead. Send google/gemini-flash-latest and AnyRouter calls the newest Gemini Flash model that can serve your request right now. If it is unavailable, AnyRouter tries the next newest model in the family automatically.

What you see and pay

The response model field is the concrete model that answered, for example google/gemini-3.8-flash, so logs and evals stay honest. Billing uses that model's price.

There are 19 aliases: google/gemini-flash-latest, google/gemini-flash-lite-latest, google/gemini-pro-latest, google/gemma-latest, deepseek/deepseek-latest, deepseek/deepseek-flash-latest, anthropic/claude-opus-latest, anthropic/claude-sonnet-latest, anthropic/claude-haiku-latest, openai/gpt-latest, openai/gpt-mini-latest, openai/gpt-nano-latest, qwen/qwen-max-latest, qwen/qwen-plus-latest, qwen/qwen-flash-latest, z-ai/glm-latest, z-ai/glm-flash-latest, moonshotai/kimi-latest and x-ai/grok-latest.

An alias can move to a newer model without notice, which may change output style, price, or supported parameters. Pin a concrete id for workloads that need stable behavior. A models fallback list you send yourself takes precedence.

Try it

import { createAnyRouter } from "@anyr/ai-sdk-provider"
import { generateText } from "ai"

const anyrouter = createAnyRouter()

const { text, response } = await generateText({
  model: anyrouter("anthropic/claude-sonnet-latest"),
  prompt: "Summarize this diff in three bullets.",
})
console.log(text, response.modelId)
generateText with a latest alias.
curl -fsSL https://anyrouter.dev/setup.sh | bash
anyr login
anyr claude --model "anthropic/claude-sonnet-latest"
A coding agent through the anyr CLI.

No terminal? Open the playground and send a first message.

Try in playground

Route your first request in 2 minutes

Start free with your own keys, or top up and pay per token. Get $4/mo in credits and free models on Go — $2/mo, or free when you donate a provider key.

Start free