Knowledge Base Sections ▾

Tools

Tools

Roo Code + Gonka AI — Autonomous AI Agent in VS Code

Roo Code is an autonomous AI agent for VS Code: it reads and edits files, runs commands in the terminal, works with the browser, and completes multi-step development tasks. It's a fork of Cline that goes further: customizable work modes (Architect, Code, Ask, Debug, and custom), custom project-specific instructions, and a flexible model settings panel. Essentially, it's an entire team of AI specialists inside your editor.

The main problem with such agents is token consumption. For a single task, Roo Code processes file contexts, command outputs, and tool results—this can be tens of millions of tokens. At Anthropic's prices ($3-15 per 1M), one full session turns into $30-1500. For daily work, this is unrealistic.

JoinGonka Gateway reduces costs thousands of times: the same session will cost $0.01-1.00. The Gateway resells inference from the decentralized Gonka network and supports both the OpenAI format (provider "OpenAI Compatible") and the Anthropic format (endpoint /v1/messages)—Roo Code connects via either of the two. This transforms Roo Code from an expensive demonstration into a daily working tool.

Step 1: Install Roo Code and get a key

Install Roo Code: In VS Code, open Extensions (Ctrl/Cmd+Shift+X), search for “Roo Code,” and click Install. After installation, the Roo Code kangaroo icon will appear in the sidebar.

JoinGonka API key: If you don't have a key yet, register at gate.joingonka.ai/register, get 10M free tokens, and create a key with the jg- prefix in the Dashboard.

Step 2: Configure Roo Code (OpenAI Compatible)

Open the Roo Code panel and go to settings (gear icon). In the provider section, set:

  1. API Provider — select OpenAI Compatible.
  2. Base URLhttps://gate.joingonka.ai/v1
  3. API Keyjg-your-key
  4. Model (Model ID) — Qwen/Qwen3-235B-A22B-Instruct-2507-FP8

Below, in the Model Configuration block, you can manually refine model parameters:

  • Context Window131072 (128K tokens).
  • Max Output Tokens8192 for Qwen3-235B (Gateway ceiling). For Kimi K2.6, set 3072; for MiniMax M2.7, set 4096.
  • Input Price / Output Price — you can set actual rates (≈$0.0005 per 1M input, output ×3) so that Roo Code correctly calculates the cost of tasks directly in the interface.

Important about tool calling: Roo Code uses only native tool calling—there is no XML fallback like in older agents. Therefore, the model must support function calling. The default Qwen3-235B through our Gateway supports native tool calling—Roo Code works with it out of the box.

Verification: In Roo Code chat, type “Create a file hello.py with a function that prints Hello World.” The agent will suggest creating the file and show a diff for approval.

Comparing Agent Session Costs

Roo Code is an agentic tool: it doesn't respond with a single message but performs a task—reads files, writes code, runs tests, fixes bugs. Each action is a model call. Let's compare the cost of typical sessions:

TaskTokensAnthropic ClaudeOpenAI GPTJoinGonka Gonka
Simple bug fix~5M$15 — $75$12 — $50$0.005
New feature (2-3 files)~20M$60 — $300$50 — $200$0.02
Module refactoring~50M$150 — $750$125 — $500$0.05
Full development session (4h)~100M$300 — $1,500$250 — $1,000$0.10

With JoinGonka Gateway, Roo Code becomes an everyday tool—you can use it for every ticket, every bug, every feature, without worrying about the bill. 10M free tokens at startup are enough for dozens of tasks.

Model parameters (all have 128K context = 131072 tokens): Qwen3-235B — up to 8192 tokens of response; Kimi K2.6 — up to 3072; MiniMax M2.7 — up to 4096. If max_tokens for a non-stream request is not specified, the Gateway will default to returning up to 1500 tokens. Roo Code automatically breaks down long generations into steps.

How Roo Code differs from Cline: modes and Anthropic format

Roo Code is a fork of Cline, but with significant differences that change the workflow:

  • Modes: Switch the agent's role to match the task—Architect for planning, Code for writing code, Ask for project questions, Debug for error searching. You can create custom modes with separate instructions and approved tool sets.
  • Native tool calling only: Unlike agents with text/XML parsing, Roo Code sends tools according to the native OpenAI tools schema and receives calls as separate events—lower latency and more reliable results. The downside: the model must support function calling (Qwen3-235B through our Gateway supports it).
  • Custom instructions and profiles: Project rules (e.g., via a rules file in the repository) and several saved provider configurations that are easy to switch between.

Connecting via Anthropic format. If you want to use our /v1/messages endpoint instead of the OpenAI format: In settings, select API Provider → Anthropic, check "Use custom base URL" and specify https://gate.joingonka.ai, paste the same jg-your-key into the Anthropic API Key field, then specify the model name (e.g., Qwen/Qwen3-235B-A22B-Instruct-2507-FP8). The key and balance are shared for both formats; native tool_use in Anthropic mode also passes through the Gateway.

Roo Code + Gonka = autonomous AI agent in VS Code with modes and native tool calling for pennies. A development session costs $0.10 instead of $300-1,500 with Anthropic, and 10M free tokens are enough for dozens of tasks.

Want to learn more?

Explore other sections or start earning GNK right now.

Get 10M free tokens →