> ## Documentation Index
> Fetch the complete documentation index at: https://bolt-builder-bolt-cli-5b0aab46-mintlify-a8a84065.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Providers & Models — LLM Authentication and Selection

> Bolt supports any LLM provider via the Vercel AI SDK. Authenticate providers, list models, tune reasoning effort, and race models with best-of-N or arena.

Bolt is model-agnostic by design. Under the hood it uses the **Vercel AI SDK** to speak to providers, which means any provider the SDK supports — Anthropic, OpenAI, Google, Amazon Bedrock, OpenRouter, and more — works out of the box. The provider and model catalog is sourced from [models.dev](https://models.dev), a community-maintained database of provider metadata and pricing.

## Managing provider credentials

Use `bolt providers` (aliased as `bolt auth`) to add, list, and remove provider credentials.

### Add or update credentials

```bash theme={null}
bolt providers login
# or equivalently:
bolt auth login
```

This launches an interactive prompt to select a provider and enter credentials. To skip the interactive flow, pass flags directly:

```bash theme={null}
bolt providers login --provider anthropic
bolt providers login --provider openai --method "API key"
```

### List configured providers

```bash theme={null}
bolt providers list
# or:
bolt auth list
```

Displays all stored credentials and any provider API keys detected from environment variables.

### Remove credentials

```bash theme={null}
bolt providers logout
bolt providers logout anthropic
```

### Environment variable authentication

For CI pipelines or headless environments, set the provider's API key environment variable directly — no interactive login required. Common examples:

```bash theme={null}
export ANTHROPIC_API_KEY="sk-ant-..."
export OPENAI_API_KEY="sk-..."
export GOOGLE_GENERATIVE_AI_API_KEY="AIza..."
```

Bolt reads these variables automatically at startup. `bolt providers list` will surface which environment variables it detected.

## Browsing available models

`bolt models` lists every model available across your configured providers.

```bash theme={null}
# List all models
bolt models

# Filter to one provider
bolt models anthropic

# Show cost and capability metadata
bolt models --verbose

# Refresh the model catalog from models.dev
bolt models --refresh
```

<Tip>
  Run `bolt models --verbose` to see input/output token pricing for every model. This makes it easy to compare cost trade-offs before committing to a model for a long-running task.
</Tip>

### Model identifier format

Models are always referenced in `provider/model` format:

```
anthropic/claude-opus-4-5
openai/gpt-4o
google/gemini-2.5-pro
openrouter/anthropic/claude-opus-4-5
```

Use this format anywhere Bolt accepts a model — CLI flags, config files, and agent definitions.

## Selecting a model at runtime

### `--model` / `-m` flag

The `--model` flag is available on `bolt run`, `bolt commit`, and `bolt review`:

```bash theme={null}
bolt run --model anthropic/claude-opus-4-5 "refactor the payment module"
bolt commit --model openai/gpt-4o
bolt review --model google/gemini-2.5-pro --staged
```

### `--variant` — controlling reasoning effort

Some models support configurable reasoning effort levels (e.g., Anthropic's extended thinking, OpenAI's reasoning models). Use `--variant` to select the effort tier:

```bash theme={null}
bolt run --variant high "design a distributed rate limiter"
bolt run --variant minimal "rename this variable"
```

<Note>
  The available variant values depend on the provider and model. Common values are `minimal`, `low`, `medium`, `high`, and `max`, but the exact set varies. Check your provider's documentation or use `bolt models --verbose` to see supported variants for a given model.
</Note>

### `--thinking` — show reasoning blocks

When using a model that supports extended thinking, pass `--thinking` to surface the model's chain-of-thought in the output:

```bash theme={null}
bolt run --model anthropic/claude-opus-4-5 --variant high --thinking \
  "why does the token refresh logic race in the auth service?"
```

## Best-of-N parallel runs

`--best-of` fires the same prompt at multiple models in parallel, then uses a judge model to rank the responses and keep the best one:

```bash theme={null}
bolt run --best-of "anthropic/claude-opus-4-5,openai/gpt-4o,google/gemini-2.5-pro" \
  "implement a binary search tree with full test coverage"
```

The judge defaults to the model passed via `--model`, or to the first entry in the `--best-of` list if `--model` is not set. The flag accepts a comma-separated list of `provider/model` identifiers.

<Tip>
  Best-of-N is especially useful for complex algorithmic problems or architecture decisions where different models may bring genuinely different approaches. Let Bolt run them in parallel and pick the winner automatically.
</Tip>

## Arena — parallel runs in isolated worktrees

`bolt arena` takes the same idea further and races several agents on the same task. Each contender gets its own git worktree, so they can freely edit files without stepping on each other. When they finish, a judge model ranks them on **the final answer plus the actual git diff** — not just the text they wrote.

```bash theme={null}
bolt arena --models anthropic/claude-sonnet-4,openai/gpt-5 \
  "add retry logic to the fetch helper"
```

Reach for arena instead of `--best-of` when the task involves editing files (refactors, feature work, test writing) rather than pure Q\&A. The winning worktree stays on disk so you can inspect it, run tests, or merge the branch. The scoreboard and worktree paths print to stderr; the winner's answer goes to stdout.

* `--models` accepts 2+ `provider/model` entries. Duplicates are allowed — racing a model against itself in separate worktrees is a legitimate setup.
* `--judge` picks the ranking model (defaults to the first entry in `--models`).
* `--cleanup` deletes losing worktrees and their branches after judging. Without it, every worktree sticks around for you to review.
* `--format json` emits a single JSON payload with the winner, ranking, and every candidate for scripting.

See [`bolt arena`](/reference/commands) in the command reference for the full flag list.
