Roo Code OpenAI compatible provider: a security model per mode

Give Roo Code’s OpenAI Compatible provider the Base URL, the API Key and a Model id, then copy that build’s Model Configuration row, which this page reads from the catalog at render. A profile for each mode, what an agent turn costs and the errors Roo reports.

Steps checked November 2, 2026 · prices as of November 18, 2026

Roo Code’s modes map well onto an engagement: Ask for scope questions, Architect for the test plan, Code and Debug for the tooling. What gets in the way is a model that refuses the moment the work looks offensive. Roo Code’s OpenAI Compatible provider lets you swap it. It wants a Base URL, an API Key and a Model id, plus a Model Configuration block Roo cannot complete for a model it has never met. This page reads that block from the catalog at render and sets up a profile for each mode, so a security-tuned or uncensored build answers in Code, Ask, Architect and Debug and makes its edits and runs its commands through tool calls. Reuse the ids in Cursor, OpenCode and Claude Code.

What you need

A key from the console with credit on it, the Roo Code extension in VS Code, and a workspace you are authorised to touch: your own tooling, an engagement repository, a CTF challenge. In the Roo Code panel, the gear icon at the top opens the Providers tab, and every setting on this page is in that tab: the API Provider dropdown, its fields, and the Model Configuration block for a model Roo does not ship. There is no provider config file. The Export button at the foot of the settings writes roo-code-settings.json with your key in the clear, so that file is as sensitive as the key.

Settings belong to a profile. The profile selector sits at the top of the Providers tab, the identical list appears as the API Configuration dropdown below the chat box, and every one of the five modes, Code, Ask, Architect, Debug and Orchestrator, recalls the profile you last used in it. Subtasks spawned by Orchestrator take the parent task’s profile, and a task reopened from history stays on the profile it began with no matter what the global selection says now.

From a blank panel to a first answer

  1. Make a key in the console.
  2. On the Providers tab, press + beside the profile selector and name the new profile, say PentestLLM Code.
  3. Fill the four fields. The Model field arrives preset to an OpenAI id; overwrite it.
Roo Code settings
1API Provider OpenAI Compatible
2Base URL https://api.pentestllm.ai/v1
3API Key sk-ptl-live-…
4Model glm-5.3-uncensored
  1. With Base URL and API Key saved, Roo Code fetches the model list from the API and the ids show up in the Model picker; typing one in also works. Any id from the models page is valid, copied character for character. These three are the ones Roo Code users here reach for most:
model ids
1glm-5.3-uncensored
2glm-5.3-flash-uncensored
3deepseek-v4.1-flash-abliterated
  1. Complete Model Configuration for your id. Roo Code has no record of a custom model, so these fields decide how much context it keeps, what output cap it sends and what cost it displays. The rows below were read from the live catalog when this page rendered; copy yours.
ModelContext Window SizeMax Output TokensInput PriceOutput PriceImage Support
glm-5.3-uncensoredmodel pagemodel page0.2820.846model page
glm-5.3-flash-uncensoredmodel pagemodel page0.10530.3685model page
deepseek-v4.1-flash-abliteratedmodel pagemodel page0.84881.6975model page

USD per million tokens, the unit Roo Code’s two price fields expect, as the catalog listed them on 2026-11-18.

  1. Keep the checkboxes as shipped: Enable streaming on, Include max output tokens on, Use Azure off, Enable R1 model parameters off, Prompt Caching off, Enable Reasoning Effort off. Custom Headers stays blank; this API wants none.
  2. Close the settings and type a Code-mode message. Beneath the input, the API Configuration dropdown shows the active profile and the mode selector beside it changes mode; /code, /ask, /architect or /debug at the front of a message does the same.

A first task for the new profile: paste the engagement’s scope document and ask Ask mode which hosts and paths are in bounds, or open a suspect handler and have Debug mode trace user input to the query it ends in. To see how a build answers before you set any of this up, the home page gives a few demo turns without an account, and the playground runs the same catalog from a browser.

