# JetBrains AI & Junie

Use Boundless in JetBrains AI Assistant and the Junie CLI: the provider settings, the Junie profile, what is not covered and common errors.


JetBrains AI Assistant's chat takes an OpenAI-compatible provider, and the Junie CLI takes a profile file. Both use the base URL `https://api.inference.boundless.network/v1`.

## Install

Install your JetBrains IDE or the Junie CLI from JetBrains' own documentation first. Then pick one way to point it at Boundless.

Run this in a terminal on macOS or Linux and choose **JetBrains AI & Junie**:

```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

### JetBrains AI & Junie

AI Assistant's chat takes an OpenAI-compatible provider. Open **Settings | Tools | AI Assistant | Providers & API keys**, add an OpenAI-compatible provider under **Third-party AI providers**, and give it the base URL and key:

```yaml
url: https://api.inference.boundless.network/v1
api_key: your-boundless-key
```

Turn on **Tool calling**, then click **Test Connection** and **Apply**. The models appear in the AI Chat model picker, and **Models Assignment** can put one on the other AI Assistant features. Code completion does not use this provider.

Junie inside the IDE only runs on a JetBrains AI subscription, so it cannot use this provider. The Junie CLI can. Save a profile as `~/.junie/models/boundless.json`:

```json
{
  "displayName": "Boundless",
  "baseUrl": "https://api.inference.boundless.network/v1/chat/completions",
  "apiType": "OpenAICompletion",
  "apiKey": "${BOUNDLESS_API_KEY}",
  "id": "deepseek/deepseek-v4.1-flash",
  "maxContextLength": 1048576,
  "fasterModel": { "id": "deepseek/deepseek-v4-flash-0731" }
}
```

`baseUrl` is the full chat-completions URL, because Junie does not append a path to it. `fasterModel` handles summaries and other helper work. The file name is the profile id:

```bash
export BOUNDLESS_API_KEY="YOUR_API_KEY"
junie --model custom:boundless
```

## 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

In AI Assistant, click **Test Connection** and check that the models appear in the AI Chat model picker. For Junie, run the `junie` command from the setup above.

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 | The key in the provider settings is wrong, or `BOUNDLESS_API_KEY` is not set in the shell that started `junie`. |
| Code completion does not use Boundless | Code completion does not use this provider. |
| Junie inside the IDE cannot use the provider | Junie inside the IDE only runs on a JetBrains AI subscription. The Junie CLI can use it. |
| `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.
