Cline Integration
Cline is a popular AI coding assistant for VS Code that supports OpenAI Compatible Providers. Integration with CoreRouter is straightforward.
Prerequisites
- VS Code installed.
- Cline extension installed.
- API Key created in CoreRouter console.
- Model ID confirmed.
Configuration Steps
- Open VS Code Extension Marketplace and search for Cline.
- Click the Cline icon in the VS Code sidebar.
- If the first-launch screen asks How will you use Cline?, select Bring my own API key and click Continue. For an existing setup, open the model or API Provider settings.
- Select
OpenAI Compatible. The initial provider page may default toOpenRouter, so change it if needed. - Fill in the information below and save. Confirm the actual Model ID used in Act mode. If Plan and Act use separate model configurations, check the settings for the relevant mode.
This first-launch flow was tested in Cline 4.1.25. Other versions may have different screens.
| Configuration Item | Value |
|---|---|
| Provider | OpenAI Compatible |
| Base URL | https://api.corerouter.cloud/v1 |
| API Key | CoreRouter API Key |
| Model | Model ID from console, e.g., claude-sonnet-4-5 |
Configuration Example
Provider: OpenAI Compatible
Base URL: https://api.corerouter.cloud/v1
API Key: sk-xxxxxxxxxxxxxxxx
Model: claude-sonnet-4-5Test Connection
Open a separate test project folder in VS Code and switch to Act mode. Use a project with existing tests; if it has none, prepare the test requirements and command first.
First test project analysis:
Please analyze the current project's directory structure and tell me what tech stack this project uses.Then test Agent capabilities:
Please create a hello.ts file, implement a hello function, then run tests and tell me the test results.Inspect the generated files, confirm that existing tests were not modified, and run the tests independently. Completing these steps verifies the basic Agent workflow for this task with the current model and configuration. Record intermediate errors and retries as well, and assess stability across further multi-step tasks.
Model Selection
Cline requires models that stably support Tool Calling and Streaming. Prioritize models marked as supporting Coding Agent in the console. Regular chat models may be able to answer questions but may not complete file operations, multi-step tasks, or tool calling.
Common Issues
Connection Failed
Check:
- Is Base URL
https://api.corerouter.cloud/v1? - Is the API Key complete?
- Does the Model ID come from the console?
- Does the API Key have permissions for that model?
Can chat, but cannot execute tasks
Confirm the actual Model ID saved for Act mode, then inspect the failed tool call and its arguments. Successful chat alone does not identify the cause of a task failure.
If a tool returns {"error":"✖ Invalid input"}, check whether its arguments are complete. During testing with Cline 4.1.25, tools including read_files and run_commands received {} as input, which failed tool argument validation because file paths or commands were missing. The task eventually completed, but the intermediate errors still need to be recorded.
Record the Cline version, actual model ID, failed tool name, and original arguments without including your API Key. Empty arguments in client logs alone cannot distinguish model output, relay conversion, and client parsing issues. Diagnosis requires checking the raw API response or streamed tool arguments as well. Do not assume this error means the Key or Base URL is incorrect.
What should Model be filled with?
Fill in the Model ID displayed in the CoreRouter console.
- Correct:
claude-sonnet-4-5 - Wrong:
Claude Sonnet
Security Recommendations
- Don't write API Keys into project source code.
- Create a separate API Key for Cline.
- Set a quota limit for the API Key used by Cline.
- Immediately disable or delete the API Key after a leak.
