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

# Roo Code BetterToken setup guide

> Connect BetterToken to Roo Code with Codex group model IDs.

Roo Code is a VS Code AI coding extension. To connect BetterToken, choose the OpenAI Compatible provider and use a model ID from the Codex group.

## Prerequisites

* VS Code installed
* BetterToken API Key (register here (`https://www.bettertoken.ai/register`))

## Install Roo Code

Open VS Code, search for **Roo Code** in the extensions marketplace, and install it.

## Setup

<Steps>
  <Step title="Clear conflicting environment variables">
    ```bash theme={null}
    unset OPENAI_API_KEY
    unset OPENAI_BASE_URL
    ```
  </Step>

  <Step title="Open Roo Code settings">
    Open the Roo Code **Settings** panel.
  </Step>

  <Step title="Configure the API provider">
    Fill in:

    * **API Provider** → `OpenAI Compatible`
    * **Base URL** → `https://www.bettertoken.ai/v1`
    * **API Key** → your BetterToken API Key
    * **Model** → a **Codex group** model ID copied from the model plaza (`https://www.bettertoken.ai/pricing`)
  </Step>

  <Step title="Only configure extra headers when the official docs explicitly require them">
    The official Roo Code material we checked focuses on OpenAI-compatible or custom API setup, but it does not treat an extra `User-Agent` as a required BetterToken step.

    If you are also using a custom gateway, tenant routing, observability, or caching layer, add headers only according to that upstream service's official docs.
  </Step>

  <Step title="Save and start using it">
    Click **Save** and **Done**, then select the configured model.
  </Step>

  <Step title="Restart Roo Code">
    After saving the config, restart VS Code or reload the Roo Code extension before selecting the configured model.
  </Step>
</Steps>

<Note>
  Roo Code's OpenAI Compatible provider still depends on OpenAI-style tool calling. If you need extra headers, follow the current Roo Code docs or your upstream gateway requirements instead of assuming `User-Agent` is mandatory for BetterToken.
</Note>
