---
title: "Roo Code API Configuration Profiles: Bind Models to Modes"
description: "How to create, name, and switch Roo Code API configuration profiles, bind them to modes, handle API keys on export, and verify requests hit the new endpoint."
url: https://cdnping.org/en/blog/roo-code-api-configuration-profiles
language: en
published: 2026-10-31
category: "Developer tools"
tags: ["Roo Code","VS Code","AI coding","model routing","API configuration"]
source: cdnping.org
license: Free to quote and summarize with a link to the url above.
---
# Roo Code API Configuration Profiles: Bind Models to Modes

A Roo Code API configuration profile is a named set of connection settings. The provider, base URL, API key, model, temperature, thinking budget, and rate limit all live in the profile, so switching profiles swaps the whole set at once. The more practical feature is that profiles can be bound to modes: for example, Architect mode always uses a strong reasoning model, while Code mode uses a cheaper, balanced one, and you never have to change it by hand. This article follows the official docs (docs.roocode.com) and covers how to create profiles, how to bind them, and how to confirm that requests are really going to the new endpoint.

Roo Code ships updates quickly, and button locations and labels in the settings page change between versions. This article describes how the feature works. If the UI doesn't match, trust the official docs for the version you run.

## What does a configuration profile actually store?

According to the official docs, a profile can hold the following:

| Field | Description | Switches with the profile? |
| --- | --- | --- |
| API Provider | Provider type, such as Anthropic, OpenAI Compatible, OpenRouter | Yes |
| Base URL | Filled in when you pick OpenAI Compatible or a similar type | Yes |
| API Key | Credential, kept in VS Code Secret Storage rather than in plain text in a regular settings file | Yes |
| Model | Model ID. For custom providers you can also enter context length, max output, pricing, and so on | Yes |
| Temperature | Sampling temperature | Yes |
| Thinking budget | Thinking-token budget for reasoning models (shown only when the model supports it) | Yes |
| Rate limit | Minimum interval between two requests | Yes |
| Diff editing settings | Whether to edit files via diffs, etc. (in some versions these live in the profile) | Yes |

One thing that is easy to miss: temperature and rate limit travel with the profile; they are not global settings. If you configure two profiles with the same model, one at temperature 0 and one at 0.7, any difference in results may come from temperature rather than the "unstable model" you suspect.

## How do you create, name, and switch profiles?

### Creating a profile

1. Open the Roo Code panel, click the gear icon, and find the Providers section (called API Configuration in older versions).
2. Click "+" next to the profile dropdown and enter a name.
3. Choose the API Provider, then fill in the Base URL (if needed), API key, and model ID.
4. Adjust temperature, thinking budget, and rate limit as needed, then save.

If you are connecting to an OpenAI-compatible endpoint, whether the Base URL should include `/v1` and whether the model ID needs a prefix are the most common sources of errors. If you get 401, 404, or 400 responses, work through [Cline / Roo Code OpenAI Compatible returning 401, 404, 400](/en/blog/cline-openai-compatible-401-404-errors) item by item.

### Naming suggestions

The profile name appears in the dropdown at the bottom of the chat box, so it should show "purpose + endpoint" at a glance, not just the model name. Models change; purposes rarely do. For example:

- `plan-frontier-gw`: planning, frontier reasoning tier, through a gateway
- `code-balanced-gw`: everyday coding, balanced tier
- `bulk-domestic-gw`: Chinese-language docs and bulk rewriting, using a domestic Chinese model
- `fast-local`: completions and formatting, local or low-cost endpoint

### Switching

There are two ways to switch: the profile dropdown on the settings page, and the profile selector under the chat input. The latter is more common. After you switch, the new profile is used starting with the next request. If you want to change models in the middle of a long task, it is best to wait until the current round of requests finishes, so you can tell which step used which profile.

## How do you bind different profiles to different modes?

Roo Code has built-in modes such as Code, Architect, Ask, Debug, and Orchestrator. The official docs describe two mechanisms for tying modes to profiles:

1. Remembering the last profile used (the docs call these sticky models): after you switch to a profile while in a given mode, Roo Code remembers it and switches back to that profile the next time you return to the mode.
2. Explicit assignment in mode settings: on the Modes settings page, select a mode and choose the default API configuration for it.

The second approach is more controllable. Use it for fixed assignments and treat the first as a temporary adjustment. In newer versions, helper features such as "enhance prompt" and context condensing can also be given their own profiles, which suits a cheap, fast model. Check your version for the exact location.

Orchestrator mode splits a task into subtasks and hands them to other modes. When a subtask switches to its mode, it also switches to the profile bound to that mode. Once bindings are in place, planning, coding, and debugging within one complex task land on different tiers of model. Run a small task first and confirm that the profiles actually used by the subtasks match what you expect.

## An example setup tiered by task difficulty

This is an example. Model names are placeholders, so replace them with the actual model IDs your provider offers:

| Mode | Profile | Model (placeholder) | Temperature | Rationale |
| --- | --- | --- | --- | --- |
| Architect | plan-frontier-gw | `<frontier-model>` | Default | Reads code and produces plans; few requests, but each one needs careful thought |
| Orchestrator | plan-frontier-gw | `<frontier-model>` | Default | If the task breakdown is wrong, everything after it is wasted |
| Code | code-balanced-gw | `<balanced-model>` | 0 or low | Most requests, so most of the cost |
| Debug | code-balanced-gw; switch manually to plan-frontier-gw when stuck | `<balanced-model>` | 0 | Start with the balanced tier; move up if two or three rounds make no progress |
| Ask | bulk-domestic-gw or fast-local | `<domestic-model>` / `<fast-model>` | Default | Explaining code and looking up concepts doesn't demand much reasoning |
| Enhance prompt / condense | fast-local | `<fast-model>` | Default | Plain text cleanup |

