# Continue

Use eWest models for chat, edit, apply and embeddings in Continue.

Continue (the VS Code and JetBrains extension) talks to eWest through its `openai` provider with a custom `apiBase`. Chat, edit and apply use eWest chat models; the embeddings role can use `ewest/gemini-embedding`.

> We haven't tested this setup ourselves; it follows the tool's own documentation. If something doesn't work, contact support.

> Autocomplete is not available with eWest yet. It needs a fill-in-the-middle model, and none of eWest's models supports `suffix` on `/v1/completions` (the request returns a 400). Keep the `autocomplete` role on another model.

## Setup

Open Continue's config: click the configs dropdown at the top right of the chat input and the cog next to **Local Config**. That opens `~/.continue/config.yaml` (`%USERPROFILE%\.continue\config.yaml` on Windows). Add eWest models like this, then save; Continue reloads the file.

[Create an API key](https://ewest.ai/keys) and keep it in the `EWEST_KEY` environment variable (`export EWEST_KEY=sk-…`). Never commit it to a repository.

~/.continue/config.yaml:

```yaml
name: eWest
version: 1.0.0
schema: v1

models:
  - name: Claude Sonnet (eWest)
    provider: openai
    model: ewest/claude-sonnet
    apiBase: https://api.ewest.ai/v1
    apiKey: ${{ secrets.EWEST_KEY }}
    roles:
      - chat
      - edit
      - apply
    capabilities:
      - tool_use
      - image_input
    defaultCompletionOptions:
      maxTokens: 4096
  - name: Claude Haiku (eWest)
    provider: openai
    model: ewest/claude-haiku
    apiBase: https://api.ewest.ai/v1
    apiKey: ${{ secrets.EWEST_KEY }}
    roles:
      - chat
      - edit
      - apply
    capabilities:
      - tool_use
      - image_input
    defaultCompletionOptions:
      maxTokens: 4096
```

`provider: openai` with `apiBase: https://api.ewest.ai/v1` sends chat completions to eWest. `tool_use` in `capabilities` turns on Agent mode for the model, and `roles` lists what it is used for. The key is written as `${{ secrets.EWEST_KEY }}`, which Continue resolves from its secrets; the pages we checked don't say where a local config reads them from, so look that up in Continue's docs. If you would rather not, paste the key into `apiKey` instead, and keep `config.yaml` out of any repository.

For search over your codebase, add an embeddings model with the `embed` role:

Embeddings:

```yaml
models:
  - name: Embeddings (eWest)
    provider: openai
    model: ewest/gemini-embedding
    apiBase: https://api.ewest.ai/v1
    apiKey: ${{ secrets.EWEST_KEY }}
    roles:
      - embed
```

## Choose a model

Use the full model ID, including the `ewest/` prefix: `ewest/claude-sonnet` for everyday coding, `ewest/claude-haiku` for fast and cheap work, `ewest/gemini-flash` when you need a very long context. [Models](https://ewest.ai/docs/models) lists every model with its context window and limits; `GET /v1/models` returns the models your key may use.

`model` is the eWest id, `name` is what Continue shows in its picker. Add one entry per model. Embedding ids (`ewest/gemini-embedding`) belong only in `embed` entries, and chat ids only in chat roles.

## Verify it works

Open the Continue chat, pick the eWest model and send a short message. To rule out the key and model, send the same request without Continue:

cURL:

```bash
# The request Continue sends for a chat message, without Continue:
curl https://api.ewest.ai/v1/chat/completions \
  -H "Authorization: Bearer $EWEST_KEY" \
  -H "content-type: application/json" \
  -d '{"model": "ewest/claude-haiku", "stream": true, "messages": [{"role": "user", "content": "Reply with the single word OK"}]}'
```

The request shows up in the console under **Requests** within a few seconds, with its tokens and cost. Every response carries an `x-request-id` header, its [trace ID](https://ewest.ai/docs/traces).

## Streaming and tools

Chat streams by default. Agent mode needs a model with tool calling: keep `tool_use` in its `capabilities` (all current `ewest/*` chat models support tools). Without it Continue treats the model as chat-only.

## Troubleshooting

- **404 `model_not_found`:** the model name needs the `ewest/` prefix (`ewest/claude-sonnet`, not `claude-sonnet`). Check the spelling against [Models](https://ewest.ai/docs/models).
- **401, 402 or 403:** the key is missing or wrong, out of budget, or not allowed to use this model. [Errors](https://ewest.ai/docs/errors) explains each code; a [trace ID](https://ewest.ai/docs/traces) finds the request in the console.
- **Empty answer from `ewest/gemini-flash`:** `ewest/gemini-flash` does not think unless reasoning is on (low, medium or high); then thinking uses output tokens and a small output limit can be used up. Allow at least 256 output tokens in the editor's model settings, or turn reasoning off.
- **Autocomplete returns a 400 or nothing:** eWest has no fill-in-the-middle model, so `/v1/completions` with `suffix` is rejected. Use another model for the `autocomplete` role.
- **The key isn't picked up:** if `${{ secrets.EWEST_KEY }}` doesn't resolve on your setup, put the key directly in `apiKey` (and keep the file private).

List the models your key may use and copy the ids exactly:

cURL:

```bash
# The models your key may call (use these ids exactly, with the ewest/ prefix):
curl -H "Authorization: Bearer $EWEST_KEY" https://api.ewest.ai/v1/models

# One model, with its context window and whether it supports tools and images:
curl -H "Authorization: Bearer $EWEST_KEY" https://api.ewest.ai/v1/models/ewest/claude-haiku
```

Still stuck? Follow [Troubleshoot a request](https://ewest.ai/docs/troubleshooting).

Source: https://ewest.ai/docs/guides/continue
