AI Provider Configuration
Explorbot connects to AI providers through the Vercel AI SDK. Use any supported provider, and mix providers across different models.
Requirements
Section titled “Requirements”Your model must support:
- Structured output (JSON mode)
- Tool use (function calling)
To analyze screenshots, you also need a vision-capable model.
OpenRouter (recommended)
Section titled “OpenRouter (recommended)”Start with OpenRouter. One key reaches many providers and models.
bun add @openrouter/ai-sdk-providerimport { createOpenRouter } from '@openrouter/ai-sdk-provider';
const openrouter = createOpenRouter({ apiKey: process.env.OPENROUTER_API_KEY,});
export default { ai: { model: openrouter('openai/gpt-oss-20b:nitro'), visionModel: openrouter('google/gemma-4-31b-it'), agenticModel: openrouter('minimax/minimax-m2.5:nitro'), },};Pick model IDs from OpenRouter that support structured output and tools.
bun add @ai-sdk/groqimport { createGroq } from '@ai-sdk/groq';
const groq = createGroq({ apiKey: process.env.GROQ_API_KEY,});
export default { ai: { model: groq('openai/gpt-oss-20b'), visionModel: groq('meta-llama/llama-4-scout-17b-16e-instruct'), agenticModel: groq('openai/gpt-oss-120b'), },};Cerebras
Section titled “Cerebras”bun add @ai-sdk/cerebrasimport { createCerebras } from '@ai-sdk/cerebras';
const cerebras = createCerebras({ apiKey: process.env.CEREBRAS_API_KEY,});
export default { ai: { model: cerebras('gpt-oss-120b'), visionModel: cerebras('llama-4-scout-17b-16e-instruct'), agenticModel: cerebras('gpt-oss-120b'), },};OpenAI
Section titled “OpenAI”bun add @ai-sdk/openaiimport { createOpenAI } from '@ai-sdk/openai';
const openai = createOpenAI({ apiKey: process.env.OPENAI_API_KEY,});
export default { ai: { model: openai('gpt-4o-mini'), visionModel: openai('gpt-4o-mini'), agenticModel: openai('gpt-4o-mini'), },};Note: OpenAI models are slower and more expensive than many hosted OSS options.
Anthropic
Section titled “Anthropic”bun add @ai-sdk/anthropicimport { createAnthropic } from '@ai-sdk/anthropic';
const anthropic = createAnthropic({ apiKey: process.env.ANTHROPIC_API_KEY,});
export default { ai: { model: anthropic('claude-sonnet-4-20250514'), visionModel: anthropic('claude-sonnet-4-20250514'), agenticModel: anthropic('claude-sonnet-4-20250514'), },};Note: Anthropic models are slower but accurate. Use them when accuracy matters more than speed.
Azure OpenAI
Section titled “Azure OpenAI”bun add @ai-sdk/azureimport { createAzure } from '@ai-sdk/azure';
const azure = createAzure({ resourceName: process.env.AZURE_RESOURCE_NAME, apiKey: process.env.AZURE_API_KEY,});
export default { ai: { model: azure('your-deployment-name'), visionModel: azure('your-deployment-name'), agenticModel: azure('your-deployment-name'), },};Use separate deployment names if your Azure setup uses different endpoints for chat and vision.
Google (Gemini)
Section titled “Google (Gemini)”bun add @ai-sdk/googleimport { createGoogleGenerativeAI } from '@ai-sdk/google';
const google = createGoogleGenerativeAI({ apiKey: process.env.GOOGLE_API_KEY,});
export default { ai: { model: google('gemini-2.0-flash'), visionModel: google('gemini-2.0-flash'), agenticModel: google('gemini-2.0-flash'), },};Multi-Provider Configuration
Section titled “Multi-Provider Configuration”Mix clients the same way you assign model, visionModel, and agenticModel. Each field can use a different provider instance:
import { createGroq } from '@ai-sdk/groq';import { createOpenRouter } from '@openrouter/ai-sdk-provider';
const groq = createGroq({ apiKey: process.env.GROQ_API_KEY });const openrouter = createOpenRouter({ apiKey: process.env.OPENROUTER_API_KEY });
export default { ai: { model: groq('openai/gpt-oss-20b'), visionModel: groq('meta-llama/llama-4-scout-17b-16e-instruct'), agenticModel: openrouter('moonshotai/kimi-k2-instruct-0905'), },};Per-Agent Model Configuration
Section titled “Per-Agent Model Configuration”import { createGroq } from '@ai-sdk/groq';
const groq = createGroq({ apiKey: process.env.GROQ_API_KEY,});
export default { ai: { model: groq('openai/gpt-oss-20b'), visionModel: groq('meta-llama/llama-4-scout-17b-16e-instruct'), agenticModel: groq('openai/gpt-oss-20b'), agents: { navigator: { model: groq('openai/gpt-oss-20b') }, researcher: { model: groq('openai/gpt-oss-20b') }, planner: { model: groq('openai/gpt-oss-20b') }, tester: { model: groq('openai/gpt-oss-20b') }, }, },};Environment Variables
Section titled “Environment Variables”Set your API key as an environment variable:
# OpenRouterexport OPENROUTER_API_KEY=your-key-here
# Groqexport GROQ_API_KEY=your-key-here
# Cerebrasexport CEREBRAS_API_KEY=your-key-here
# OpenAIexport OPENAI_API_KEY=your-key-here
# Anthropicexport ANTHROPIC_API_KEY=your-key-here
# Googleexport GOOGLE_API_KEY=your-key-hereOr use a .env file in your project root.