Files
coder/docs/ai-coder/ai-gateway/clients/roo-code.md
T
Yevhenii ShcherbinaandSusana Ferreira 95fd3e5e23 docs: use coder-api-token instead of coder-session-token (#24316)
## Summary

Follows up on https://github.com/coder/coder/pull/24032
Renames "Coder session token" to "Coder API token" in AI Gateway client
documentation pages.
Also renames the `CODER_SESSION_TOKEN` env var to `CODER_API_TOKEN` in
Codex CLI examples and Copilot proxy configuration.

Note: "Coder session token" is still used in some parts of the
documentation where it make sense.

---------

Co-authored-by: Susana Ferreira <susana@coder.com>
2026-04-14 16:14:48 -04:00

2.1 KiB

Roo Code

Roo Code allows you to configure providers via the UI and can be set up to use AI Gateway.

Configuration

Roo Code allows you to configure providers via the UI.

Centralized API Key

OpenAI Compatible

  1. Open Roo Code in VS Code.
  2. Go to Settings.
  3. Provider: Select OpenAI.
  4. Base URL: Enter https://coder.example.com/api/v2/aibridge/openai/v1.
  5. API Key: Enter your Coder API token.
  6. Model ID: Enter the model you wish to use (e.g., gpt-5.2-codex). Roo Code OpenAI Settings

Anthropic

  1. Open Roo Code in VS Code.
  2. Go to Settings.
  3. Provider: Select Anthropic.
  4. Base URL: Enter https://coder.example.com/api/v2/aibridge/anthropic.
  5. API Key: Enter your Coder API token.
  6. Model ID: Select your desired Claude model.

Roo Code Anthropic Settings

Notes

  • If you encounter issues with the OpenAI provider type, use OpenAI Compatible to ensure correct endpoint routing.
  • Ensure your Coder deployment URL is reachable from your VS Code environment.

BYOK (Personal API Key)

OpenAI Compatible

  1. Open Roo Code in VS Code.
  2. Go to Settings.
  3. Provider: Select OpenAI Compatible.
  4. Base URL: Enter https://coder.example.com/api/v2/aibridge/openai/v1.
  5. API Key: Enter your personal OpenAI API key.
  6. Model ID: Enter the model you wish to use (e.g., gpt-4o).
  7. Custom Headers: Add X-Coder-AI-Governance-Token with your Coder API token.

Roo Code BYOK OpenAI Settings

References: Roo Code Configuration Profiles