# Junie

Source: https://docs.aicentos.com/en/clients/junie

Language: en

> Use aicentos in Junie CLI through a custom model profile

Junie is JetBrains' coding agent, available as an IDE plugin and as the Junie CLI. **Only the Junie CLI supports pointing at a custom endpoint**: it connects to any OpenAI-compatible service through JSON profiles under `$JUNIE_HOME/models/`. The IDE plugin cannot currently target a custom endpoint.

## Prerequisites

First create a dedicated key for Junie on the console's "API Keys" page (naming it `junie-cli` is a good idea).

* Console: [https://aicentos.com](https://aicentos.com)
* Create a key: [https://aicentos.com/keys](https://aicentos.com/keys)
* Top up when the balance runs out: [https://aicentos.com/wallet](https://aicentos.com/wallet)

## Configuration to fill in

| Field                          | Value                                                             |
| ------------------------------ | ----------------------------------------------------------------- |
| `baseUrl`                      | `https://aicentos.com/v1/chat/completions`                        |
| `apiType`                      | `OpenAICompletion`                                                |
| `apiKey`                       | The key created in the console (supports `${ENV_VAR}` references) |
| `id`                           | A model name from the Model Gallery in the console                |
| `displayName` / `providerName` | Custom, e.g. `aicentos`                                           |

Note: Junie's profile is the opposite of most clients — `baseUrl` must be the **full endpoint** and must end with `/chat/completions`; Junie does not append the path for you.

## Setup steps

* Create the profile file (the file name without `.json` is the profile identifier):
  * User level: `~/.junie/models/aicentos.json` (`$JUNIE_HOME` defaults to `~/.junie`)
  * Project level: `<project root>/.junie/models/aicentos.json` (the project must be trusted)
* Write the following content:

```json
{
  "id": "gpt-5",
  "baseUrl": "https://aicentos.com/v1/chat/completions",
  "apiType": "OpenAICompletion",
  "apiKey": "${AICENTOS_API_KEY}",
  "displayName": "aicentos GPT",
  "providerName": "aicentos",
  "fasterModel": { "id": "gpt-5-mini" }
}
```

* Export the environment variable:

```bash
export AICENTOS_API_KEY="sk-your-aicentos-key"
```

* Specify the profile at launch, or select it with `/model` in the interactive interface:

```bash
junie --model custom:aicentos
```

## Test

After launching, send a simple prompt as a lightweight test; once results come back normally, move on to real agentic workflows.

## Notes

* **The JetBrains IDE plugin does not support custom endpoints**; these profiles only take effect in the Junie CLI.
* `baseUrl` must be the full endpoint (including `/v1/chat/completions`), unlike many clients that only need the Base URL.
* `${VAR}` in `apiKey` and `extraHeaders` is resolved when the profile loads; an unset environment variable makes profile loading fail.
* Project-level profiles are subject to project trust; untrusted projects report `Unknown custom model profile`.
* Small models struggle with Junie's multi-step tool calling and long-context tasks; pick a capable model.
* More details on the docs site: [https://docs.aicentos.com](https://docs.aicentos.com)