Skip to content

Roo Code: Claude and Codex configuration

Create a Roo Code OpenAI-compatible profile for the model family and billing mode attached to the key.

Always choose Roo's “OpenAI Compatible” provider. Never choose OpenAI Codex or its OAuth login for a CloudService key; that provider authenticates against an OpenAI account and does not use the CloudService base URL.

Automatic configuration

bash
npm install -g cloudservice@latest
cloudservice

Select Roo Code. The CLI creates CloudService import profiles for the installed VS Code extension, detects the key's billing mode and model scope, imports the authenticated context/output limits, and avoids overwriting unrelated Roo profiles. It only selects routes whose authenticated catalog explicitly supports native tools. Import or activate the generated Claude or Codex profile when Roo opens, then run cloudservice doctor.

Run cloudservice update again after changing keys or after CloudService publishes new model limits. Roo stores the imported model metadata in its profile, so an old profile does not discover changed limits automatically.

Manual configuration for Codex models in Roo Code

In VS Code, open Roo Code, select Settings → API Provider, and create a profile with these fields:

  • API provider: OpenAI Compatible
  • API-credit base URL: https://api.yourdomain.example/v1
  • OpenAI token-pack base URL: https://api.yourdomain.example/token/v1
  • API key: the full key that belongs to the chosen URL
  • Model ID: enter one exact ID from the list below
  • Streaming: on
  • Context window: the positive context_window returned by authenticated model discovery
  • Max output tokens: the positive max_output_tokens returned for that exact model
  • Include max output tokens: on, only after entering the positive maximum above
  • codex-auto-review
  • gpt-5.3-codex
  • gpt-5.4
  • gpt-5.4-mini
  • gpt-5.5
  • gpt-5.6-luna
  • gpt-5.6-sol
  • gpt-5.6-terra

Roo uses its OpenAI-compatible client here. It is not the native Codex CLI or Codex OAuth provider, so Responses-only client behavior may differ.

DeepSeek V4 Flash compatibility

Let cloudservice update decide from authenticated discovery. When deepseek-v4-flash reports capabilities.tools=true, the CLI creates and selects a dedicated CloudService DeepSeek profile for Roo. If the active route reports tools disabled, Roo fails closed because its task loop cannot finish safely.

On a text-only route, follow the Continue for VS Code guide for Chat/Edit. Never force an agent profile by hand when the live model catalog reports tools=false.

Manual configuration for Claude models in Roo Code

Create a separate OpenAI Compatible profile with the same switches:

  • API-credit base URL: https://api.yourdomain.example/v1
  • Claude token-pack base URL: https://api.yourdomain.example/token/v1
  • API key: the full key that belongs to the chosen URL
  • Model ID: enter one exact Claude ID below
  • Streaming: on
  • Context window: use the authenticated context_window value for the exact model
  • Max output tokens: use the positive authenticated max_output_tokens value. Claude Opus 5 supports up to 128000; older entries may publish a lower cap.
  • Include max output tokens: on, only after entering that positive maximum
  • fable-5
  • claude-haiku-4-5-20251001
  • claude-opus-4-6
  • claude-opus-4-7
  • claude-opus-4-8
  • claude-opus-5
  • claude-sonnet-5

This is Claude through Roo's OpenAI-compatible adapter. It is not Claude Code's native Anthropic Messages configuration.

Verify with minimal context

Start a new Roo task, select the CloudService profile, disable optional repository context for the first request, and send Reply with K only. Confirm the response streams and ends normally. For Codex or Claude profiles, test a read-only file action before enabling writes or terminal commands.

Roo sends its output limit as max_completion_tokens. Never leave an enabled limit blank or set it to -1. CloudService accepts this current OpenAI-compatible field and returns a clear validation error for an invalid value instead of silently substituting a smaller limit.

Keep the profile private

Do not export or share a Roo profile that contains a real key. A Claude token key, OpenAI token key, and API-credit key cannot be exchanged across their model scopes or billing URLs.