The reasoning is that Code mode usually sends far more requests than Architect mode, so putting the most expensive model where requests are few and decisions matter is more economical than using one model throughout. How much you save depends on your usage. You can first estimate your request ratio per mode using the method in [How many tokens does an AI coding tool use in a month](/en/blog/ai-coding-agent-token-cost-estimate). For metrics on choosing a model by task, see [Choosing an LLM by task](/en/blog/choose-llm-by-task), and for the broader approach to splitting traffic, see [How to do multi-model routing](/en/blog/multi-model-routing-save-cost).

If you use an aggregation gateway, you can pick different models under the same Base URL and key, so your profiles differ only in model ID and temperature. For example, AGI Plan (AGI Plan is a commercial partner of cdnping) is compatible with both the OpenAI and Anthropic API formats, so Roo Code can connect with just an endpoint URL and API key. It groups models into four capability tiers: frontier reasoning, balanced general-purpose, Chinese flagship models, and high-speed lightweight. These map neatly onto the four tiers above. For available models, see [agiplan.dev/models](https://agiplan.dev/models). Some models are marked "outside China only," so follow the terms of service and local regulations. You can check the public availability of each capability group on cdnping's [/en/status/agiplan](/en/status/agiplan) page.

Before choosing a specific model, check [cdnping model monitoring](/en/models) for availability, latency, and quantization precision of the same model across inference providers. A model with the same name can behave differently at different providers, as explained in [Did the model get dumber, or did the provider change?](/en/blog/llm-quantization-fp8-fp4-providers)

## How do you handle API keys when exporting and importing settings?

Roo Code's settings page (usually in the About section) offers export, import, and reset. The export is a JSON file containing the profile list and individual settings. Note that the exported file may contain the profiles' API keys. Whether they are included, and under what field names, depends on the version. The safest approach is to inspect the export yourself rather than assume it has none.

Check right after exporting:

```bash
# List every field that looks like a key
grep -nEi '"[a-z]*(api)?key"\s*:' roo-code-settings.json

# Use jq to replace every field whose name ends in Key/key with a placeholder, producing a shareable copy
jq 'walk(if type == "object" then with_entries(if (.key | test("[Kk]ey$")) and (.value | type == "string") and (.value != "") then .value = "REPLACE_ME" else . end) else . end)' \
  roo-code-settings.json > roo-code-settings.shared.json
```

Ground rules:

- Only a sanitized copy should go to a teammate or into a repository. Delete the original once you're done, and keep it out of synced folders.
- After importing the sanitized copy on a new machine, open each profile and re-enter the key.
- If the original export was ever sent out or committed, revoke that key in the provider's console and generate a new one. Don't just delete the file.
- When a team shares one profile structure, each person should use their own key so usage and billing stay separate and a problem key can be revoked on its own.

## After switching profiles, how do you confirm requests really go to the new endpoint?

A profile switch, or a changed model name in the UI, doesn't prove the request went to the new endpoint. Common causes: the profile you edited isn't the one currently selected; a mode binding switched your manual choice back; or you changed the Base URL but didn't save. The three methods below run from simple to strict.

### Method 1: Check the provider's usage records

Send a short message (for example, "reply ok"), then look at the usage or request log in the new endpoint's console and confirm the time, model ID, and token count match. The old endpoint's console should show no new record. This is the most direct evidence.

### Method 2: Deliberately enter a wrong key

Change one character of the new profile's key and send a message. If the request really goes to the new endpoint, you'll see a 401 error from the new provider, and the format and wording of the error usually show which provider it came from. If the conversation completes as normal, the request isn't using this profile at all. Restore the key when you're done.

### Method 3: Log requests with a local reverse proxy

To see the full request path and model field, run a logging reverse proxy on your machine and temporarily point the profile's Base URL at it:

```bash
# Requires mitmproxy; replace https://api.example.com with your real endpoint
mitmweb --mode reverse:https://api.example.com -p 8787
```

Then change the profile's Base URL to `http://127.0.0.1:8787/v1` (include `/v1` or not, matching the original address), send a message, and the mitmweb page shows the request path, the `model` field in the request body, and the response status code. When you've confirmed, change the Base URL back. The proxy sees plain-text requests, so do this only on your own machine and shut it down afterward.

You can also check the endpoint itself outside Roo Code with curl, which separates endpoint problems from profile configuration problems:

```bash
curl -s "$BASE_URL/models" -H "Authorization: Bearer $API_KEY" | head -c 500
```

If curl is also slow or times out, the problem is at the network layer. Start with the [cdnping online speed test](/en) to see first-connection and round-trip times for each API, then continue with the [developer network self-check checklist](/en/blog/developer-network-self-check-2026).

## Pre-launch checklist

- [ ] Every profile name shows its purpose and endpoint, and no two profiles are identical
- [ ] Every commonly used mode has a profile explicitly assigned in Modes settings
- [ ] The profiles used by Code and Debug have a low temperature
- [ ] Enhance prompt and context condensing use a cheap, fast profile (when your version supports it)
- [ ] Each profile has been verified with Method 1 or Method 2 to confirm where requests go
- [ ] The exported settings file has been sanitized and the original deleted
- [ ] Rate limit is enabled only on the profiles that need it, so you don't slow down every mode
