> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openp.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Cline / Continue

> Connect OpenPAI in VS Code via Cline and Continue

[Cline](https://github.com/cline/cline) and [Continue](https://continue.dev/) are popular open-source AI coding agents in VS Code.

## Cline

<Steps>
  <Step title="Install">
    Search for **Cline** in the VS Code extensions and install it.
  </Step>

  <Step title="Choose an API provider">
    Open Cline in the sidebar → settings icon → **API Configuration**.
    Set Provider to **OpenAI Compatible**.
  </Step>

  <Step title="Fill in the connection">
    * **Base URL**: `https://openp.ai/v1`
    * **API Key**: `sk-XXXXXXXXXXXXXXXX`
    * **Model ID**: `claude-opus-4-8` (recommended, strong at code) or `gpt-5.5`
  </Step>

  <Step title="Enable Plan / Act mode">
    Cline autonomously plans → executes → reviews file changes inside the editor.
  </Step>
</Steps>

<Tip>Claude Sonnet 4.6 is Cline's officially recommended best companion; OpenPAI offers the same model with token-based billing.</Tip>

## Continue

<Steps>
  <Step title="Install">
    Search for **Continue** in the VS Code extensions and install it.
  </Step>

  <Step title="Edit the config file">
    Open `~/.continue/config.json` (`%USERPROFILE%\.continue\config.json` on Windows)
    and add to the `models` array:
  </Step>
</Steps>

```json theme={null}
{
  "models": [
    {
      "title": "OpenPAI Claude Sonnet 4.6",
      "provider": "openai",
      "model": "claude-opus-4-8",
      "apiKey": "sk-XXXXXXXXXXXXXXXX",
      "apiBase": "https://openp.ai/v1"
    },
    {
      "title": "OpenPAI GPT-4o",
      "provider": "openai",
      "model": "gpt-5.5",
      "apiKey": "sk-XXXXXXXXXXXXXXXX",
      "apiBase": "https://openp.ai/v1"
    }
  ],
  "tabAutocompleteModel": {
    "title": "OpenPAI Autocomplete",
    "provider": "openai",
    "model": "gpt-5.5",
    "apiKey": "sk-XXXXXXXXXXXXXXXX",
    "apiBase": "https://openp.ai/v1"
  }
}
```

After saving, Continue reloads automatically and the models appear in the main dropdown.

## Recommended model combination

| Use case           | Recommendation                      |
| ------------------ | ----------------------------------- |
| Main chat / agent  | `claude-opus-4-8`, `gpt-5.5`        |
| Autocomplete (Tab) | `gpt-5.4-mini` (low latency, cheap) |
| Inline edit        | `claude-haiku-4-5`, `gpt-5.5`       |
| Explain code       | `gpt-5.5`, `claude-opus-4-8`        |

## Tips

* Cline includes a lot of context in requests (the whole workspace index), which can consume many tokens — set a quota cap for that token.
* Enabling Claude prompt caching can significantly cut the cost of repeated conversations; Cline sends `cache_control` markers by default.
