# Roo Code Setup

> **⚠️ Project archived**: the GitHub repository [RooCodeInc/Roo-Code](https://github.com/RooCodeInc/Roo-Code) has been **archived (read-only) since 2026-05-15** — no further updates or fixes upstream. The configuration below still works for existing installs and serves as reference; for an actively maintained sibling consider migrating to [Kilo Code](/docs/ide/kilo-code) or [Cline](/docs/ide/cline).

> **Last verified**: 2026-09-18 · 📄 Per official docs (archive status checked via the GitHub API; Roo Code no longer ships releases)

## At a glance

| Item | Details |
|---|---|
| Models you can use | Claude ✅ (Anthropic provider + custom base URL) · GPT ✅ · Chinese models ✅ (OpenAI Compatible) · Gemini ❌ |
| Protocol & Base URL | Anthropic: `https://api.qcode.cc/api` · OpenAI: `https://api.qcode.cc/openai/v1` |
| Where to configure | VS Code extension settings panel (API Provider / base-URL checkbox) |
| Official docs | [Roo Code repository](https://github.com/RooCodeInc/Roo-Code) |

[Roo Code](https://github.com/RooCodeInc/Roo-Code) is an open-source AI coding extension for VS Code, forked from [Cline](/docs/ide/cline); [Kilo Code](/docs/ide/kilo-code) in turn forked from it — the three share nearly identical settings screens, so this page transfers between them.

## Which protocol

| Model you want | API Provider | Base URL |
|---|---|---|
| Claude | `Anthropic` | `https://api.qcode.cc/api` |
| GPT / the four Chinese families | `OpenAI Compatible` | `https://api.qcode.cc/openai/v1` |

🔴 **Do not use OpenAI Compatible to reach Claude** — QCode's OpenAI endpoint rejects Claude models with `model_not_available_on_endpoint`. See [Endpoints & API Paths](/docs/getting-started/endpoints-and-api-paths).

## Install

Search for **Roo Code** in the VS Code marketplace, or follow the instructions in the [project repository](https://github.com/RooCodeInc/Roo-Code).

## Configure Claude (Anthropic provider)

1. Open **Settings** (gear icon) in the Roo Code sidebar
2. Set **API Provider** to **Anthropic**
3. Put your QCode key (starts with `cr_`) in **API Key**
4. Tick **Use custom base URL** and enter `https://api.qcode.cc/api`
5. Choose `claude-sonnet-5` (or another live id) in the model dropdown
6. Save, then send a message in the chat box to confirm

> **From mainland China**, swap the host for `https://asia.qcode.cc/api` (Asia node, nearest of Korea / Taiwan / Hong Kong); the key is unchanged.
> **No trailing slash on the base URL** — the extension appends `/v1/messages` itself, and an extra slash produces a 404.

## Configure GPT and Chinese models (OpenAI Compatible)

1. Set **API Provider** to **OpenAI Compatible**
2. **Base URL**: `https://api.qcode.cc/openai/v1`
3. **API Key**: the same `cr_` key
4. **Model ID**: `gpt-6-sol`, `gpt-5.6-terra`, or a [Chinese id](/docs/usage/cn-models) such as `glm-5.2`

## Verify connectivity

Check the endpoint and key with curl first, so you know whether to debug the extension's UI:

```bash
KEY="cr_your_qcode_key"
curl -X POST https://api.qcode.cc/api/v1/messages \
  -H "x-api-key: $KEY" -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{"model":"claude-sonnet-5","max_tokens":32,"messages":[{"role":"user","content":"ping"}]}'
```

JSON containing `content` means the endpoint side is fine; if the extension still fails, the problem is in its settings.

## Troubleshooting

| Symptom | Cause | Fix |
|---------|-------|-----|
| `model_not_available_on_endpoint` | Reaching Claude through OpenAI Compatible | Switch to the Anthropic provider with `/api` |
| `Invalid API key` | Wrong key or stray whitespace | Check the `cr_` prefix and trim spaces |
| 404 | Trailing slash on the base URL, or wrong path | Compare against the table above |
| Your model id is missing from the dropdown | Not in the extension's built-in list | Type it into the custom model id field |

## Related

- [Endpoints & API Paths](/docs/getting-started/endpoints-and-api-paths) — protocol × model-family table
- [Kilo Code Setup](/docs/ide/kilo-code) — downstream fork, nearly identical setup
- [Cline Integration](/docs/ide/cline) — upstream project
- [Chinese Models](/docs/usage/cn-models)