Smart routing

Smart routing lets you call a capability instead of a specific model. Routic automatically picks the best available model for that capability.

Why smart routing

ScenarioCanonical model nameSmart routing name
Model goes offlineHard-coded model name → request failsRoutic switches to a replacement automatically
New model addedMust update code to use itAutomatically benefits from better models
Provider outageAll requests to that provider failRoutic falls back to another provider's equivalent

In short: canonical names give you control; smart routing gives you resilience.

Available routing names

Routing nameCapabilityRouting strategyCurrently includes
auto/reasoningComplex reasoning, math, logicPrefers the strongest reasoning modeldeepseek-r1, qwq-32b, etc.
auto/chatEveryday chat, summarization, content generationPrefers the best cost-performance ratiodeepseek-v3 series, etc.

The models behind each routing name are updated continuously as the catalog grows — no code changes needed on your end.

Usage

Replace the model parameter with a routing name. The request format is identical:

curl -X POST "https://api.routic.ai/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxxxx" \
  -d '{
    "model": "auto/reasoning",
    "messages": [
      { "role": "user", "content": "Analyze the time complexity of this code and suggest optimizations." }
    ]
  }'

Python (OpenAI SDK)

from openai import OpenAI

client = OpenAI(
    base_url="https://api.routic.ai/v1",
    api_key="sk-xxxxxxxx",
)

# Reasoning task → automatically picks the strongest reasoning model
response = client.chat.completions.create(
    model="auto/reasoning",
    messages=[{"role": "user", "content": "Prove that √2 is irrational."}],
)

# General chat → automatically picks the best value model
response = client.chat.completions.create(
    model="auto/chat",
    messages=[{"role": "user", "content": "Write a meeting invitation email."}],
)

Routing name vs canonical model name

DimensionCanonical model nameSmart routing name
Usage"model": "deepseek-r1""model": "auto/reasoning"
DeterminismAlways calls the specified modelRoutic picks the best available
Best forReproducible results, model-specific dependenciesNo model preference, want resilience and value
FailoverNone — error if model unavailableAutomatic fallback to equivalent models
Response modelresponse.model returns the name you specifiedresponse.model returns the actual model used

Best practices

  1. Use smart routing in production — automatic failover keeps your service running when models go offline.
  2. Use canonical names when you need reproducibility — e.g., automated tests, benchmarks.
  3. Start with smart routing, switch to canonical if needed — both work interchangeably; no structural code changes required.
  4. Check response.model to see which model was actually called — smart routing responses include the underlying model name.

See also