Skip to content
API Blog

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.

| 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.

The text model resolves in this order:

  1. behavior or run override
  2. agent default model
  3. 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.

An organization-defined provider has a stable slug, a provider kind, one gateway-held credential, and optional per-modality configuration.

Supported modality blocks are:

  • text
  • image
  • stt
  • tts
  • embedding

Each block may define its own base URL, model, and model-discovery endpoint.

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.

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.

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.

ProviderIDDefault ModelSDK CompatBase URLModels Endpoint
Groqgroqllama-3.3-70b-versatileopenaihttps://api.groq.com/openai/v1/models
Geminigeminigemini-2.5-proopenaihttps://generativelanguage.googleapis.com/v1beta/openaiN/A
Together AItogether-aimeta-llama/Llama-3.3-70B-Instruct-Turboopenaihttps://api.together.xyz/v1/models
NVIDIA NIM (free)nvidianvidia/moonshotai/kimi-k2.6openaihttps://integrate.api.nvidia.com/v1/models
z.aiz-aiglm-5.2openaihttps://api.z.ai/api/coding/paas/v4N/A
ElevenLabselevenlabsN/Aopenaihttps://api.elevenlabs.ioN/A
Fireworks AIfireworksaccounts/fireworks/models/llama-v3p3-70b-instructopenaihttps://api.fireworks.ai/inference/v1/models
Mistralmistralmistral-large-latestopenaihttps://api.mistral.ai/v1/models
DeepSeekdeepseekdeepseek-v4-flashopenaihttps://api.deepseek.com/v1/models
OpenRouteropenrouteranthropic/claude-sonnet-5openaihttps://openrouter.ai/api/v1/models
Cerebrascerebrasllama-3.3-70bopenaihttps://api.cerebras.ai/v1/models
OpenCode Zenopencode-zenclaude-sonnet-4-6openaihttps://opencode.ai/zen/v1/models
xAIxaigrok-4openaihttps://api.x.ai/v1/models
Perplexityperplexitysonaropenaihttps://api.perplexity.ai/v1/models
Coherecoherecommand-a-03-2025openaihttps://api.cohere.com/compatibility/v1/models
OpenAI APIopenaigpt-5.5openaihttps://api.openai.com/v1/models
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"
        ]
      }
    ]
  }
]