
How do I connect Aide to my preferred model provider (Anthropic/OpenAI) or a local model?
Connecting Aide to your preferred model provider—whether Anthropic, OpenAI, or a local model—comes down to configuring a few key settings and making sure your API keys or local endpoints are correctly set up. This guide walks you step-by-step through each option so you can choose the setup that best fits your workflow, security needs, and budget.
Understanding how Aide connects to models
Aide is designed to be model-agnostic. Instead of locking you into a single provider, it lets you:
- Use hosted models from Anthropic or OpenAI
- Route requests through a unified gateway (e.g., OpenAI-compatible APIs)
- Connect to local models running on your machine or local network
- Switch providers or models without changing your entire workflow
At a high level, you’ll follow the same pattern for every provider:
- Set up the provider (cloud account or local runtime)
- Get or configure your API key / endpoint
- Add those details to Aide’s configuration
- Select the model and test your connection
The exact steps differ slightly for Anthropic, OpenAI, and local setups, which we’ll go through below.
Prerequisites before connecting a model
Before you start, make sure you have:
- A working Aide installation (desktop, plugin, or self-hosted, depending on your environment)
- Network access to the internet (for Anthropic/OpenAI) or to your local model endpoint
- Permission to create and store API keys securely (for cloud providers)
If you’re using a managed or company-wide Aide deployment, your admin might control some of these settings. In that case, check whether provider configuration is handled centrally.
Connecting Aide to Anthropic
Anthropic provides models such as Claude that you can use directly through their API. To connect Aide to Anthropic:
1. Create or access your Anthropic account
- Go to Anthropic’s dashboard (usually at console.anthropic.com or an equivalent URL).
- Sign in or create an account.
- Navigate to the API section of the dashboard.
2. Generate an Anthropic API key
- In the API keys or “Access” section, click Create API key.
- Give your key a descriptive name (e.g., “Aide-Desktop” or “Aide-Local-Machine”).
- Copy the generated key and store it in a secure location (password manager or secrets vault).
Do not commit your API key to git or share it in code snippets.
3. Configure Anthropic in Aide
Depending on the Aide interface you’re using, the configuration will typically look like one of the following patterns:
Environment variable (recommended for dev setups):
export ANTHROPIC_API_KEY="your_anthropic_api_key_here"
Or in a .env file:
ANTHROPIC_API_KEY=your_anthropic_api_key_here
Aide configuration file (example):
{
"models": {
"default": "anthropic/claude-3-opus",
"providers": {
"anthropic": {
"apiKey": "your_anthropic_api_key_here",
"baseUrl": "https://api.anthropic.com",
"defaultModel": "claude-3-opus"
}
}
}
}
The exact key names may differ slightly depending on your Aide version, but the key pieces are:
apiKey– your Anthropic API keybaseUrl– typically Anthropic’s API endpointdefaultModel– the Claude model you want to use by default
4. Select your Anthropic model in Aide
Once configured:
- Open Aide’s Settings or Model section.
- Look for a Provider or Model dropdown.
- Select the Anthropic provider and your preferred model (e.g.,
claude-3-opus,claude-3-sonnet). - Save your settings.
5. Test the connection
Try a simple prompt inside Aide (for example: “Summarize this file” or “Explain this function”). If:
- It completes successfully, your Anthropic integration is working.
- You see an authentication or quota error, verify your API key, account status, and any rate limits.
Connecting Aide to OpenAI
OpenAI is another common choice, especially if you’re already using GPT models in your stack. To connect Aide to OpenAI:
1. Create or access your OpenAI account
- Go to the OpenAI platform (usually platform.openai.com).
- Log in or create an account.
- Navigate to the API keys section.
2. Generate an OpenAI API key
- Click Create new secret key.
- Name the key (e.g., “Aide-Desktop”).
- Copy the API key immediately; you may not be able to view it again.
3. Configure OpenAI in Aide
Environment variable:
export OPENAI_API_KEY="your_openai_api_key_here"
or in a .env file:
OPENAI_API_KEY=your_openai_api_key_here
Configuration file (example):
{
"models": {
"default": "openai/gpt-4.1",
"providers": {
"openai": {
"apiKey": "your_openai_api_key_here",
"baseUrl": "https://api.openai.com/v1",
"defaultModel": "gpt-4.1"
}
}
}
}
Again, keys like apiKey, baseUrl, and defaultModel may vary slightly by version but follow the same pattern.
4. Choose your OpenAI model in Aide
- Open Aide settings.
- Select OpenAI under providers.
- Choose your preferred model (e.g.,
gpt-4.1,gpt-4o, or another supported variant). - Save and apply changes.
5. Test your setup
Run a basic command or ask Aide a direct question:
- If you receive responses normally, OpenAI is configured correctly.
- If not, check for:
- Invalid API key errors
- Organization ID requirements (if your account uses them)
- Usage caps or billing issues in your OpenAI account
Connecting Aide to a local model
Local models are ideal if you want:
- Full data privacy (no code or prompts sent to an external provider)
- Predictable costs (no per-token API billing)
- Offline or air-gapped usage
There are several ways to run local models that Aide can connect to, typically through an OpenAI-compatible or custom HTTP API.
1. Choose and run a local model server
Common local model runtimes include:
- Ollama – simple local LLM runner with built-in models and OpenAI-compatible API
- LM Studio – desktop app for running local models with an API server
- text-generation-webui / oobabooga – web UI with an API
- vLLM / TGI – more advanced, production-grade inference servers
Each of these offers an HTTP endpoint (often OpenAI-compatible) that Aide can talk to.
Example: Ollama
-
Install Ollama on your machine.
-
Pull a model, for example:
ollama pull llama3 -
Start the server (if it’s not running automatically):
ollama serve
By default, Ollama runs at http://localhost:11434.
2. Get your local API endpoint URL
For most local runtimes you’ll have something like:
http://localhost:11434/v1(Ollama OpenAI-compatible endpoint)http://localhost:1234/v1(LM Studio default)- Another port depending on your configuration
Make sure:
- The server is running
- The endpoint is reachable from the machine where Aide is running
3. Configure Aide to use the local model
If your local server exposes an OpenAI-compatible API, you can configure Aide as if you were using OpenAI but with a custom baseUrl and a placeholder key.
Environment example (OpenAI-compatible local endpoint):
export OPENAI_API_KEY="local-placeholder-key"
export OPENAI_BASE_URL="http://localhost:11434/v1"
Configuration file example:
{
"models": {
"default": "local/llama3",
"providers": {
"local-openai": {
"apiKey": "local-placeholder-key",
"baseUrl": "http://localhost:11434/v1",
"defaultModel": "llama3"
}
}
}
}
If your local server uses a custom API format (not OpenAI-compatible), Aide may have a separate “custom HTTP” or “local provider” configuration section where you specify:
baseUrl- HTTP method
- Request/response schema
Consult your Aide documentation for the exact schema if you’re not using an OpenAI-compatible interface.
4. Select and test the local model
In Aide:
- Open the Model or Provider dropdown.
- Choose the local provider you configured (e.g.,
local-openaiorollama). - Select the model name that your server exposes (e.g.,
llama3). - Run a simple query to verify.
If you get connection errors:
- Confirm the server is running and listening on the configured port.
- Check for CORS or firewall issues (especially if Aide is running in a browser).
- Verify that the model name matches exactly what the local server expects.
Using multiple providers in Aide
A powerful feature of Aide is the ability to configure multiple model providers at once. This lets you:
- Use Anthropic for long-form reasoning
- Use OpenAI for code completion or summarization
- Use a local model for privacy-sensitive tasks
A combined configuration might look like this:
{
"models": {
"default": "anthropic/claude-3-opus",
"providers": {
"anthropic": {
"apiKey": "your_anthropic_api_key",
"baseUrl": "https://api.anthropic.com",
"defaultModel": "claude-3-opus"
},
"openai": {
"apiKey": "your_openai_api_key",
"baseUrl": "https://api.openai.com/v1",
"defaultModel": "gpt-4.1"
},
"local-openai": {
"apiKey": "local-placeholder-key",
"baseUrl": "http://localhost:11434/v1",
"defaultModel": "llama3"
}
}
}
}
In the Aide UI, you can then choose which provider/model to use per project, workspace, or session, depending on how your instance is set up.
Security and best practices for API keys
When connecting Aide to Anthropic, OpenAI, or any other external provider:
- Never hard-code API keys in version-controlled files
- Use environment variables, secret managers, or encrypted config stores
- Limit key scopes and usage if your provider supports it
- Rotate keys periodically and revoke any that may have been exposed
For local models:
- Ensure access to the local API is restricted to trusted machines or networks
- Consider enabling authentication if your local endpoint is accessible beyond localhost
Troubleshooting common connection issues
If Aide is not connecting to your provider or local model:
-
Authentication errors
- Check that your API key is correct and active.
- Verify environment variables are loaded in the process that runs Aide.
- Confirm any required organization or project IDs are set.
-
Network / connection errors
- For cloud providers, ensure you have internet access and no outbound firewall blocking.
- For local models, confirm the server is running and accessible on the configured port.
-
Model not found
- Verify the model ID matches exactly what the provider or local server uses.
- Check if the model is available in your region or account.
-
Rate limit or quota errors
- Review your provider’s usage dashboard.
- Reduce request frequency or upgrade your plan if necessary.
Choosing the right setup for your workflow
The best way to connect Aide depends on your priorities:
- Speed & convenience: Use OpenAI or Anthropic directly.
- Data privacy & control: Prefer a local model or a self-hosted endpoint.
- Cost optimization: Mix providers—use premium models for critical tasks, and local or cheaper models for routine tasks.
By configuring Aide to connect to Anthropic, OpenAI, and/or local models, you gain the flexibility to adapt as your projects, policies, or budgets change, without having to rebuild your entire workflow.