Cline
Connect Cline, the autonomous VS Code coding agent, to GreenPT Code via its OpenAI Compatible provider.
Cline is an open-source autonomous coding agent for VS Code. It supports any OpenAI-compatible endpoint through its built-in OpenAI Compatible provider — no extension or plugin needed to use GreenPT.
Prerequisites
- VS Code with the Cline extension installed
- A GreenPT API key from your GreenPT dashboard
Setup
- Open Cline in VS Code and click the gear icon (settings) in the top-right corner.
- Configure the following fields:
| Field | Value |
|---|---|
| API Provider | OpenAI Compatible |
| Base URL | https://api.greenpt.ai/v1 |
| API Key | Your GreenPT API key |
| Model ID | glm-5.2 (or another model from the table below) |
- Click Verify (if your Cline version shows it) to confirm the connection, then save.
Base URL must end at /v1
The Base URL must end at /v1 — do not paste the full
/v1/chat/completions path. All four fields must belong to GreenPT; mixing a
GreenPT key with another provider's URL returns a 401.
Available models
| Model ID | Provider | Category | Input (€/1M) | Output (€/1M) | Context |
|---|---|---|---|---|---|
glm-5.2 | z.ai | Coding | €1.32 | €4.62 | 1M |
minimax-m2.5 | MiniMax | Coding | €0.17 | €0.99 | 200k |
kimi-k2.6 | Moonshot AI | Coding | €0.83 | €3.85 | 256k |
Model IDs are case-sensitive and must exactly match what GreenPT's /v1/models
endpoint returns.
Model Configuration (optional but recommended)
In the same settings panel, Cline's Model Configuration section lets you set advanced parameters per model. Two are worth setting for accurate cost tracking and context management:
- Context window — set to the model's context size (e.g. 1,000,000 for
glm-5.2) so Cline manages its context budget correctly. - Input/Output price — enter GreenPT's per-million-token prices from the table above so Cline's cost display matches your actual GreenPT billing.
Verify the connection
Quick sanity check outside of Cline:
curl https://api.greenpt.ai/v1/models \
-H "Authorization: Bearer YOUR_GREENPT_KEY"You should get back a list including the model IDs above. If this fails, fix the API key or endpoint before troubleshooting inside Cline.
Troubleshooting
| Symptom | Fix |
|---|---|
| "Invalid API Key" (401) | Confirm the key is a GreenPT key and matches the GreenPT Base URL — all fields must come from the same provider |
| "Model Not Found" (404) | Model ID must exactly match an ID from GreenPT's /v1/models response, including case |
| Connection errors | Check the Base URL ends in /v1 (not /v1/chat/completions), and that the endpoint is reachable from your network |
| Unexpected output/behavior | Try another model from the table, and double-check the Model Configuration parameters |
UI labels vary by version
Cline's UI labels can shift slightly between versions — if a field name doesn't match exactly, look for its equivalent in the provider settings panel.
Roadmap note: first-class provider listing
The OpenAI Compatible route above works today with zero changes on Cline's side.
For a first-class GreenPT entry in Cline's provider dropdown, Cline's
preferred path is a community provider package on the Vercel AI SDK (an
@greenpt/ai-sdk-provider npm package). Once published, GreenPT can be proposed
as a native provider — users would then select "GreenPT" directly instead of
configuring the generic OpenAI Compatible option.