Skip to main content
This page is only for Kodacode / Koda, not MonkeyCode. To connect Kodacode to BetterToken, prepare an API key, enter the Base URL shown below, and choose a current Model ID from the model plaza. If the error occurs in MonkeyCode, use the separate MonkeyCode guide.

Key settings

Prerequisites

Additional requirements

  • VS Code is installed
  • The Kodacode / Koda extension is installed
  • The selected Model ID comes from the supported provider

Install

Install or open Kodacode, then continue with the manual setup below.

Manual setup

Setup

1

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.
Choose Add model: Agent from the model selector in the Koda panel.
2

Fill in the OpenAI-compatible model settings

In the add model dialog, use these values:Click Подключить / Connect after filling in the fields.
Select Any OpenAI-compatible API in the Kodacode add model dialog and fill in API Base, Model ID, and API Key.
3

Confirm that the model is active

After the connection succeeds, select the new model, such as YOUR_MODEL_ID, from the model selector under the Koda input box. Send a short message to confirm that it returns a response.
4

Check config.yaml

Kodacode writes the configuration to ~/.koda/config.yaml. Open this file to confirm that the model was added.
Kodacode config.yaml with the OpenAI-compatible model configuration added.

config.yaml example

Use this full structure as a reference. Replace YOUR_API_KEY with your BetterToken API Key, and do not commit a real API Key to your repository.
If you use a model other than YOUR_MODEL_ID, update both name and model so they match the model ID from a supported provider from the model plaza.

Verify the connection

Send a short test prompt. If the tool returns a response without an authentication or Model ID error, the connection works. Fully restart the tool after changing its configuration.

Switch models

Open the model selector or change the Model field in the configuration. Use the exact Model ID from the model plaza, then restart the current session.

Common errors

  • If the connection fails, confirm that API Base is https://bettertoken.ai/v1/ and keep the trailing /.
  • If the model is unavailable, confirm that Model ID comes from the supported provider.
  • 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.
  • BetterToken usually does not require an extra User-Agent or custom headers.

Advanced setup

Supported providers

Statuses apply to the BetterToken setup documented on this page.
  • Manual setup: enter the API Key, Base URL, and Model.
  • Not supported: no verified direct setup is currently available.

Technical details

This setup uses https://bettertoken.ai/v1. The tool appends the OpenAI-compatible endpoint path. Do not add /chat/completions or /responses unless a specific field explicitly requires it.