Most people end up with two profiles: the strong build in one, used from Code and Debug, and a fast build in another, used from Ask and Architect. Press + again, reuse the Base URL and API Key, enter the second id with its row from the table. Roo Code remembers the last profile per mode, and the Prompts tab can bind a profile to a mode permanently. A task reopened from history keeps the profile it began with.

Each setting, one line

API Provider
OpenAI Compatible
the only provider type with a Base URL field; the plain OpenAI entry has none
Base URL
https://api.pentestllm.ai/v1
the address of every request, ending in /v1; Roo Code adds /chat/completions and /models itself
API Key
the whole sk-ptl- key
the bearer token; kept in VS Code Secret Storage and never displayed again
Model
glm-5.3-uncensored
the id sent on each request, chosen from the fetched list or typed; copy it from the models page character for character
Context Window Size
from the table above
how many tokens the model holds in total; Roo Code trims and condenses the task to stay inside it
Max Output Tokens
from the table above
sent as the reply cap while Include max output tokens is on; -1 leaves it to the server
Input Price / Output Price
from the table above
in USD per million tokens; they feed only the chat’s cost estimate, the console is the bill
Image Support
on or off per the table
controls whether screenshots and pasted images travel with the request
Computer Use
off
the browser tool; it appears under Model Configuration in the docs, keep it off for a text-only build
Prompt Caching
off
reveals two more price fields, Cache Reads and Cache Writes, for the estimate; the console counts cached tokens regardless
Enable streaming
on
tokens show as the model produces them; off, Roo Code waits for the complete reply
Enable R1 model parameters
off
the message format of that reasoning family; no id here needs it
Use Azure
off
Azure-style URL and api-version handling; not relevant to this API
Custom Headers
none
extra request headers; the key already goes in Authorization
Rate Limit
0
minimum seconds between this profile’s requests; 0 turns it off

Choosing the build

Every build in the catalog answers the OpenAI-format requests Roo Code sends. Its agent loop uses native tool calling and nothing else, no XML fallback, so the build must accept tool calls; the right-hand column tells you which ones do, and the model page covers the rest. Deep into a task, one turn resends the whole conversation, each file Roo opened and each tool result, so input tokens dominate the bill and the build with the cheapest input rate is cheapest per turn.

ModelOne agent turnTool calls
GLM-5.3 Uncensored$0.01model page
GLM-5.3 Flash Uncensored$0.0047model page
DeepSeek V4.1 Flash Abliterated$0.04model page
DeepSeek V4 Pro Uncensored$0.04model page
GLM-5.3 Abliterated$0.09model page
GLM-5.3 Flash Code Uncensored$0.25model page

Costed at 40,000 input tokens and 1,200 output tokens, catalog prices of 2026-11-18. The tool-call column repeats what the catalog publishes; a link means the model page has the answer.

Uncensored models and their prices per million tokens
GLM-5.3 Uncensoredglm-5.3-uncensoredUncensored$0.282$0.846
GLM-5.3 Flash Uncensoredglm-5.3-flash-uncensoredUncensored$0.1053$0.3685
DeepSeek V4.1 Flash Abliterateddeepseek-v4.1-flash-abliteratedAbliterated$0.8488$1.6975
DeepSeek V4 Pro Uncensoreddeepseek-v4-pro-uncensoredUncensored$0.97$1.94
GLM-5.3 Abliteratedglm-5.3-abliteratedAbliterated$2.1825$4.365
GLM-5.3 Flash Code Uncensoredglm-5.3-flash-code-uncensoredUncensored$6.00$6.00

Prices per million tokens, read from the live catalog on 2026-11-18.

Mode by mode: Code and Debug issue the most tool calls and build the longest contexts, which is where the strong build earns its rate. Ask reads and explains; Architect drafts a plan before anything is edited. Both run well on the fast build, and once a task is deep, each mode’s profile costs roughly the per-turn figure above. Orchestrator subtasks inherit the parent’s profile, so launch an Orchestrator task on the profile the whole tree should bill to.

