Routing: rebuilt
Routing now learns from every failed attempt, keeps a conversation where its cache is warm, and falls back to the models you choose.
NagaAI Team · · Launch · 1 min read
Any provider can have a bad hour. Previously, when one failed, NagaAI tried another. Now routing learns from it: every failed attempt changes where the next request goes first, so a request is less likely to meet the same failure twice.
One request, one answer
When a provider times out, errors or hits its rate limit, NagaAI sends your request on by itself, up to three attempts in all. You get one answer or one clear error, and the attempts that failed cost nothing.
Long conversations answer sooner
Each new turn of a conversation goes first to the provider that answered the last one, as long as it's healthy and isn't more expensive. That's where your prompt is already cached, so follow-ups on a long context start answering sooner. See Conversations.
Your own plan B
Sometimes a whole model can't answer: it's down everywhere, its content filter refuses the request, or it can't take what you sent. Name up to three fallback models, and NagaAI moves down your list. It doesn't try them for problems that would fail on any model, such as a request that can't be read. You pay only for the model that answered.
Tell it what matters
When there's a choice, a routing strategy tells NagaAI what to favor: the best success rate, the quickest start to an answer, the fastest output, reuse of a cached prompt, or a balance of them. Set it on a request, on a key or on a whole workspace. Here a request favors reliability and falls back to a second model:
curl https://api.naga.ac/v1/responses \
-H "Authorization: Bearer $NAGA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-5.5",
"models": ["openai/gpt-6.2-sol"],
"routing": { "strategy": "reliability" },
"input": "Summarize this ticket in one line."
}'You set the rules, we run the route
You choose the model and the rules; NagaAI chooses the route and answers for the result. A request doesn't name a provider, and a response doesn't either.
Read Routing for the full order and every failure case.


