Model Registry
The MODEL_REGISTRY is a built-in catalog of all models the relay knows how to route. Each entry includes the canonical name, provider, capabilities, and pricing.
Helpers
import { findModel, providerForModel, modelsForProvider } from 'inference-relay';findModel(canonical)
const m = findModel('gpt-4o-mini');
// { canonical: 'gpt-4o-mini', apiId: 'gpt-4o-mini',
// provider: 'openai-api',
// capabilities: { streaming: true, tools: true,
// multimodal: true, contextWindow: 128000 },
// pricing: [0.15, 0.6] }providerForModel(canonical)
providerForModel('claude-sonnet-4-6'); // 'anthropic-api'
providerForModel('gpt-4o'); // 'openai-api'
providerForModel('mistral'); // 'ollama'modelsForProvider(provider)
modelsForProvider('anthropic-api');
// [{ canonical: 'claude-haiku-4-5', ... },
// { canonical: 'claude-sonnet-4-6', ... }, ...]Full Registry
Anthropic
| Model | Tools | Multimodal | Context | Pricing (in/out) |
|---|---|---|---|---|
| claude-haiku-4-5 | Yes | Yes | 200K | $0.80 / $4.00 |
| claude-sonnet-4-6 | Yes | Yes | 200K | $3.00 / $15.00 |
| claude-opus-4-6 | Yes | Yes | 200K | $15.00 / $75.00 |
OpenAI
| Model | Tools | Multimodal | Context | Pricing (in/out) |
|---|---|---|---|---|
| gpt-4.1 | Yes | Yes | 1M | $2.00 / $8.00 |
| gpt-4.1-mini | Yes | Yes | 1M | $0.40 / $1.60 |
| gpt-4.1-nano | Yes | Yes | 1M | $0.10 / $0.40 |
| gpt-4o | Yes | Yes | 128K | $2.50 / $10.00 |
| gpt-4o-mini | Yes | Yes | 128K | $0.15 / $0.60 |
| o4-mini | Yes | No | 200K | $1.10 / $4.40 |
| o3 | Yes | No | 200K | $0.40 / $1.60 |
| o3-mini | Yes | No | 200K | $1.10 / $4.40 |
| o1 | No | No | 200K | $15.00 / $60.00 |
Ollama (Local)
| Model | Tools | Multimodal | Context | Pricing |
|---|---|---|---|---|
| llama3.1 | Yes | No | 128K | Local |
| mistral | Yes* | No | 32K | Local |
| mistral-nemo | Yes | No | 128K | Local |
| llava | No | Yes | 32K | Local |
| qwen2:0.5b | No | No | 32K | Local |
*Tool support is detected at runtime. The registry capability flag is a hint — the runtime detection is authoritative. Ollama pricing is always $0.
How the Registry Is Used
- Smart pre-skip— The FallbackEngine skips providers that don't own a model before attempting the request. See Fallback.
- Demo dropdowns — The Electron and web demos use
modelsForProvider()to populate model selection grouped by provider. - Cost estimation —
estimateCost()uses registry pricing to project request costs before execution.
Custom Models
The registry is read-only in the current release. Custom Ollama models are detected at runtime regardless of whether they appear in the registry. For API providers, pass any valid model name — the provider will forward it even if it's not in the registry.