Blank white background with no objects or features visible.

We’re sharing complimentary access to the full Gartner Hype Cycle for AI Governance 2026. Get your copy →

Roo Code: Governing a Coding Agent Through a Gateway

By Ashish Dubey

Published: October 14, 2026

⚡ TL;DR
  • Roo Code was shut down by its vendor in May 2026, which now points users to Cline. If you still have Roo Code installs, this is how to keep them governed; if you’re starting fresh, the same approach applies to Cline.
  • An IDE coding agent is an ungoverned LLM client by default — it holds a raw provider key, calls whatever model it likes, and sends your source code to a provider with no central visibility.
  • Routing it through the TrueFoundry AI Gateway makes it governed: one key, cost tracked per developer and team, a model allowlist, secret and PII guardrails on prompts, rate and budget limits, and an audit log of every call.
  • Setup is Roo Code’s “OpenAI Compatible” provider pointed at your gateway URL — base URL, model name, token. Your developers’ workflow doesn’t change.
  • The important nuance: client config is per-user, enforcement is at the gateway. You can’t fully lock the IDE settings, but every call still passes through the gateway’s policies — which is where governance actually belongs.

What Roo Code is — and what changed

Roo Code was an intelligent code-generation and refactoring system that worked within VS Code using natural language commands and context information from your coding activity. It was popular, open-source, and powerful.

In May 2026, Roo Code’s vendor announced it was shutting the extension down and directed users to Cline, a closely related agent. Existing installs keep working, but there are no new releases. That makes this a two-audience topic: teams still running Roo Code who need to keep it under control, and teams moving to Cline who want to set governance up correctly from day one. The good news is that both are governed the same way, because both connect through a standard OpenAI-compatible endpoint.

Whichever way you operate, the fundamental issue is basically the same – although not because of the extension.

Why a coding agent needs governance

An IDE coding agent is one of the least-governed LLM clients in most companies. Think about what it does by default:

  • It holds a raw provider API key, typed into each developer’s settings. Rotating or revoking access means touching every machine.
  • It calls whatever model the developer picks, with no central policy on which models are allowed or how much they cost.
  • It sends your source code to a model provider — proprietary logic, secrets in config files, customer data in fixtures — with no scanning or redaction.
  • It generates heavy, bursty token usage as it reads files and iterates, and none of that spend is attributed to a team or capped.
  • It leaves no audit trail anyone can review.

Multiply that across a fifty-person engineering org and you have real spend, real data-exposure risk, and zero visibility. The agent is useful; the lack of a control point is the problem.

What “governed” actually means

Governance here is not about restricting the agent — it’s about putting a control point between it and the model providers. That control point is the gateway.

Governing a coding agent through the TrueFoundry AI Gateway
Governing a coding agent through the TrueFoundry AI Gateway

Every Roo Code (or Cline) instance points at one gateway endpoint instead of a provider directly. The gateway then enforces policy on every request:

What the gateway governs for an IDE coding agent
What the gateway governs for an IDE coding agent
  • Cost tracking per developer, team, and model — so agent spend is a line item you can see and attribute, not a surprise.
  • Budgets and rate limits that cap a runaway agent before it burns a month’s quota in an afternoon.
  • A model allowlist — the gateway decides which models the agent may call, regardless of what the IDE dropdown offers.
  • Secret and PII guardrails that scan prompts and code for leaks before they reach a provider.
  • An audit log of every agent call, for security and compliance review.
  • Fallback so a provider outage doesn’t stop every developer at once.
  • No raw provider keys on laptops — developers hold a TrueFoundry token; the real keys live in the gateway.

Where teams get this wrong

They hand out provider keys to developers. Every laptop with a raw OpenAI or Anthropic key is a rotation headache and a leak waiting to happen. Issue gateway tokens instead.

They govern production LLM calls but ignore the IDE. The coding agent often sends more sensitive data than production — your actual source — yet runs with none of the guardrails. Bring it under the same gateway.

They assume the IDE can be locked down. Roo Code’s provider settings are per-user; there’s no documented admin lockout. Chasing client-side enforcement is the wrong layer. Enforce at the gateway, where it actually holds.

They skip code/secret scanning. A coding agent will happily paste an .env file into a prompt. Without guardrails, that secret leaves your perimeter.

Want every developer’s AI coding spend in one governed view?

How to point Roo Code (or Cline) at the gateway

The setup uses the agent’s OpenAI-compatible provider. First, grab your gateway base URL and model name from the TrueFoundry playground’s unified code snippet.

TrueFoundry playground unified code snippet with base URL and model name
Copy the base URL and model name from the playground. Source: TrueFoundry docs.

In Roo Code, open the sidebar, choose “OpenAI Compatible” (or “Custom”) as the API provider, and enter your gateway base URL, the model name, and your TrueFoundry token.

Configuring the TrueFoundry AI Gateway in Roo Code
Roo Code’s provider configuration pointed at the gateway. Source: TrueFoundry docs.

Save, then test by asking the agent to work on a file — the response now flows through the gateway.

Roo Code generating code through the TrueFoundry AI Gateway
Roo Code running against the gateway. Source: TrueFoundry docs.

You can define multiple profiles for different tasks — a high-quality model for complex generation, a cheaper one for quick edits — all through the same gateway:

