Providers
Lobu separates inference from execution.
- An inference provider supplies models.
- An environment selects where commands run.
- A runtime provider implements that sandbox backend.
- Credentials stay gateway-side.
See Concepts and architecture for the complete agent model.
Provider terms
Section titled “Provider terms”| Term | Meaning |
| --- | --- |
| Provider catalog entry | Built-in metadata from config/providers.json |
| Inference provider | A configured credential, optionally with organization-specific upstreams and defaults |
| Model | The text, image, speech, or embedding model selected for a run |
| Auth profile | A reusable OAuth, device-code, or API-key credential |
| Environment | A named execution target selected by an agent |
| Runtime provider | The implementation behind a remote sandbox environment |
Inference and sandbox compute are independent layers.
Model selection
Section titled “Model selection”The text model resolves in this order:
- behavior or run override
- agent default model
- organization default inference provider
This lets one agent use a cheap model for routine watches and a stronger model for a sensitive workflow without changing its identity or environment.
Organization-defined inference
Section titled “Organization-defined inference”An organization-defined provider has a stable slug, a provider kind, one gateway-held credential, and optional per-modality configuration.
Supported modality blocks are:
textimagesttttsembedding
Each block may define its own base URL, model, and model-discovery endpoint.
Credentials
Section titled “Credentials”Credential sources include API keys, OAuth, device-code authentication, declared project secrets, user-scoped auth profiles, and organization-owned provider credentials.
The gateway resolves the selected credential. Workers and remote sandboxes receive scoped access or placeholders rather than durable raw secrets.
Inference is not the sandbox
Section titled “Inference is not the sandbox”An agent also selects an environment:
| Environment | Execution | | --- | --- | | Builtin | Local embedded runtime | | Device | An authorized user device | | Provider-backed | A named organization or private remote sandbox |
A runtime provider handles sandbox creation, workspace mapping, network policy, and command execution. The same agent can use an Anthropic model while executing in a Vercel-backed environment, or use an organization-defined OpenAI-compatible endpoint while running on a device.
Configure an agent
Section titled “Configure an agent”const support = defineAgent({ id: "support", providers: [ { id: "openrouter", model: "anthropic/claude-sonnet-4", key: secret("OPENROUTER_API_KEY"), }, ], // environment selection is separate});Use the lobu.config.ts reference for the exact schema. Organization-defined providers and environments can also be managed through the UI and API.
Built-in provider registry
Section titled “Built-in provider registry”| Provider | ID | Default Model | SDK Compat | Base URL | Models Endpoint |
|---|---|---|---|---|---|
| Groq | groq | llama-3.3-70b-versatile | openai | https://api.groq.com/openai/v1 | /models |
| Gemini | gemini | gemini-2.5-pro | openai | https://generativelanguage.googleapis.com/v1beta/openai | N/A |
| Together AI | together-ai | meta-llama/Llama-3.3-70B-Instruct-Turbo | openai | https://api.together.xyz/v1 | /models |
| NVIDIA NIM (free) | nvidia | nvidia/moonshotai/kimi-k2.6 | openai | https://integrate.api.nvidia.com/v1 | /models |
| z.ai | z-ai | glm-5.2 | openai | https://api.z.ai/api/coding/paas/v4 | N/A |
| ElevenLabs | elevenlabs | N/A | openai | https://api.elevenlabs.io | N/A |
| Fireworks AI | fireworks | accounts/fireworks/models/llama-v3p3-70b-instruct | openai | https://api.fireworks.ai/inference/v1 | /models |
| Mistral | mistral | mistral-large-latest | openai | https://api.mistral.ai/v1 | /models |
| DeepSeek | deepseek | deepseek-v4-flash | openai | https://api.deepseek.com | /v1/models |
| OpenRouter | openrouter | anthropic/claude-sonnet-5 | openai | https://openrouter.ai/api/v1 | /models |
| Cerebras | cerebras | llama-3.3-70b | openai | https://api.cerebras.ai/v1 | /models |
| OpenCode Zen | opencode-zen | claude-sonnet-4-6 | openai | https://opencode.ai/zen/v1 | /models |
| xAI | xai | grok-4 | openai | https://api.x.ai/v1 | /models |
| Perplexity | perplexity | sonar | openai | https://api.perplexity.ai | /v1/models |
| Cohere | cohere | command-a-03-2025 | openai | https://api.cohere.com/compatibility/v1 | /models |
| OpenAI API | openai | gpt-5.5 | openai | https://api.openai.com/v1 | /models |
Source of truth
Section titled “Source of truth”- Local file:
config/providers.json - GitHub source: config/providers.json
View provider entries
[
{
"id": "groq",
"providers": [
{
"displayName": "Groq",
"iconUrl": "https://www.google.com/s2/favicons?domain=groq.com&sz=128",
"envVarName": "GROQ_API_KEY",
"upstreamBaseUrl": "https://api.groq.com/openai/v1",
"apiKeyInstructions": "Get your API key from <a href=\"https://console.groq.com/keys\" target=\"_blank\" class=\"text-blue-600 hover:underline\">Groq Console</a>",
"apiKeyPlaceholder": "gsk_...",
"sdkCompat": "openai",
"modalities": [
"text",
"stt"
],
"defaultModel": "llama-3.3-70b-versatile",
"modelsEndpoint": "/models",
"stt": {
"enabled": true,
"sdkCompat": "openai",
"transcriptionPath": "/audio/transcriptions",
"model": "whisper-large-v3-turbo"
},
"models": [
"llama-3.3-70b-versatile",
"llama-3.1-8b-instant",
"mixtral-8x7b-32768"
]
}
]
},
{
"id": "gemini",
"providers": [
{
"displayName": "Gemini",
"iconUrl": "https://www.google.com/s2/favicons?domain=gemini.google.com&sz=128",
"envVarName": "GEMINI_API_KEY",
"upstreamBaseUrl": "https://generativelanguage.googleapis.com/v1beta/openai",
"apiKeyInstructions": "Get your API key from <a href=\"https://aistudio.google.com/apikey\" target=\"_blank\" class=\"text-blue-600 hover:underline\">Google AI Studio</a>",
"apiKeyPlaceholder": "AIza...",
"sdkCompat": "openai",
"modalities": [
"text",
"image",
"tts"
],
"defaultModel": "gemini-2.5-pro",
"models": [
"gemini-2.5-pro",
"gemini-2.5-flash",
"gemini-2.0-flash"
]
}
]
},
{
"id": "together-ai",
"providers": [
{
"displayName": "Together AI",
"iconUrl": "https://www.google.com/s2/favicons?domain=together.ai&sz=128",
"envVarName": "TOGETHER_API_KEY",
"upstreamBaseUrl": "https://api.together.xyz/v1",
"apiKeyInstructions": "Get your API key from <a href=\"https://api.together.ai/settings/api-keys\" target=\"_blank\" class=\"text-blue-600 hover:underline\">Together AI Dashboard</a>",
"apiKeyPlaceholder": "tok_...",
"sdkCompat": "openai",
"modalities": [
"text"
],
"defaultModel": "meta-llama/Llama-3.3-70B-Instruct-Turbo",
"modelsEndpoint": "/models",
"models": [
"meta-llama/Llama-3.3-70B-Instruct-Turbo",
"Qwen/Qwen2.5-72B-Instruct-Turbo",
"deepseek-ai/DeepSeek-V3"
]
}
]
},
{
"id": "nvidia",
"providers": [
{
"displayName": "NVIDIA NIM (free)",
"iconUrl": "https://www.google.com/s2/favicons?domain=nvidia.com&sz=128",
"envVarName": "NVIDIA_API_KEY",
"upstreamBaseUrl": "https://integrate.api.nvidia.com/v1",
"apiKeyInstructions": "Get your API key from <a href=\"https://build.nvidia.com/settings/api-keys\" target=\"_blank\" class=\"text-blue-600 hover:underline\">NVIDIA Build</a>",
"apiKeyPlaceholder": "nvapi-...",
"sdkCompat": "openai",
"modalities": [
"text"
],
"modelsEndpoint": "/models",
"defaultModel": "nvidia/moonshotai/kimi-k2.6",
"models": [
"nvidia/moonshotai/kimi-k2.6",
"meta/llama-3.3-70b-instruct",
"deepseek-ai/deepseek-r1"
]
}
]
},
{
"id": "z-ai",
"providers": [
{
"displayName": "z.ai",
"iconUrl": "https://www.google.com/s2/favicons?domain=z.ai&sz=128",
"envVarName": "Z_AI_API_KEY",
"upstreamBaseUrl": "https://api.z.ai/api/coding/paas/v4",
"apiKeyInstructions": "Get your API key from <a href=\"https://z.ai/manage-apikey/apikey-list\" target=\"_blank\" class=\"text-blue-600 hover:underline\">z.ai</a>",
"apiKeyPlaceholder": "zai-...",
"sdkCompat": "openai",
"modalities": [
"text"
],
"models": [
"glm-5.2",
"glm-4.6",
"glm-4.5-air"
],
"defaultModel": "glm-5.2"
}
]
},
{
"id": "elevenlabs",
"providers": [
{
"displayName": "ElevenLabs",
"iconUrl": "https://www.google.com/s2/favicons?domain=elevenlabs.io&sz=128",
"envVarName": "ELEVENLABS_API_KEY",
"upstreamBaseUrl": "https://api.elevenlabs.io",
"apiKeyInstructions": "Get your API key from <a href=\"https://elevenlabs.io/app/api-keys\" target=\"_blank\" class=\"text-blue-600 hover:underline\">ElevenLabs</a>",
"apiKeyPlaceholder": "sk_...",
"sdkCompat": "openai",
"modalities": [
"tts"
]
}
]
},
{
"id": "fireworks",
"providers": [
{
"displayName": "Fireworks AI",
"iconUrl": "https://www.google.com/s2/favicons?domain=fireworks.ai&sz=128",
"envVarName": "FIREWORKS_API_KEY",
"upstreamBaseUrl": "https://api.fireworks.ai/inference/v1",
"apiKeyInstructions": "Get your API key from <a href=\"https://fireworks.ai/account/api-keys\" target=\"_blank\" class=\"text-blue-600 hover:underline\">Fireworks Dashboard</a>",
"apiKeyPlaceholder": "fw_...",
"sdkCompat": "openai",
"modalities": [
"text"
],
"defaultModel": "accounts/fireworks/models/llama-v3p3-70b-instruct",
"modelsEndpoint": "/models",
"models": [
"accounts/fireworks/models/llama-v3p3-70b-instruct",
"accounts/fireworks/models/deepseek-v3",
"accounts/fireworks/models/qwen2p5-72b-instruct"
]
}
]
},
{
"id": "mistral",
"providers": [
{
"displayName": "Mistral",
"iconUrl": "https://www.google.com/s2/favicons?domain=mistral.ai&sz=128",
"envVarName": "MISTRAL_API_KEY",
"upstreamBaseUrl": "https://api.mistral.ai/v1",
"apiKeyInstructions": "Get your API key from <a href=\"https://console.mistral.ai/api-keys\" target=\"_blank\" class=\"text-blue-600 hover:underline\">Mistral Console</a>",
"apiKeyPlaceholder": "sk-...",
"sdkCompat": "openai",
"modalities": [
"text"
],
"defaultModel": "mistral-large-latest",
"modelsEndpoint": "/models",
"models": [
"mistral-large-latest",
"mistral-small-latest",
"codestral-latest"
]
}
]
},
{
"id": "deepseek",
"providers": [
{
"displayName": "DeepSeek",
"iconUrl": "https://www.google.com/s2/favicons?domain=deepseek.com&sz=128",
"envVarName": "DEEPSEEK_API_KEY",
"upstreamBaseUrl": "https://api.deepseek.com",
"apiKeyInstructions": "Get your API key from <a href=\"https://platform.deepseek.com/api_keys\" target=\"_blank\" class=\"text-blue-600 hover:underline\">DeepSeek Platform</a>",
"apiKeyPlaceholder": "sk-...",
"sdkCompat": "openai",
"modalities": [
"text"
],
"defaultModel": "deepseek-v4-flash",
"modelsEndpoint": "/v1/models",
"models": [
"deepseek-v4-flash",
"deepseek-chat",
"deepseek-reasoner"
]
}
]
},
{
"id": "openrouter",
"providers": [
{
"displayName": "OpenRouter",
"iconUrl": "https://www.google.com/s2/favicons?domain=openrouter.ai&sz=128",
"envVarName": "OPENROUTER_API_KEY",
"upstreamBaseUrl": "https://openrouter.ai/api/v1",
"apiKeyInstructions": "Get your API key from <a href=\"https://openrouter.ai/keys\" target=\"_blank\" class=\"text-blue-600 hover:underline\">OpenRouter</a>, or connect via OAuth for per-user billing",
"apiKeyPlaceholder": "sk-or-...",
"sdkCompat": "openai",
"modalities": [
"text",
"stt"
],
"defaultModel": "anthropic/claude-sonnet-5",
"modelsEndpoint": "/models",
"stt": {
"enabled": true,
"sdkCompat": "openai",
"transcriptionPath": "/audio/transcriptions",
"model": "whisper-1"
},
"models": [
"anthropic/claude-sonnet-5",
"openai/gpt-5.5",
"google/gemini-2.5-pro"
]
}
]
},
{
"id": "cerebras",
"providers": [
{
"displayName": "Cerebras",
"iconUrl": "https://www.google.com/s2/favicons?domain=cerebras.ai&sz=128",
"envVarName": "CEREBRAS_API_KEY",
"upstreamBaseUrl": "https://api.cerebras.ai/v1",
"apiKeyInstructions": "Get your API key from <a href=\"https://cloud.cerebras.ai/\" target=\"_blank\" class=\"text-blue-600 hover:underline\">Cerebras Cloud</a>",
"apiKeyPlaceholder": "csk-...",
"sdkCompat": "openai",
"modalities": [
"text"
],
"defaultModel": "llama-3.3-70b",
"modelsEndpoint": "/models",
"models": [
"llama-3.3-70b",
"llama3.1-8b",
"qwen-3-32b"
]
}
]
},
{
"id": "opencode-zen",
"providers": [
{
"displayName": "OpenCode Zen",
"iconUrl": "https://www.google.com/s2/favicons?domain=opencode.ai&sz=128",
"envVarName": "OPENCODE_ZEN_API_KEY",
"upstreamBaseUrl": "https://opencode.ai/zen/v1",
"apiKeyInstructions": "Get your API key from <a href=\"https://opencode.ai/auth\" target=\"_blank\" class=\"text-blue-600 hover:underline\">OpenCode Zen</a>",
"apiKeyPlaceholder": "zen-...",
"sdkCompat": "openai",
"modalities": [
"text"
],
"defaultModel": "claude-sonnet-4-6",
"modelsEndpoint": "/models"
}
]
},
{
"id": "xai",
"providers": [
{
"displayName": "xAI",
"iconUrl": "https://www.google.com/s2/favicons?domain=x.ai&sz=128",
"envVarName": "XAI_API_KEY",
"upstreamBaseUrl": "https://api.x.ai/v1",
"apiKeyInstructions": "Get your API key from <a href=\"https://console.x.ai/\" target=\"_blank\" class=\"text-blue-600 hover:underline\">xAI Console</a>",
"apiKeyPlaceholder": "xai-...",
"sdkCompat": "openai",
"modalities": [
"text"
],
"defaultModel": "grok-4",
"modelsEndpoint": "/models",
"models": [
"grok-4",
"grok-3",
"grok-3-mini"
]
}
]
},
{
"id": "perplexity",
"providers": [
{
"displayName": "Perplexity",
"iconUrl": "https://www.google.com/s2/favicons?domain=perplexity.ai&sz=128",
"envVarName": "PERPLEXITY_API_KEY",
"upstreamBaseUrl": "https://api.perplexity.ai",
"apiKeyInstructions": "Get your API key from <a href=\"https://www.perplexity.ai/settings/api\" target=\"_blank\" class=\"text-blue-600 hover:underline\">Perplexity Settings</a>",
"apiKeyPlaceholder": "pplx-...",
"sdkCompat": "openai",
"modalities": [
"text"
],
"defaultModel": "sonar",
"modelsEndpoint": "/v1/models",
"models": [
"sonar",
"sonar-pro",
"sonar-reasoning-pro"
]
}
]
},
{
"id": "cohere",
"providers": [
{
"displayName": "Cohere",
"iconUrl": "https://www.google.com/s2/favicons?domain=cohere.com&sz=128",
"envVarName": "COHERE_API_KEY",
"upstreamBaseUrl": "https://api.cohere.com/compatibility/v1",
"apiKeyInstructions": "Get your API key from <a href=\"https://dashboard.cohere.com/api-keys\" target=\"_blank\" class=\"text-blue-600 hover:underline\">Cohere Dashboard</a>",
"apiKeyPlaceholder": "co-...",
"sdkCompat": "openai",
"modalities": [
"text"
],
"defaultModel": "command-a-03-2025",
"modelsEndpoint": "/models",
"models": [
"command-a-03-2025",
"command-r-plus",
"command-r"
]
}
]
},
{
"id": "openai",
"providers": [
{
"displayName": "OpenAI API",
"iconUrl": "https://www.google.com/s2/favicons?domain=openai.com&sz=128",
"envVarName": "OPENAI_API_KEY",
"upstreamBaseUrl": "https://api.openai.com/v1",
"apiKeyInstructions": "Get your API key from <a href=\"https://platform.openai.com/api-keys\" target=\"_blank\" class=\"text-blue-600 hover:underline\">OpenAI Dashboard</a>",
"apiKeyPlaceholder": "sk-...",
"sdkCompat": "openai",
"modalities": [
"text",
"image",
"tts"
],
"defaultModel": "gpt-5.5",
"modelsEndpoint": "/models",
"models": [
"gpt-5.5",
"gpt-5.5-mini",
"gpt-5-nano"
]
}
]
}
]