Mux supports multiple AI providers. The easiest way to configure them is through Settings → Providers (Cmd+, / Ctrl+,).
Quick Setup
- Open Settings (
Cmd+, / Ctrl+,)
- Navigate to Providers
- Expand any provider and enter your API key
- Start using models from that provider
Most providers only need an API key. The UI handles validation and shows which providers are configured.
Supported Providers
| Provider | Models | Get API Key |
|---|
| Anthropic | Claude Opus, Sonnet, Haiku | console.anthropic.com |
| OpenAI | GPT-5, Codex | platform.openai.com |
| Google | Gemini Pro, Flash | aistudio.google.com |
| xAI | Grok | console.x.ai |
| DeepSeek | DeepSeek Chat, Reasoner | platform.deepseek.com |
| OpenRouter | 300+ models | openrouter.ai |
| Ollama | Local models | ollama.com (no key needed) |
| Bedrock | Claude via AWS | AWS Console |
| GitHub Copilot | GPT-4o, Claude Sonnet, etc. | GitHub Copilot |
Environment Variables
Providers also read from environment variables as fallback:
| Provider | Environment Variable |
|---|
| Anthropic | ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN |
| OpenAI | OPENAI_API_KEY |
| Google | GOOGLE_GENERATIVE_AI_API_KEY or GOOGLE_API_KEY |
| xAI | XAI_API_KEY |
| OpenRouter | OPENROUTER_API_KEY |
| DeepSeek | DEEPSEEK_API_KEY |
| github-copilot | GITHUB_COPILOT_TOKEN |
| Bedrock | AWS_REGION (credentials via AWS SDK chain) |
Advanced: Manual Configuration
For advanced options not exposed in the UI, edit ~/.mux/providers.jsonc directly:
{
"anthropic": {
"apiKey": "sk-ant-...",
"baseUrl": "https://api.anthropic.com", // Optional custom endpoint
},
"openrouter": {
"apiKey": "sk-or-v1-...",
// Provider routing preferences
"order": ["Cerebras", "Fireworks"],
"allow_fallbacks": true,
},
"xai": {
"apiKey": "sk-xai-...",
// Search orchestration settings
"searchParameters": { "mode": "auto" },
},
"bedrock": {
"region": "us-east-1",
// Uses AWS credential chain if no explicit credentials
},
"ollama": {
"baseUrl": "http://your-server:11434/api", // Custom Ollama server
},
}
Bedrock Authentication
Bedrock supports multiple authentication methods (tried in order):
- Bearer Token — Single API key via
bearerToken config or AWS_BEARER_TOKEN_BEDROCK env var
- Explicit Credentials —
accessKeyId + secretAccessKey in config
- AWS Credential Chain — Automatic resolution from environment,
~/.aws/credentials, SSO, EC2/ECS roles
If you’re already authenticated with AWS CLI (aws sso login), Mux uses those credentials automatically.
OpenRouter Provider Routing
Control which infrastructure providers handle your requests:
order: Priority list of providers (e.g., ["Cerebras", "Fireworks"])
allow_fallbacks: Whether to try other providers if preferred ones are unavailable
only / ignore: Restrict or exclude specific providers
data_collection: "allow" or "deny" for training data policies
See OpenRouter Provider Routing docs for details.
xAI Search Orchestration
Grok models support live web search. Mux enables this by default with mode: "auto". Customize via searchParameters for regional focus, time filters, or to disable search.
Model Parameter Overrides
Set per-model defaults for parameters like temperature, token limits, and sampling by adding a
modelParameters section under any provider:
{
"anthropic": {
"apiKey": "sk-ant-...",
"modelParameters": {
// Override for a specific model
"claude-sonnet-4-5": {
"temperature": 0.7,
"max_output_tokens": 16384,
},
// Wildcard default for all Anthropic models
"*": {
"max_output_tokens": 8192,
},
},
},
}
Supported parameters
| Parameter | Range | Description |
|---|
temperature | 0–2 | Randomness of responses |
top_p | 0–1 | Nucleus sampling threshold |
top_k | positive integer | Top-K sampling |
max_output_tokens | positive integer | Maximum response length |
seed | integer | Deterministic generation seed |
frequency_penalty | number | Penalize repeated tokens |
presence_penalty | number | Penalize tokens already present |
Any unrecognized key is passed through as a provider-specific option (for example, OpenRouter routing hints).
Resolution order
When multiple entries could match, the first match wins (no merging across tiers):
- Effective model ID — a dated snapshot like
claude-sonnet-4-5-20250929
- Canonical model ID — the model you selected, e.g.
claude-sonnet-4-5
- Wildcard
"*" — catch-all for that provider
For example, if you configure both "claude-sonnet-4-5" and "*" with different temperatures,
requesting claude-sonnet-4-5 uses the specific entry — the wildcard is not merged in.
Priority with other settings
For max_output_tokens specifically, the priority chain is:
- Explicit per-message override (from thinking level or UI)
modelParameters config value
- Model’s built-in default
This means model parameters act as a default — they never override explicit per-message choices.
Some providers require specific parameter values when extended thinking is enabled. For example,
Anthropic requires temperature: 1 with thinking. Setting a different temperature in
modelParameters may cause API errors when thinking is active.