# Cline

> Add Deference to Cline as an OpenAI-compatible provider.

Cline's OpenAI Compatible provider takes a base URL, a key and a model id. It speaks Chat Completions, so the base URL is `https://deference.si/v1`.

## Set up

### VS Code extension

1. Create a key in [API keys](https://deference.si/keys).
2. Open the Cline panel, select the settings gear, and set **API Provider** to **OpenAI Compatible**.
3. Set **Base URL** to `https://deference.si/v1`. It must not be OpenAI's address.
4. Paste your key into **API Key**.
5. Enter a **Model ID** from the [Models](https://deference.si/models) page, for example `anthropic/claude-sonnet-5.5`.
6. Under **Model Configuration**, set **Context Window** and **Max Output Tokens** from the model's page, and turn on **Image Support** if the model reads images. Cline asks for these by hand.

### Command line

Install with `npm i -g cline`, then run `cline auth`. Choose **OpenAI Compatible** and enter the same base URL, key and model id.

Cline stores the key in `~/.cline/data/settings/providers.json`. Do not share or commit that file.

## Verify

1. Send Cline a short message, such as "Hello".
2. Open [Activity](https://deference.si/activity). The request is the top row, with the model you chose.

For the command line, run `cline doctor` to diagnose the setup.

## Pick a model

Any chat model in the catalog works. Models that list `tools` under supported parameters suit Cline best, because it relies on tool calls.

## Troubleshooting

| You see                       | Cause                                                        | Fix                                 |
| ----------------------------- | ------------------------------------------------------------ | ----------------------------------- |
| Requests reach OpenAI instead | The base URL is the OpenAI one                               | Set it to `https://deference.si/v1` |
| `401 invalid_api_key`         | The key has extra characters, or it is another service's key | Paste the bare `sk-df-` key again   |
| `404 model_not_found`         | The model id has a typo                                      | Copy it from the Models page        |
| Responses cut off             | Max Output Tokens is set too low                             | Raise it to the model's limit       |
| `402 insufficient_credit`     | No available credit                                          | [Add credit](https://deference.si/wallet?tab=add)       |
