How to Configure Cline, Roo Code, Continue, and Claude Code with a Third-Party LLM API
A reliable setup guide for third-party model providers: choose the right protocol, use the correct base URL, fetch exact model IDs, configure four popular coding clients, and test chat and tool calling separately.
1. Treat setup as an API contract, not a checkbox hunt
Every client screen eventually reduces to five facts: the protocol it will send, the base URL it will join to a request path, the authentication header, the exact model ID, and the features that model and endpoint actually support. A configuration can look correct while still pointing at the wrong route. OpenAI-compatible clients require the exact base URL documented by the provider; many use a path such as https://provider.example/v1, but that suffix is not universal. Depending on the client and model, requests may use Chat Completions or the Responses API. Anthropic-format clients send Messages requests to a gateway root. Do not add or remove /v1 by habit: use the provider-documented form for that client. Also separate basic compatibility from agent compatibility. Text chat may work even when tool calls fail, so a successful hello-world response is only the first test.
2. Prove the provider route before opening an IDE
First fetch the model catalog and copy a returned id exactly. Then send one small request directly to the same route the client will use. This isolates provider, key, and model errors from editor configuration. On cocodot, GET https://cocodot.co/api/ai/v1/models is the public OpenAI-format catalog, while authenticated requests use a cocodot API key. Never put a key in a URL, screenshot, repository, or support message. If the direct request fails, changing client settings cannot fix it; resolve the HTTP status first. If it succeeds, preserve that known-good URL, key type, and model ID when configuring the client.
curl -s https://cocodot.co/api/ai/v1/models
curl https://cocodot.co/api/ai/v1/chat/completions \
-H "Authorization: Bearer $COCODOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_ID_FROM_THE_CATALOG",
"messages": [{"role": "user", "content": "Reply with OK."}],
"max_tokens": 16
}'3. Configure Cline with the OpenAI-compatible provider
Open Cline settings and select OpenAI Compatible as the API provider. Enter https://cocodot.co/api/ai/v1 as the Base URL, paste your API key, and enter an exact model ID from the catalog. Cline also exposes fields such as context window, maximum output tokens, image support, and computer-use support. Treat those as declarations, not upgrades: checking a capability does not make an unsupported model capable of it. Begin with conservative values documented for the selected model. Use Cline's connection verification, send a short prompt, and only then try an action that requires a tool. If chat works but file operations fail, the likely issue is tool-call compatibility rather than the base URL.
4. Configure Roo Code—and test tools immediately
In Roo Code settings, choose OpenAI Compatible, set the Base URL to https://cocodot.co/api/ai/v1, enter the key, and select the exact model ID. Roo Code's current official documentation is unusually clear about one constraint: it uses native tool calling exclusively and has no XML fallback. The chosen model and provider route must therefore support OpenAI-compatible function calls. A normal text answer is not sufficient validation. Ask Roo to perform a harmless workspace action, such as listing files or reading a small test file, and confirm that a structured tool event appears. If plain chat succeeds but the agent loops, emits tool syntax as prose, or reports malformed arguments, change to a verified tool-capable model before changing unrelated settings.
5. Configure Continue with current YAML, not deprecated JSON
Continue's current configuration format is config.yaml; its older config.json format is deprecated. Use provider: openai, set apiBase to the provider-documented OpenAI-compatible base, and keep the key outside a committed repository. One current-version trap matters for compatible providers: Continue uses OpenAI's /responses endpoint by default for o-series and GPT-5 model names. cocodot's verified OpenAI-compatible route is Chat Completions, so set useResponsesApi: false for those names. This tells Continue to call /chat/completions; it does not change the model itself. Restart or reload Continue after editing the configuration, then test Chat before enabling Agent features.
name: cocodot
version: 0.0.1
schema: v1
models:
- name: cocodot-model
provider: openai
model: MODEL_ID_FROM_THE_CATALOG
apiBase: https://cocodot.co/api/ai/v1
apiKey: YOUR_COCODOT_API_KEY
useResponsesApi: false6. Configure Claude Code CLI through the Anthropic-format route
Claude Code CLI uses Anthropic's Messages shape, so point it at the gateway root rather than the OpenAI /v1 root. For cocodot, set ANTHROPIC_BASE_URL=https://cocodot.co/api/ai. Claude Code will call /v1/messages. cocodot accepts either a bearer credential or an x-api-key; the example below uses ANTHROPIC_AUTH_TOKEN, which Claude Code sends as Authorization: Bearer. Start claude from the same terminal so it inherits the variables. Run /status and confirm that the Anthropic base URL and credential source shown there match your intended route. Test with temporary shell exports first. If you later persist the values, use a user-level or gitignored local settings file—never commit a credential in a shared project configuration.
export ANTHROPIC_BASE_URL=https://cocodot.co/api/ai
export ANTHROPIC_AUTH_TOKEN=YOUR_COCODOT_API_KEY
curl "$ANTHROPIC_BASE_URL/v1/messages" \
-H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "MODEL_ID_FROM_THE_CATALOG",
"max_tokens": 16,
"messages": [{"role": "user", "content": "Reply with OK."}]
}'
claude7. Claude Code Desktop and VS Code are separate surfaces
Do not assume a working CLI export automatically configures every Claude Code surface. Anthropic's current documentation says the desktop app reads gateway routing from its third-party inference configuration, not from ANTHROPIC_BASE_URL or settings.json. In Desktop, enable Developer Mode through Help → Troubleshooting, restart when prompted, then use Developer → Configure Third-Party Inference. The VS Code extension has its own claudeCode.environmentVariables setting for reliable startup authentication. Shell exports affect only programs launched from that shell; an editor opened from the Dock or Start menu may not inherit them. Verify each surface independently instead of treating a successful CLI test as proof that Desktop or VS Code uses the same provider.
8. Use a layered acceptance test and read errors literally
Validate in order: model discovery, direct API request, client chat, streaming if you need it, then one harmless tool call. A 401 often indicates that a credential was missing, rejected, or sent in the wrong header, but read the provider's error body before assigning a cause. A 404 often points to a path-composition problem, although providers may also use it for unavailable resources. A model-not-found response should trigger checks of the model catalog, route, spelling, and account access; it does not universally prove that authentication succeeded. If chat works but agent behavior fails, investigate tool-call compatibility and the client's actual request. A client that contacts another host may be using a different route—check its status screen or request log. Keep separate keys per client when practical so access can be revoked and usage investigated independently. Current client-specific behavior in this guide was checked against the official Cline, Roo Code, Continue, and Claude Code gateway documentation.
Which endpoint shape each coding client expects
| Client | Provider mode | Base URL shape | Important verification |
|---|---|---|---|
| Cline | OpenAI Compatible | Provider-documented API base | Plain response, then a tool call |
| Roo Code | OpenAI Compatible | Provider-documented API base | Native tool calling is required |
| Continue | provider: openai | Provider-documented apiBase | Disable Responses API when unsupported |
| Claude Code CLI | Anthropic gateway | Gateway root without /v1 | Check /status, then /v1/messages |