cocodot
← Back to guides
Local card declined for overseas AI? cocodot: one card + one key
IntegrationUpdated 2026-09

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.

TL;DR: Third-party provider setup is not mainly a UI problem. It is a contract between a client and an endpoint: protocol, base URL, authentication header, model ID, and optional capabilities must all match. For cocodot in Cline, Roo Code, and Continue, use https://cocodot.co/api/ai/v1. For another provider, use the exact OpenAI-compatible base URL it documents; do not assume every compatible endpoint ends in /v1. For Claude Code CLI on cocodot, use the gateway root without /v1; Claude Code adds /v1/messages itself. Test the endpoint directly before opening the client, then test the client in two stages: a plain chat request and, if you need agent behavior, a real tool call. A 200 response proves only that one request worked—it does not prove tool calling, streaming, or every model feature. On cocodot, the public model catalog is available at /v1/models. Use an exact model ID returned by the catalog. Continue users should also note that current versions may choose OpenAI's Responses API for GPT-5 and o-series model names; set useResponsesApi to false when the provider exposes Chat Completions rather than /responses.

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.

Discover a model ID, then test Chat Completions directly
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.

Continue config.yaml for an OpenAI-compatible Chat Completions endpoint
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: false

6. 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.

Temporary Claude Code CLI gateway 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."}]
  }'

claude

7. 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

ClientProvider modeBase URL shapeImportant verification
ClineOpenAI CompatibleProvider-documented API basePlain response, then a tool call
Roo CodeOpenAI CompatibleProvider-documented API baseNative tool calling is required
Continueprovider: openaiProvider-documented apiBaseDisable Responses API when unsupported
Claude Code CLIAnthropic gatewayGateway root without /v1Check /status, then /v1/messages

FAQ

Should the base URL end in /v1?

For Cline, Roo Code, and Continue on cocodot, use https://cocodot.co/api/ai/v1. For Claude Code's Anthropic-format route, use https://cocodot.co/api/ai without /v1; Claude Code adds /v1/messages. The correct answer depends on what path the client appends.

Can I enter the model's marketing name instead of its ID?

Do not assume aliases. Fetch the provider's model catalog and copy the returned id exactly. This avoids silent fallback behavior and model-not-found errors. Recheck the catalog when a provider changes its available models.

Why does Continue try /responses instead of /chat/completions?

Current Continue versions use the Responses API by default for o-series and GPT-5 model names. If the compatible provider exposes Chat Completions but not /responses, add useResponsesApi: false to that model entry.

Why does chat work in Roo Code while agent actions fail?

Basic text generation and native tool calling are separate capabilities. Roo Code requires OpenAI-compatible native tools and has no XML fallback. Test a harmless tool action and switch to a model and route with verified tool support if structured calls fail.

Why did my Claude Code CLI setup not change Claude Code Desktop?

They use different configuration paths. CLI reads its gateway environment variables or settings; Desktop uses its third-party inference configuration. Configure and verify Desktop separately.

Can several clients share one API key?

They may be technically able to, but separate keys are safer operationally. You can revoke one client without interrupting the others and identify which integration generated unexpected traffic. Never commit any of those keys to a repository.

About cocodot

cocodot is a payment and AI access service for developers and cross-border teams in mainland China. It provides US-BIN virtual cards issued by a licensed institution — used to pay for overseas subscriptions and ad accounts — and an OpenAI-compatible AI API gateway for calling Claude, GPT and Gemini from within mainland China. Both share one wallet, funded by Alipay / WeChat Pay (RMB), USDT / USDC and accounted in USD. Card: $9.9 to open, 3% to load, $1 per active card per month; spending: $0.60 settlement fee on purchases under $20; a corresponding fee applies when the issuer charges one.

Service scope, pricing and limits →