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

ProviderDescriptionAPI key fieldEnvironment variable
AnthropicDirect access to Claude via the Anthropic API. This is the primary provider.anthropicApiKeyANTHROPIC_API_KEY
OpenRouterRoutes requests through OpenRouter, giving access to Claude models (and others) via a single API key.openrouterApiKeyOPENROUTER_API_KEY
AWS BedrockEnterprise-grade Claude inference through Amazon Bedrock. Supports both simple bearer token auth and full IAM credentials.bedrockApiKeyAWS_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:

  1. Settings UI -- Enter the key in Settings > LLM under the credentials section. Keys saved this way are stored locally in settings.json with file permissions restricted to the current user (mode 0600).
  2. 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 IDDisplay nameDefault for
claude-opus-4-7Claude 4.7 OpusAgent (default model)
claude-opus-4-6Claude 4.6 Opus--
claude-sonnet-4-6Claude 4.6 SonnetBrowser agent
claude-haiku-4-5Claude 4.5 HaikuSummarizer

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_KEY is set to an empty string (prevents the SDK from sending the x-api-key header).
  • ANTHROPIC_BASE_URL is set to https://openrouter.ai/api.
  • ANTHROPIC_AUTH_TOKEN carries your OpenRouter key via the Authorization: Bearer header.

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_BEDROCK environment 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_ID and AWS_SECRET_ACCESS_KEY as environment variables, or enter them in Settings > LLM > Credentials.
  • Configure the AWS region (defaults to us-east-1). This can be set via the AWS_REGION environment 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 IDDisplay nameDefault for
us.anthropic.claude-opus-4-7Claude 4.7 Opus--
us.anthropic.claude-opus-4-6-v1Claude 4.6 Opus--
us.anthropic.claude-sonnet-4-6Claude 4.6 SonnetAgent, Browser agent
us.anthropic.claude-haiku-4-5-20251001-v1:0Claude 4.5 HaikuSummarizer

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.

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

VariableDescription
ANTHROPIC_API_KEYAnthropic API key (direct provider).
OPENROUTER_API_KEYOpenRouter API key.
AWS_BEARER_TOKEN_BEDROCKAWS Bedrock bearer token (simple auth).
AWS_ACCESS_KEY_IDAWS access key ID (Bedrock full credentials).
AWS_SECRET_ACCESS_KEYAWS secret access key (Bedrock full credentials).
AWS_REGIONAWS region for Bedrock (default: us-east-1).