The OpenAI Compatible provider is how Roo Code reaches an endpoint it does not ship with. You give it a Base URL, a key and a model id, then fill in the Model Configuration block yourself, because Roo Code holds no record of a model it has never met. Below, that block comes straight from the live catalog and each mode gets its own profile, so Code, Ask, Architect and Debug all run on an uncensored build, tool calls included. The same ids also go into Cursor and OpenCode, and by way of a router into Claude Code.
What you need
VS Code with Roo Code installed, a key from the console, and a few minutes. All of the configuration happens inside the Roo Code panel: the gear icon at its top opens Settings on the Providers tab, which holds the API Provider dropdown, the connection fields and the Model Configuration block. There is no provider config file to edit.
One caution before you start. The Export button at the foot of Settings writes roo-code-settings.json with your key in the clear. Guard that file as you would guard the key.
First reply
- Make a key in the console.
- On the Providers tab, press + beside the profile selector and give the new profile a name, say
Unrestrictable Code. - Enter the four values below. The Model field arrives filled with an OpenAI id; overwrite it.
API Provider OpenAI CompatibleBase URL https://api.unrestrictable.ai/v1API Key sk-unr-live-…Model glm-5.3-uncensored- With Base URL and API Key saved, Roo Code pulls the model list from the API and the ids show up in the Model picker. Typing an id works as well, provided it matches the models page letter for letter. The three ids most often used from Roo Code here:
glm-5.3-uncensoredglm-5.3-flash-uncensoreddeepseek-v4.1-flash-abliterated- Fill in Model Configuration for that id. Roo Code cannot look these numbers up for a custom model, and they decide how much context it keeps, which output cap it sends and what cost it displays. The table is rendered from the live catalog; take the row for your id.
| Model | Context Window Size | Max Output Tokens | Input Price | Output Price | Image Support |
|---|---|---|---|---|---|
glm-5.3-uncensored | model page | model page | 0.282 | 0.846 | model page |
glm-5.3-flash-uncensored | model page | model page | 0.1053 | 0.3685 | model page |
deepseek-v4.1-flash-abliterated | model page | model page | 0.8488 | 1.6975 | model page |
- Keep the checkboxes as they come. Enable streaming stays on, and so does Include max output tokens. Use Azure, Enable R1 model parameters, Prompt Caching and Enable Reasoning Effort all stay off. Leave Custom Headers blank; this API wants none.
- Close Settings and type a message in Code mode. Under the chat input, the API Configuration dropdown names the active profile. The mode selector on its left changes modes, and so does
/code,/ask,/architector/debugas the first word of a message.
No install needed to try the same models first: the browser chat gives three free turns a day without an account.
Profiles and modes
Settings live inside a profile. The selector at the top of the Providers tab and the API Configuration dropdown in the chat are two views of one list. Each of the five modes (Code, Ask, Architect, Debug, Orchestrator) recalls the profile you last picked while in it. Subtasks spawned by Orchestrator run on the parent task’s profile. A task you resume from history stays on the profile it began with, whatever the global selector says now.
Most people end up with two profiles: a strong build for Code and Debug, a fast one for Ask and Architect. Press + once more, reuse the Base URL and API Key, enter the second id and its Model Configuration row. From then on Roo Code changes profile with the mode. The Prompts tab can also bind a profile to a mode for good.
Each field, explained
- API Provider
- OpenAI Compatiblethe only provider type with a Base URL field; the plain OpenAI entry has none
- Base URL
- https://api.unrestrictable.ai/v1the root of every request; keep the trailing /v1, since Roo Code adds /chat/completions and /models to it
- API Key
- the whole sk-unr- keygoes out as the bearer token; lands in VS Code Secret Storage and is never displayed again
- Model
- glm-5.3-uncensoredthe id Roo Code puts in each request; chosen from the fetched list or typed, spelled as on the models page
- Context Window Size
- from the table abovehow many tokens the model accepts in total; Roo Code trims and condenses against it
- Max Output Tokens
- from the table abovethe cap sent while Include max output tokens is on; -1 leaves it to the server
- Input Price / Output Price
- from the table aboveUSD per million tokens; feeds only the in-chat estimate, the console is the bill
- Image Support
- on or off per the tabledecides whether screenshots and pasted images ride along with requests
- Computer Use
- offthe browser tool, listed under Model Configuration in the docs; off for a text build
- Prompt Caching
- offexposes Cache Reads Price and Cache Writes Price for the estimate; cached tokens are counted by the console regardless
- Enable streaming
- ontokens show as the model produces them; off makes Roo Code wait for the full reply
- Enable R1 model parameters
- offthe message format of that reasoning family; no id on this page needs it
- Use Azure
- offAzure-style URL and api-version handling, which this API does not use
- Custom Headers
- noneextra request headers; the key already goes in Authorization
- Rate Limit
- 0the fewest seconds between two requests on this profile; 0 turns it off
Which model
Every build on the models page speaks the OpenAI request format, which is what Roo Code sends. What matters more is tool calling: Roo Code’s agent loop uses native tool calls and nothing else, with no XML fallback, so a build that cannot return a tool call cannot edit a file. The right-hand column answers that from the catalog, and the model page answers it where the catalog is silent. On cost, a turn deep into a task resends the whole conversation, every file read and every tool result, so input tokens dominate and the input price is the number to compare.
| Model | One agent turn | Tool calls |
|---|---|---|
| GLM-5.3 Uncensored | $0.01 | model page |
| GLM-5.3 Flash Uncensored | $0.0047 | model page |
| DeepSeek V4.1 Flash Abliterated | $0.04 | model page |
| DeepSeek V4 Pro Uncensored | $0.04 | model page |
| GLM-5.3 Abliterated | $0.09 | model page |
| GLM-5.3 Flash Code Uncensored | $0.25 | model page |
| GLM-5.3 Uncensored | Uncensored | $0.282 | $0.846 |
| GLM-5.3 Flash Uncensored | Uncensored | $0.1053 | $0.3685 |
| DeepSeek V4.1 Flash Abliterated | Abliterated | $0.8488 | $1.6975 |
| DeepSeek V4 Pro Uncensored | Uncensored | $0.97 | $1.94 |
| GLM-5.3 Abliterated | Abliterated | $2.1825 | $4.365 |
| GLM-5.3 Flash Code Uncensored | Uncensored | $6.00 | $6.00 |
Mode by mode: Code and Debug produce the longest contexts and the most tool calls, so they belong on the strong build. Ask only reads and explains, Architect plans before any edit, and both are fine on the fast build. The per-turn figure above is roughly what one deep turn costs in whichever mode uses that profile. Because Orchestrator subtasks inherit the parent’s profile, choose the profile before you start an Orchestrator task and the whole tree bills to it.
The cost Roo Code prints beside a request is its own estimate, computed from the Input Price and Output Price you typed. The charge is on the console’s usage page. To see the code builds compared over a working day, read the uncensored coding AI guide.
Prove it works
First, ask the API which models your key may call. Roo Code sends this exact request to fill its Model picker, so your id has to be in the reply:
curl https://api.unrestrictable.ai/v1/models -H "Authorization: Bearer sk-unr-live-…"Next, make one chat request in the shape Roo Code uses. The -i flag shows the response headers: x-uplink-request-id identifies the request, and when the answer is not streamed, x-uplink-charge holds the cost in USD.
curl -i https://api.unrestrictable.ai/v1/chat/completions \ -H "Authorization: Bearer sk-unr-live-…" \ -H "Content-Type: application/json" \ -d '{"model": "glm-5.3-uncensored", "messages": [{"role": "user", "content": "Reply with the single word ok."}]}'Finally, back in Roo Code, send a Code-mode message on the new profile. It appears on the console’s usage page with token counts and a charge, and Roo Code’s own history should show the same counts.
When it fails
401 invalid_api_key(shown by Roo Code as "Invalid API Key"): a wrong or revoked key, or a different profile is active than the one you configured. Look at the API Configuration dropdown first, then paste the key again from the console.404 model_not_found(Roo Code says "Model Not Found"): the preset OpenAI id is still in the Model field, or the id has a typo. Select it from the list or copy it from the models page.402 insufficient_balance: not enough balance for this request; top up in the console.402 monthly_limit_reached: the key has reached the monthly spending cap you gave it.403 scope_denied: this key may only call certain models, and the one you chose is outside that set.429 rate_limited: the key’s rate limit was hit. Readretry-afterin the response and put that many seconds in the profile’s Rate Limit field, which spaces Roo Code’s requests.- A connection error with no status code means the Base URL is off. The correct value is
https://api.unrestrictable.ai/v1, ending in/v1with nothing after it, and Use Azure must be off. - Errors around tool calls, or Roo Code describing an edit in prose instead of making it: this build does not return tool calls. Move to one marked yes in the table, or whose model page lists them. There is no XML fallback.
- Every request fails with
400: Max Output Tokens exceeds the model’s limit, and Include max output tokens sends it as the cap. Use the table’s value, or -1 to let the server decide. Enable R1 model parameters switched on for a model outside that family fails the same way; switch it off. - An empty Model picker: the model list could not be fetched, most often because the key or URL had not been saved. Save, then reopen Settings; the Refresh Models hint tells you the same.
- Context condensed too soon or too late: Context Window Size does not match the model. Roo Code condenses at a fraction of this value, so copy it from the table.
Questions
All of them. One key covers the whole models page, and each build there takes an OpenAI-format call to /v1/chat/completions, so the Model field accepts any id from that page, spelled the same way. Builds with yes in the Tool calls column also drive the agent loop. See the models page.
That the API mirrors the request shape of OpenAI’s chat completions endpoint: identical paths, bearer header, messages and tools fields, and streamed chunk format. The OpenAI Compatible provider in Roo Code posts that shape to whichever Base URL you enter, so a URL and a key complete the setup.
In VS Code’s Secret Storage, one per profile, and the settings UI never displays it again. Export copies it unencrypted into roo-code-settings.json; that file does not belong in version control. Reset wipes it together with the rest.
No. Use Azure is for Azure endpoints and their URL and version scheme; Enable R1 model parameters switches to the message format of that one reasoning family. Neither fits this API. The defaults are what you want: streaming on, max output tokens included.
Every model above is on the uncensored model list with its live price per million tokens. Per-token pricing sets the whole catalog side by side, and the family directory groups the builds by base model.