Tabby supports multiple AI providers through the Vercel AI SDK, allowing you to choose the best models for your use case. Configure your preferred providers by adding API keys to your environment variables.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/TabbyAIKeyboard/tabby/llms.txt
Use this file to discover all available pages before exploring further.
Supported Providers
Tabby integrates with the following AI providers:- OpenAI - GPT models for chat, coding, and memory operations
- Groq - Fast inference with Llama and other open models
- Cerebras - High-performance AI inference
- Google Generative AI - Gemini models
- OpenRouter - Access to multiple models through a single API
- XAI - Additional AI capabilities
Configuration
Next.js Backend
The Next.js backend (nextjs-backend/.env.local) handles AI provider configuration for the application’s main features.
Memory Backend
The Python memory backend (backend/.env) requires an OpenAI API key for memory operations with Mem0.
The memory backend uses OpenAI’s
gpt-4.1-nano-2025-04-14 model for memory classification and vision capabilities.Provider Setup
OpenAI
- Get API Key
- Configure
- Visit OpenAI Platform
- Create an account or sign in
- Navigate to API Keys section
- Click Create new secret key
- Copy the key (starts with
sk-)
Groq
- Get API Key
- Configure
- Visit Groq Console
- Create an account or sign in
- Navigate to API Keys
- Click Create API Key
- Copy the key (starts with
gsk_)
Cerebras
- Get API Key
- Configure
- Visit Cerebras Cloud
- Create an account or sign in
- Navigate to API Keys
- Generate a new API key
- Copy the key
Google Generative AI
- Get API Key
- Configure
- Visit Google AI Studio
- Sign in with your Google account
- Click Create API Key
- Copy the generated key
OpenRouter
- Get API Key
- Configure
- Visit OpenRouter
- Create an account or sign in
- Navigate to Keys section
- Create a new API key
- Copy the key
AI SDK Integration
Tabby uses the Vercel AI SDK to integrate with providers. The SDK packages are already included in the project:package.json
Web Search with Tavily
Tabby supports web search capabilities through Tavily, enhancing AI responses with real-time information.- Get API Key
- Configure
- Visit Tavily
- Create an account
- Navigate to the dashboard
- Copy your API key
Best Practices
API Key Security
- Never commit
.envfiles to version control - Use
.env.exampleas templates for required keys - Rotate API keys regularly
- Set up usage limits and alerts in provider dashboards
Provider Selection
- OpenAI - Best for general-purpose tasks and memory operations (required)
- Groq - Fastest inference, ideal for real-time interactions
- Cerebras - High-performance for intensive workloads
- Google Gemini - Alternative to OpenAI for vision and reasoning
- OpenRouter - Access multiple models with a single API key
Cost Optimization
- Monitor usage in provider dashboards
- Use cheaper models for simple tasks (e.g., text formatting)
- Reserve powerful models for complex tasks (e.g., coding assistance)
- Consider rate limits and quotas for each provider
Troubleshooting
API key not working
API key not working
- Verify the key is correctly copied (no extra spaces)
- Check if the key has been activated in the provider dashboard
- Ensure you have credits/billing set up
- Restart the backend after adding new keys
Provider not available in the app
Provider not available in the app
- Verify the API key is set in the correct
.env.localfile - Restart both the Next.js backend and Electron app
- Check console logs for configuration errors
Memory backend not starting
Memory backend not starting
The memory backend requires an OpenAI API key. Ensure
OPENAI_API_KEY is set in backend/.env.Next Steps
Memory Backend
Configure persistent memory with Mem0
Settings
Customize application settings