LLM Providers
Configure which LLM provider powers your SuperAgent agents, manage API keys, and select default models.
SuperAgent uses large language models to power every agent. You choose which provider supplies those models, configure credentials, and pick default models for different purposes. All provider settings are in Settings > LLM.
Supported providers
| Provider | Description | API key field | Environment variable |
|---|---|---|---|
| Anthropic | Direct access to Claude via the Anthropic API. This is the primary provider. | anthropicApiKey | ANTHROPIC_API_KEY |
| OpenRouter | Routes requests through OpenRouter, giving access to Claude models (and others) via a single API key. | openrouterApiKey | OPENROUTER_API_KEY |
| AWS Bedrock | Enterprise-grade Claude inference through Amazon Bedrock. Supports both simple bearer token auth and full IAM credentials. | bedrockApiKey | AWS_BEARER_TOKEN_BEDROCK |
A fourth option, Platform, is available when connected to the SuperAgent platform. It uses managed credentials and requires no separate API key.
Switching providers
Select the active provider in Settings > LLM > Provider. Only one provider is active at a time. Running agents continue using the previous provider until they are restarted -- a notice in the UI warns about this when you switch.
API key management
API keys can be configured in two ways:
- Settings UI -- Enter the key in Settings > LLM under the credentials section. Keys saved this way are stored locally in
settings.jsonwith file permissions restricted to the current user (mode0600). - Environment variables -- Set the appropriate environment variable before starting SuperAgent. If both a saved key and an environment variable exist, the saved key takes precedence.
The UI shows the current key status with a badge indicating the source ("Using saved setting" or "Using environment variable"). You can remove a saved key to fall back to the environment variable, or save a new key to override it.
Key validation
When you enter a key in the Settings UI, SuperAgent validates it by making a minimal API call (a single-token request to Claude Haiku). The key is only saved if validation succeeds. This catches common issues like expired keys, incorrect prefixes, or insufficient permissions.
Anthropic (primary)
The Anthropic provider sends requests directly to the Anthropic API at https://api.anthropic.com.
Environment variable: ANTHROPIC_API_KEY
When a container starts, the Anthropic API key is injected via the ANTHROPIC_API_KEY environment variable so the Claude Code process inside the container can authenticate.
Available models
| Model ID | Display name | Default for |
|---|---|---|
claude-opus-4-7 | Claude 4.7 Opus | Agent (default model) |
claude-opus-4-6 | Claude 4.6 Opus | -- |
claude-sonnet-4-6 | Claude 4.6 Sonnet | Browser agent |
claude-haiku-4-5 | Claude 4.5 Haiku | Summarizer |
OpenRouter
OpenRouter provides an Anthropic-compatible API endpoint that routes requests to multiple model providers. This is useful when you want a single API key that can access Claude alongside other models, or when you need to route traffic through OpenRouter for billing or quota reasons.
Environment variable: OPENROUTER_API_KEY
When a container starts, three environment variables are injected:
ANTHROPIC_API_KEYis set to an empty string (prevents the SDK from sending thex-api-keyheader).ANTHROPIC_BASE_URLis set tohttps://openrouter.ai/api.ANTHROPIC_AUTH_TOKENcarries your OpenRouter key via theAuthorization: Bearerheader.
Available models
The same Claude model IDs are available as with the direct Anthropic provider. The default agent model for OpenRouter is Claude 4.6 Sonnet (rather than Opus) as a cost-conscious default.
AWS Bedrock
AWS Bedrock provides Claude model inference through Amazon's managed AI infrastructure. This is the recommended option for enterprises that route all AI traffic through their AWS account for compliance, cost allocation, or network isolation.
Authentication methods
Bedrock supports two authentication methods:
Simple auth (Bearer Token):
- Set the
AWS_BEARER_TOKEN_BEDROCKenvironment variable or enter the token in Settings > LLM > Credentials. - This is the simplest option when you have a Bedrock-specific API key.
Full AWS credentials (Access Key + Secret):
- Set
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYas environment variables, or enter them in Settings > LLM > Credentials. - Configure the AWS region (defaults to
us-east-1). This can be set via theAWS_REGIONenvironment variable or in settings.
If neither method is configured, Bedrock falls back to the default AWS credential chain (e.g., ~/.aws/credentials or instance profile).
When a container starts with Bedrock as the active provider, the container receives CLAUDE_CODE_USE_BEDROCK=1 to tell the Claude Code SDK to use Bedrock mode. The ANTHROPIC_API_KEY is explicitly cleared so the container does not accidentally fall back to the direct Anthropic API.
Available models
Bedrock uses cross-region model IDs:
| Model ID | Display name | Default for |
|---|---|---|
us.anthropic.claude-opus-4-7 | Claude 4.7 Opus | -- |
us.anthropic.claude-opus-4-6-v1 | Claude 4.6 Opus | -- |
us.anthropic.claude-sonnet-4-6 | Claude 4.6 Sonnet | Agent, Browser agent |
us.anthropic.claude-haiku-4-5-20251001-v1:0 | Claude 4.5 Haiku | Summarizer |
Model configuration
Default model
The Default Model in Settings > LLM > Models is used for new agent sessions when no per-message model is selected. This defaults to Claude Opus (the most capable model).
Summarizer model
The Summarizer Model is used for lightweight tasks such as session name generation and API key validation. Defaults to Claude Haiku for speed and cost efficiency.
Per-message model selector
In the message composer, users can switch between three model families on a per-message basis:
- Opus -- Most capable; best for complex, multi-step tasks.
- Sonnet -- Balanced speed and capability.
- Haiku -- Fastest and most affordable.
The model family selected in the composer applies to that message and persists for subsequent messages in the same session until changed.
Tool search
The Tool Search toggle in Settings > LLM > Advanced controls whether agent containers load tool definitions on demand via a meta-tool or all at once upfront. This is enabled by default and saves approximately 15,000-20,000 context tokens per turn for SuperAgent's 60+ tool surface. Tool search requires Sonnet 4+ or Opus 4+ and is ignored on Haiku.
Disable this only when debugging tool-loading behavior.
Environment variables reference
| Variable | Description |
|---|---|
ANTHROPIC_API_KEY | Anthropic API key (direct provider). |
OPENROUTER_API_KEY | OpenRouter API key. |
AWS_BEARER_TOKEN_BEDROCK | AWS Bedrock bearer token (simple auth). |
AWS_ACCESS_KEY_ID | AWS access key ID (Bedrock full credentials). |
AWS_SECRET_ACCESS_KEY | AWS secret access key (Bedrock full credentials). |
AWS_REGION | AWS region for Bedrock (default: us-east-1). |