> ## Documentation Index
> Fetch the complete documentation index at: https://docs.llmeasy.ru/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Kodacode to LLMEasy with a custom model

> Configure a custom OpenAI-compatible model in the Kodacode / Koda VS Code extension.

The Kodacode VS Code extension can use models in chat, agent, and edit workflows. To connect LLMEasy, add an **Any OpenAI-compatible API** model and use a GPT Key group API Key.

<Info>
  This guide uses the VS Code extension as the example. The Kodacode installation docs list VS Code `1.75` or newer as the minimum version, and the extension ID is `Koda.koda`.
</Info>

## Prerequisites

* VS Code is installed
* The Kodacode / Koda extension is installed
* LLMEasy API Key (<a href={"https://www.llmeasy.ru/register"}>register here</a>)
* The API Key belongs to the **GPT Key group**
* A GPT Key group model ID copied from the <a href={"https://www.llmeasy.ru/pricing"}>model plaza</a>, for example `gpt-5.5`

## Setup

<Steps>
  <Step title="Open the Koda panel and add a model">
    Open the **KODA** panel in the VS Code sidebar, click the model selector below the input box, and choose **Добавить модель: Agent** / **Add model: Agent**.

    <Frame>
      <img src="https://mintcdn.com/bettertoken/JsSNwp3BGwYpLlK1/images/kodacode/select-model-menu.png?fit=max&auto=format&n=JsSNwp3BGwYpLlK1&q=85&s=867c818ce56ad909161f7fd3dcab2e47" alt="Choose Add model: Agent from the model selector in the Koda panel." style={{ borderRadius: '0.5rem' }} width="3012" height="1600" data-path="images/kodacode/select-model-menu.png" />
    </Frame>
  </Step>

  <Step title="Fill in the OpenAI-compatible model settings">
    In the add model dialog, use these values:

    | Field    | Recommended value                                                                                                   |
    | -------- | ------------------------------------------------------------------------------------------------------------------- |
    | Provider | `Any OpenAI-compatible API`                                                                                         |
    | API Base | `https://www.llmeasy.ru/v1/`                                                                                        |
    | Model ID | A GPT Key group model ID from the <a href={"https://www.llmeasy.ru/pricing"}>model plaza</a>, for example `gpt-5.5` |
    | API Key  | Your LLMEasy API Key                                                                                                |

    Click **Подключить** / **Connect** after filling in the fields.

    <Frame>
      <img src="https://mintcdn.com/bettertoken/JsSNwp3BGwYpLlK1/images/kodacode/add-openai-compatible-model.png?fit=max&auto=format&n=JsSNwp3BGwYpLlK1&q=85&s=f3da14509732195af35771da421ecb47" alt="Select Any OpenAI-compatible API in the Kodacode add model dialog and fill in API Base, Model ID, and API Key." style={{ borderRadius: '0.5rem' }} width="3012" height="1600" data-path="images/kodacode/add-openai-compatible-model.png" />
    </Frame>
  </Step>

  <Step title="Confirm that the model is active">
    After the connection succeeds, select the new model, such as `gpt-5.5`, from the model selector under the Koda input box. Send a short message to confirm that it returns a response.
  </Step>

  <Step title="Check config.yaml">
    Kodacode writes the configuration to `~/.koda/config.yaml`. Open this file to confirm that the model was added.

    <Frame>
      <img src="https://mintcdn.com/bettertoken/JsSNwp3BGwYpLlK1/images/kodacode/config-yaml-result.png?fit=max&auto=format&n=JsSNwp3BGwYpLlK1&q=85&s=749b52ab5ef35f22fb278825b08f8d09" alt="Kodacode config.yaml with the OpenAI-compatible model configuration added." style={{ borderRadius: '0.5rem' }} width="1570" height="1600" data-path="images/kodacode/config-yaml-result.png" />
    </Frame>
  </Step>
</Steps>

## config.yaml example

Use this full structure as a reference. Replace `YOUR_API_KEY` with your LLMEasy API Key, and do not commit a real API Key to your repository.

```yaml theme={null}
name: Koda
version: 0.0.1
schema: v1
models:
  - name: Koda Models
    provider: koda-chat-models
    model: AUTODETECT
    roles:
      - agent
      - chat
      - edit
  - name: gpt-5.5
    provider: openai
    model: gpt-5.5
    apiKey: YOUR_API_KEY
    apiBase: https://www.llmeasy.ru/v1/
    roles:
      - agent
      - chat
      - edit
context:
  - provider: code
  - provider: docs
  - provider: diff
  - provider: terminal
  - provider: problems
  - provider: folder
  - provider: codebase
```

<Note>
  If you use a model other than `gpt-5.5`, update both `name` and `model` so they match the GPT Key group model ID from the <a href={"https://www.llmeasy.ru/pricing"}>model plaza</a>.
</Note>

## Troubleshooting

* If the connection fails, confirm that **API Base** is `https://www.llmeasy.ru/v1/` and keep the trailing `/`.
* If the model is unavailable, confirm that **Model ID** comes from the GPT Key group.
* If authentication fails, copy the API Key again and avoid extra spaces or line breaks.
* If `config.yaml` changes do not apply, restart VS Code or run **Developer: Reload Window**.
* LLMEasy usually does not require an extra `User-Agent` or custom headers.

## References

* [Kodacode plugin overview](https://docs.kodacode.ru/plugin/overview.html)
* [Kodacode plugin installation guide](https://docs.kodacode.ru/plugin/install.html)