{
  "roocode.apiProfiles": [
    {
      "name": "TrueFoundry — high quality",
      "baseUrl": "{GATEWAY_BASE_URL}",
      "apiKey": "your-truefoundry-token",
      "model": "anthropic-account/your-strong-model",
      "description": "Complex code generation"
    },
    {
      "name": "TrueFoundry — fast",
      "baseUrl": "{GATEWAY_BASE_URL}",
      "apiKey": "your-truefoundry-token",
      "model": "openai-account/your-fast-model",
      "description": "Quick edits"
    }
  ]
}

Cline configures identically — same OpenAI-compatible provider, same base URL, same token — so a migration from Roo Code to Cline keeps your governance exactly as-is.

The per-user config caveat (be honest about this)

One thing worth stating plainly: Roo Code’s gateway settings live in user-editable API configuration profiles, and there is no documented admin or managed-config lockout. autoImportSettingsPath can seed a shared profile, but it doesn’t enforce one. MCP server settings are likewise per-user.

That sounds like a gap, but it points to the right mental model: you don’t govern a coding agent by locking the IDE — you govern it at the gateway. Whatever a developer types into their settings, their calls still hit your gateway, where budgets, the model allowlist, guardrails, and audit apply unconditionally. Client config is convenience; the gateway is control. Build your policy there and the per-user settings stop mattering.

A worked example: a 50-developer fleet

A 50-engineer org rolls out an AI coding agent. Without a gateway, each developer holds a provider key, picks their own model, and generates uncapped spend. Finance sees one large provider invoice with no breakdown; security has no record of what code left the building.

Route all 50 through the gateway and the picture inverts:

  • Spend shows up per developer and per team, so the $9,000 monthly bill is attributable — and the three developers driving 40% of it are visible.
  • A budget caps each team, so one runaway agent loop can’t blow the quarter’s quota.
  • A model allowlist keeps everyone on approved, cost-appropriate models.
  • Guardrails catch the .env file before it reaches a provider.
  • The audit log answers “what source code touched which model” in a security review.

None of that required locking a single IDE. It required one control point.

Gotchas worth knowing

  • Roo Code is end-of-life. For new rollouts, use Cline; the gateway setup is the same.
  • Use the OpenAI-compatible provider, and make sure your base URL stops where the agent expects — it appends /chat/completions itself.
  • The model must support tool calling for agent work; pick an allowlisted model that does.
  • Model IDs must match exactly what the gateway playground shows, or you’ll hit “model not found.”
  • Don’t chase client-side lockdown. Enforce budgets, allowlists, and guardrails at the gateway.

Related reading

Conclusion

The coding agent in your developers’ editors is one of the most powerful — and least governed — LLM clients you run. Roo Code’s shutdown is a good moment to fix that: whether you’re keeping existing installs alive or moving to Cline, the answer isn’t to lock down the IDE, it’s to route every call through a gateway that enforces cost, policy, guardrails, and audit on its own terms.

Point the agent at the TrueFoundry AI Gateway and the ungoverned client becomes a governed one — one key, one view of spend, one place where your rules actually hold.

Govern every developer’s coding agent

Try now.

One gateway for all your models, MCP servers, and agents.
No credit card needed.

Start free
Table of Contents

One Gateway for Every LLM, Agent and MCP Server

Book a 30-min with our AI expert

Book a Demo

The fastest way to build, govern and scale your AI

Book Demo
Summarize with
ChatGPT logo by OpenAI
Perplexity AI logo
Blurry red snowflake on white background, symmetrical frosty design with soft edges and abstract shape.

Discover More

No items found.
October 14, 2026
|
5 min read

The Decisions API Is Now Live on TrueFoundry AI Gateway

No items found.
October 14, 2026
|
5 min read

Deepgram on the AI Gateway: STT, TTS, Cost and Governance

No items found.
October 14, 2026
|
5 min read

DSPy Through a Gateway: Cost, Rate Limits and Fallback

No items found.
October 14, 2026
|
5 min read

Roo Code: Governing a Coding Agent Through a Gateway

No items found.
No items found.

Recent Blogs

Black left pointing arrow symbol on white background, directional indicator.
Black left pointing arrow symbol on white background, directional indicator.

Frequently asked questions

Is Roo Code still available?

Roo Code’s vendor announced a shutdown in May 2026 and now points users to Cline. Existing installs keep working, but there are no new releases. New teams should adopt Cline, which integrates with a gateway the same way.

How do I connect Roo Code to the TrueFoundry AI Gateway?

Use Roo Code’s “OpenAI Compatible” provider. Set the base URL to your gateway URL, enter the model name from the gateway playground, and use your TrueFoundry token as the API key.

Can I stop developers using models I haven’t approved?

Yes — at the gateway. The gateway enforces a model allowlist on every call, so even if a developer types a different model into the IDE, only allowed models are served.

Does the gateway stop secrets leaking from my code into prompts?

It can. Secret and PII guardrails scan prompts (and code) at the gateway and block or redact leaks before they reach a provider.

How do I see what each developer’s coding agent costs?

The gateway tracks cost per developer, team, and model, so agent spend is attributed and visible rather than buried in one provider invoice.

Does this keep my code in my environment?

With TrueFoundry’s data plane running in your VPC or on-prem, prompts and code pass through a gateway you control, and usage data stays in your environment.

Take a quick product tour
Start Product Tour
Product Tour