Roo Code can use an OpenAI-compatible provider. The wiring is the same pattern as other custom OpenAI clients.
Before you start
- Create a token in Tokens.
- Choose
https://relay.4aicode.comorhttps://relay.4aicode.net.
Setup
- Install Roo Code and open its settings.
- Select OpenAI Compatible as the provider.
- Set:
- Base URL:
https://relay.4aicode.com/v1 - API Key:
sk-4ai-... - Model: an exact ID from the model catalog
- Base URL:
- Send a test prompt and verify Usage.
Base URL: https://relay.4aicode.com/v1
API Key: sk-4ai-xxxxxxxxxxxxxxxx
Model: gpt-5.6-sol
Notes
- The base URL must include
/v1. - Keep tokens out of shared project config; prefer user-level settings.
- If you need Anthropic Messages, use Claude Code instead of assuming Roo Code speaks that protocol.