The cost Roo Code shows beside each request is only an estimate, computed from the two prices you entered; the console’s usage page is the real charge. To compare the code builds for a day of tooling or exploit work, the uncensored coding AI guide prices a full day on each.

Prove it works

Ask the API which models your key may call. Roo Code makes this exact request to populate the Model picker, so your chosen id has to be in the answer:

shell
1curl https://api.pentestllm.ai/v1/models -H "Authorization: Bearer sk-ptl-live-…"

Next, send one request shaped like Roo Code’s. The -i flag prints the response headers, which carry the request id and, on a non-streamed reply, the charge in USD.

shell
1curl -i https://api.pentestllm.ai/v1/chat/completions \
2 -H "Authorization: Bearer sk-ptl-live-…" \
3 -H "Content-Type: application/json" \
4 -d '{"model": "glm-5.3-uncensored", "messages": [{"role": "user", "content": "Reply with the single word ok."}]}'

Back in Roo Code, send a Code-mode message on the new profile, then open the console’s usage page. The request is listed with its token counts and its charge, and Roo Code’s chat history should report the same token counts.

When it breaks

  • 401 invalid_api_key, which Roo Code labels “Invalid API Key”: wrong or revoked key, or the active profile is not the one you configured. Check the API Configuration dropdown under the chat first, then copy the key from the console once more.
  • 404 model_not_found, which Roo Code labels “Model Not Found”: the Model field still contains the preset OpenAI id, or yours is misspelled. Select it from the fetched list, or copy it off the models page.
  • 402 insufficient_balance: not enough credit for this request; top up in the console. 402 monthly_limit_reached: the key reached the monthly cap you gave it.
  • 403 scope_denied: this key is restricted to a set of models and the one you asked for is outside it.
  • 429 rate_limited: the key is over its rate limit. Read retry-after on the response; set the profile’s Rate Limit field to that many seconds and Roo Code paces itself.
  • Connection errors and no status code: the Base URL is off. It is https://api.pentestllm.ai/v1, /v1 included, nothing behind it, with Use Azure off.
  • Tool-calling errors, or Roo Code describing an edit in prose instead of making it: the build does not accept tool calls. Pick one marked yes in the table, or one whose model page lists them. There is no XML fallback in Roo Code.
  • 400 on every request: Max Output Tokens is higher than the model permits, and with Include max output tokens on, Roo sends it as the cap. Enter the table’s value, or -1 to let the server decide. Enable R1 model parameters switched on for a model outside that family produces the same 400; switch it off.
  • An empty Model picker: Roo Code could not fetch the list, usually because the key or URL had not been saved yet. Save, then reopen the settings; the Refresh Models hint says as much.
  • Context trimmed too soon or too late: Context Window Size does not match the build. Roo Code starts condensing at a fraction of that figure, so take it from the table.

Questions

All of them. Every build in the catalog answers /v1/chat/completions in the OpenAI format on the same key, so any id from the models page goes into the Model field as written there. Those with a yes under Tool calls can also drive the agent loop. See the models page.

That the server accepts the request shape of OpenAI’s chat completions endpoint: same paths, same bearer header, same messages and tools fields, same streamed chunks. Roo Code’s OpenAI Compatible provider aims that shape at whatever Base URL you enter, so a URL and a key are all the setup there is.

In VS Code’s Secret Storage, one per profile, and the UI never shows it again. Export writes it in plaintext to roo-code-settings.json; keep that file out of any repository and out of a client deliverable. Reset wipes it along with everything else.

No. Use Azure rewrites URL and version handling for Azure endpoints; Enable R1 model parameters switches to one reasoning family’s message format. Neither fits this API. The boxes that matter are already right by default: 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.

Get a keyPrepaid from $10, no subscription.

New models and price changes, once a month.

New uncensored builds with their prices, price moves, and what the daily model check found.

Help