Custom LLM Providers
By default, OpenAI and Anthropic are pre-registered. The ProviderRegistry lets you add any Vercel AI SDK-compatible provider at runtime — no engine code changes required.
Registering a provider
Section titled “Registering a provider”import { createGroq } from '@ai-sdk/groq';import { createProviderRegistry, configureProviderRegistry } from '@mcai/orchestrator';
// Start with built-in OpenAI + Anthropicconst providers = createProviderRegistry();
// Wire into the engineconfigureProviderRegistry(providers);Using providers in agent configs
Section titled “Using providers in agent configs”Once registered, agents can reference the provider by name:
{ "id": "fast-researcher", "model": "llama-3.3-70b-versatile", "provider": "groq", "system_prompt": "You are a research specialist...", "tools": [{ "type": "mcp", "server_id": "web-search" }]}Using provider options in agent configs
Section titled “Using provider options in agent configs”Once registered, agents can reference the provider by name:
{ "id": "fast-researcher", "model": "claude-opus-4-20250514", "provider": "anthropic", "provider_options": { "effort": "max", "thinking": { "type": "enabled", "budgetTokens": 12000 } }, "system_prompt": "You are a research specialist...", "tools": [{ "type": "mcp", "server_id": "web-search" }]}Model inference and validation
Section titled “Model inference and validation”Each provider declares a list of known models during registration. When an agent config omits the provider field, the engine infers it by exact match against these lists:
| Model Name | Inferred Provider |
|---|---|
gpt-4-turbo | openai |
claude-sonnet-4-20250514 | anthropic |
llama-3.3-70b-versatile | groq |
If no match is found, the default provider (anthropic) is used.
Use addModel() to register new model names at runtime without re-registering the entire provider:
providers.addModel('openai', 'gpt-5');Use supportsModel() to check if a model is in the known list:
providers.supportsModel('openai', 'gpt-4o'); // trueAPI reference
Section titled “API reference”| Export | Description |
|---|---|
ProviderRegistry | Class — register, unregister, list, resolve models, validate |
LanguageModelFactory | Type — (modelId: string) => LanguageModel |
ProviderOptions | Type — { models: string[] } |
createProviderRegistry() | Returns a registry with built-ins pre-registered |
configureProviderRegistry(registry) | Wires a registry into the global agent factory |
Next steps
Section titled “Next steps”- Agents — how agents use providers
- Adding MCP Tools — give agents external capabilities