# CodeBuddy

Run CodeBuddy on Boundless models: install, the models.json entry, a verify command and common errors.


CodeBuddy's IDE, editor plugins and the CodeBuddy Code CLI all read `~/.codebuddy/models.json`.

## Install

Install CodeBuddy from its own documentation first. Then pick one way to point it at Boundless.

Run this in a terminal on macOS or Linux and choose **CodeBuddy**:

```bash
curl -fsSL https://boundless.md/install | sh
```

Or run the package yourself, which also works on Windows:

```bash
npx -y @boundless.md/setup@latest
```

Setup signs you in through your browser, creates a key on your account and backs up every file it changes. To undo it, run `curl -fsSL https://boundless.md/install | sh -s -- --revert`. Need a key to configure by hand? Create one in [API Keys](https://inference.boundless.network/settings/api-keys).

## Configure

### CodeBuddy

CodeBuddy's IDE, editor plugins and the CodeBuddy Code CLI all read `~/.codebuddy/models.json`. `url` is the full chat-completions path, not a base URL:

```json
{
  "models": [
    {
      "id": "deepseek/deepseek-v4.1-flash",
      "name": "deepseek/deepseek-v4.1-flash",
      "vendor": "Boundless",
      "url": "https://api.inference.boundless.network/v1/chat/completions",
      "apiKey": "${BOUNDLESS_API_KEY}",
      "maxInputTokens": 1000000,
      "maxOutputTokens": 32000,
      "supportsToolCall": true,
      "supportsReasoning": true
    }
  ],
  "availableModels": ["deepseek/deepseek-v4.1-flash"]
}
```

```bash
export BOUNDLESS_API_KEY="YOUR_API_KEY"
codebuddy --model "deepseek/deepseek-v4.1-flash"
```

The model appears in the IDE's picker tagged `custom`. A custom model inherits none of CodeBuddy's built-in fast and reasoning companions; If you want them, name them in `relatedModels` on the entry.

## Model ids

The examples use `deepseek/deepseek-v4.1-flash`. Use any id from `GET https://api.inference.boundless.network/v1/models`; the [models page](https://inference.boundless.network/models) lists each one with its price and limits.

## Verify

Run the export and `codebuddy` commands from the setup above, then check that a reply comes back. The model appears in the IDE's picker tagged `custom`.

To check the base URL and key on their own, list the models the gateway serves. A list of models means both are right. A `401` means the key is missing or wrong:

```bash
curl https://api.inference.boundless.network/v1/models -H "Authorization: Bearer YOUR_API_KEY"
```

## Common errors

| What you see | What it usually is |
| --- | --- |
| `401` on every request | `BOUNDLESS_API_KEY` is not set in the shell that started CodeBuddy. |
| Requests go to a wrong path | `url` must be the full chat-completions path, not a base URL. |
| `403` with `model_not_allowed` | Your team admin has not enabled that model for you. Ask them, or pick another. See [Model access](https://inference.boundless.network/docs/teams#model-access). |

Every status and code is on the [Errors](https://inference.boundless.network/docs/errors) page. Other harnesses are on the [Coding Agents & Harnesses](https://inference.boundless.network/docs/coding-agents-and-harnesses) page.
