# Cline

> Route Cline in VS Code or the terminal through HeyEly's OpenAI-compatible gateway.

Cline connects cleanly to HeyEly through its **OpenAI Compatible** provider. Because Cline uses Chat Completions, point it at `https://heyely.si/v1` with your HeyEly API key and a catalog model ID.

## Set up

### VS Code extension

1. Create a key in [Developers](https://heyely.si/keys).
2. Open the Cline sidebar, click the gear icon, and pick **OpenAI Compatible** under **API Provider**.
3. Enter `https://heyely.si/v1` for **Base URL** (replacing OpenAI's default URL).
4. Paste your key into **API Key**.
5. Copy a **Model ID** from [Models](https://heyely.si/docs/models), such as `anthropic/claude-sonnet-5.5`.
6. Expand **Model Configuration** and fill in **Context Window** and **Max Output Tokens** from the model's catalog page. Enable **Image Support** as well if your chosen model accepts images, since Cline requires manual values here.

### Command line

Install the CLI globally via `npm i -g cline` and run `cline auth`. Select **OpenAI Compatible**, then supply the same base URL, key, and model ID.

Cline writes the saved key into `~/.cline/data/settings/providers.json`. Keep that file private and out of Git.

## Verify

1. Send a quick test prompt like "Hello" inside Cline.
2. Open [Credit and usage](https://heyely.si/usage) and confirm the request shows at the top of **Spend** with your selected model.

Using the CLI? Run `cline doctor` to verify your configuration end to end.

## Pick a model

Any chat model in HeyEly's catalog works with Cline. For the smoothest agent workflow, choose models listing `tools` in their supported parameters because Cline leans heavily on tool calling.

## Troubleshooting

| You see                      | Cause                                           | Fix                                           |
| ---------------------------- | ----------------------------------------------- | --------------------------------------------- |
| Traffic still goes to OpenAI | Base URL was left at OpenAI's default           | Change **Base URL** to `https://heyely.si/v1` |
| `401 invalid_api_key`        | Extra whitespace or a non-HeyEly key was pasted | Paste your bare `sk-df-` key cleanly          |
| `404 model_not_found`        | Model ID contains a typo                        | Copy the exact ID from the Models page        |
| Replies stop mid-sentence    | Max Output Tokens is configured too low         | Match it to the model's full output cap       |
| `402 insufficient_credit`    | Your credit balance is depleted                 | [Add credit](https://heyely.si/credit?step=add)                |
