Cline Configuration
Cline is an AI coding assistant plugin for VSCode. It connects to the TokenSwitch platform via the OpenAI Compatible protocol.
1. Install Cline
Download and install VSCode.
Open VSCode, search for
Clinein the Extensions Marketplace, and install it.
2. Configure Access Credentials
After installation, click the Cline icon in the left sidebar to open the configuration panel. Click Use your own API key, select OpenAI Compatible as the API Provider, and fill in the parameters below. If you have used Cline before, click the settings button in the top-right corner to open the configuration panel.
| Field | Description |
|---|---|
| API Provider | Select OpenAI Compatible. |
| Base URL | |
| API Key | Enter the API Key you created. |
| Model ID | Enter the model ID. You can copy it by clicking a model card in the "Portal / Model Marketplace". |
About the /v1 in the Base URL
The platform's API endpoint is . When connecting via the OpenAI Compatible protocol, the OpenAI API path is /v1/chat/completions, so the Base URL must end with /v1. In contrast, Anthropic protocol clients append /v1/messages on their own, so the Base URL should not include /v1. The way each client fills in the Base URL differs slightly. A few typical examples:
| Client | Protocol | Base URL |
|---|---|---|
| Cline | OpenAI Compatible, does not auto-complete the path | |
| Aider / Codex | OpenAI compatible, configured via the OPENAI_API_BASE environment variable | |
| CherryStudio | OpenAI compatible, auto-completes /v1 at the end of the API address | |
| Claude Code | Anthropic protocol, client appends /v1/messages automatically | (ANTHROPIC_BASE_URL) |
If a request returns 404 or reports that the endpoint cannot be found after configuration, first check whether the /v1 at the end of the Base URL is handled correctly per the table above.
3. Start Using
Once configured, click Let's go! (or save the settings) to return to the chat interface, then enter a task to start.
4. FAQ
If you encounter an error during configuration, use the HTTP status code together with the code and message fields in the response body to troubleshoot against the User Error Code Guide. Some common errors are listed below.
Error 401 Incorrect API key provided
Token (API Key) authentication failed. Possible causes:
The API Key is incorrect or expired. Log in at https://neolink.com/ and verify or recreate it on the "API Key" page.
The Base URL is incorrect. Confirm it is .
For more authentication failure scenarios (e.g., expired, deleted, or quota-exhausted tokens), see HTTP 401 — Authentication Failed in the error code guide.
Error 400 Bad Request
The request parameters are incorrect or malformed — for example, a missing required field, an empty model name, or a request body that does not conform to the OpenAI format. Fix it according to the response message and retry. See HTTP 400 — Bad Request.
Error 404 Invalid URL
The requested endpoint path does not exist, usually because the /v1 at the end of the Base URL was not handled correctly for the protocol (see "About the /v1 in the Base URL" above). See HTTP 404 — Not Found.
Error 403 Permission/Quota Denied
The request was rejected — the token may not have access to the model, the quota/balance may be insufficient, or the IP may not be whitelisted. Troubleshoot against HTTP 403 — Permission/Quota Denied, and contact your administrator if needed.
Error 429 Rate Limit
The request rate exceeded the RPM limit configured for the token. Lower your request frequency and retry. See HTTP 429 — Rate Limit.
Error Invalid API Response: empty or unparsable response
This error is thrown by Cline when it fails to parse the response; it is not a platform error code. It usually occurs because the tool-call format returned by the model is incompatible with Cline, or because the model returned an empty response. Suggestions: retry once or twice to rule out an occasional empty response; if the error persists, switch to a model with better compatibility (such as Claude or GPT series) to verify; for reasoning models, enable Enable R1 messages format under MODEL CONFIGURATION.
