magi-code 0.95.2

Repository-aware CLI coding agent for terminal work
Documentation
# Providers and models

A provider supplies the model used by magi-code. Connect at least one provider, then choose a model for each session.

## Connect a provider

Enter `/login` and choose:

- **OpenAI Codex**: browser sign-in with a ChatGPT account.
- **OpenAI**: set `OPENAI_API_KEY` before launching magi-code.
- **Anthropic**: set `ANTHROPIC_API_KEY` before launching magi-code.
- **Claude Subscription**: install Claude Code and run `claude auth login`. Then refresh the model catalog and pick a `claude-subscription/<model-name>` model. This uses your claude.ai sign-in, not an API key.
- **Custom Provider**: enter an OpenAI-compatible base URL and optional API-key environment-variable name.

API-key providers show environment setup instructions instead of a key-entry field. Restart magi-code after setting an environment variable.

Example:

```sh
export ANTHROPIC_API_KEY="your-key"
magi-code
```

Do not put keys in `settings.json`, prompts, or repository files.

### Claude Subscription

You need the `claude` CLI installed and signed in to claude.ai. Magi-code looks for `claude` on your `PATH` first, then at `~/.local/bin/claude`. It works on macOS, Linux, and WSL. Native Windows isn't supported, so on Windows run both magi-code and Claude Code inside WSL.

Magi-code never stores or reuses your Claude credentials. Leave `ANTHROPIC_API_KEY` and other Claude backend overrides unset while you use this provider. `/logout` can't sign you out of the CLI; run `claude auth logout` for that.

Refreshing the catalog lists Claude models from the models.dev Anthropic catalog. Your account hasn't been checked against that list, so the CLI may reject a model because of your CLI version, your plan, or availability. Picking a model from the cache doesn't contact models.dev or run the CLI, but sending a request still checks that the CLI is ready. If a refresh fails, the cached models stay visible only while the CLI is ready.

Your reasoning selection is passed to the CLI's `--effort` flag, and the CLI sets the output limit. When a model isn't available, the error names the kind of problem without showing raw provider output.

## Choose a model

Enter `/model` or press `Alt-M` while idle. Pick a provider and model from the cached catalog.

If no models appear:

1. Open `/settings`.
2. Select **Models**.
3. Choose **Refresh catalog**.
4. Enable or disable models as needed.
5. Save. The model picker updates for future selections.

You can also launch with a temporary override:

```sh
magi-code --provider openai-codex --model gpt-5.5
```

## Adjust reasoning and response detail

Mission Control shows model and reasoning controls near the prompt. Available reasoning levels depend on provider and model.

Response detail controls visible answer length, latency, and cost where supported. It does not change reasoning effort or impose an exact answer length.

## Fast mode

Use `/fast on`, `/fast off`, or `/fast status`. Fast mode requests an eligible provider service tier; provider access, billing, and actual speed still depend on your account and model.

## Custom providers

Use `/login`, choose **Custom Provider**, and supply:

- a stable provider ID
- display label
- API base URL
- optional environment-variable name for its API key
- optional `models.dev` namespace

Custom providers can need advanced JSON settings for endpoint choice, reasoning behavior, extra model IDs, response detail, or Fast tiers.

## Sign out

Use `/logout <provider-id>`. Signing out removes that provider's stored credentials or global custom-provider metadata. It does not delete sessions.

## Advanced reference

See [Provider authentication](../features/provider-authentication.md) and [model/provider settings](../features/configuration.md#model-and-provider-options) for exact provider behavior, custom fields, credential storage, and refresh rules.