# Continue

> Add Deference to Continue as an OpenAI provider with a custom base URL.

Continue treats Deference as an `openai` provider with its own `apiBase`. It speaks Chat Completions, so the base URL is `https://deference.si/v1`.

## Set up

1. Create a key in [API keys](https://deference.si/keys) and add it to `~/.continue/.env` as a line with no quotes.

```bash
DEFERENCE_API_KEY=sk-df-...
```

2. Add the model to `~/.continue/config.yaml` (on Windows, `%USERPROFILE%\.continue\config.yaml`).

```yaml
name: Deference
version: 0.0.1
schema: v1
models:
  - name: Claude Sonnet 5.5 (Deference)
    provider: openai
    model: anthropic/claude-sonnet-5.5
    apiBase: https://deference.si/v1
    apiKey: ${{ secrets.DEFERENCE_API_KEY }}
    roles:
      - chat
      - edit
      - apply
    capabilities:
      - tool_use
    defaultCompletionOptions:
      contextLength: 200000
      maxTokens: 32000
```

3. Restart your editor so the extension reads the `.env` file, then pick the model in the chat dropdown.

The extension cannot see variables you export in a terminal. Use `~/.continue/.env` for a key available across projects. Continue also reads project `.env` and `.continue/.env` files before the global file, so an old project value can override it. Keep every file containing keys out of version control. The `cn` command-line tool also reads process environment variables. See [Continue's secret lookup order](https://docs.continue.dev/faqs#managing-local-secrets-and-environment-variables).

## Verify

Send a chat message, then open [Activity](https://deference.si/activity). The request is the top row, with the model you chose.

Continue has no status command. If the model does not respond, open the editor's developer tools and read the console. In VS Code that is **Developer: Toggle Developer Tools**.

## Pick a model

* The dropdown shows `name`. `model` is the id sent to Deference, slashes included.
* Add `capabilities: [tool_use]`. Continue only turns on Agent mode for ids it recognizes, and `anthropic/...` ids are not among them. Add `image_input` for models that read images.
* Continue sends ids that start with `openai/gpt-5` to the Responses API by default. Deference serves both formats. Add `useResponsesApi: false` to a model to keep it on Chat Completions.

## Troubleshooting

| You see                              | Cause                                           | Fix                                                                                               |
| ------------------------------------ | ----------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| `401 invalid_api_key`                | The secret did not resolve                      | Check the name in `~/.continue/.env` matches `secrets.DEFERENCE_API_KEY`, then restart the editor |
| The model does not appear            | The YAML is invalid                             | Check the indentation and the `schema` line                                                       |
| Agent mode is unavailable            | Continue does not know the model supports tools | Add `capabilities: [tool_use]`                                                                    |
| `404`                                | `apiBase` lacks `/v1`                           | Use `https://deference.si/v1`                                                                     |
| `404 model_not_found`                | `model` differs from the catalog                | Copy the id from the Models page                                                                  |
| A request goes to the wrong endpoint | Continue picked the Responses API               | Set `useResponsesApi: false`                                                                      |
