Models & providersModel classes
Model classes
Capability buckets for one-line model selection — `frontier-reasoning`, `fast`, `coder`, `vision`, `audio`, `embedding`, `open-source`.
Model IDs are explicit but verbose. For "I just need a fast model"
situations, the SDK exposes a pickByClass() helper that picks the
right one for you.
At a glance
| Helpers | cr.pickByClass(class), cr.modelsByClass(class) |
| Updated | At every auto-sync (every 6h) |
| Source | Curated classification per model in our registry |
The classes
| Class | Use case | Typical picks |
|---|---|---|
frontier-reasoning | Hardest tasks, longest thinking | deepseek/deepseek-r1-distill-llama-70b, mistral/magistral-medium |
fast | High-throughput, low-latency chat | mistral/mistral-small-3.2, meta/llama-3.3-70b |
coder | Code generation and refactoring | qwen/qwen3-coder, mistral/codestral-latest |
vision | Multimodal (image + text) | mistral/pixtral-large-latest, qwen/qwen2.5-vl-72b |
audio | Speech-to-text | systran/faster-whisper-large-v3, openai/whisper-large-v3 |
embedding | Vector embeddings | cohere/embed-v4, baai/bge-multilingual-gemma2 |
open-source | Open-weight models for portable workloads | meta/llama-3.3-70b, qwen/qwen3-235b |
Picking by class
import { createCleverRouter } from '@cleverrouter/sdk';
const cr = createCleverRouter({ apiKey: process.env.CLEVERROUTER_API_KEY! });
// First match per class
const reasoner = cr.pickByClass('frontier-reasoning');
// Full list per class (sorted by quality score)
const coders = cr.modelsByClass('coder');
const fastChat = cr.modelsByClass('fast');
await cr.chat({
model: reasoner,
messages: [{ role: 'user', content: 'Prove the four-colour theorem.' }],
reasoning_effort: 'high',
});When a class beats a fixed ID
Use a class when:
- You want the gateway to upgrade you automatically when a better model in the same class appears.
- You're prototyping and don't want to think about IDs.
- You're building a "model dropdown" for end-users — picking from
cr.modelsByClass('chat')gives a sane UX.
Use a fixed ID when:
- You're benchmarking and need reproducibility.
- A compliance review demands "we always call X for use case Y".
- The class would route to a model your prompt isn't tuned for.
Where rerank lives
Rerank isn't a class
Rerank lives under its own kind, not a capability class. Pick
cohere/rerank-v3-5 or amazon/rerank-v1 directly. See
Rerank.