Kilo Code
Connect Kilo Code (VS Code, JetBrains, CLI) to GreenPT Code via its OpenAI Compatible provider with model auto-detection.
Kilo Code is an open-source agentic coding platform available as a VS Code extension, JetBrains plugin, and CLI. Its OpenAI Compatible provider connects to any Chat Completions-style endpoint, and it can auto-detect GreenPT's model list — making setup faster than most tools.
Prerequisites
- Kilo Code installed (VS Code, JetBrains, or CLI)
- A GreenPT API key from your GreenPT dashboard
Setup (VS Code / JetBrains)
- Click the gear icon in the Kilo Code panel to open settings.
- Under API Provider, choose OpenAI Compatible.
- Fill in the fields:
| Field | Value |
|---|---|
| Provider API | OpenAI Compatible (Chat Completions) |
| Base URL | https://api.greenpt.ai/v1 |
| API Key | Your GreenPT API key (raw, no Bearer prefix) |
| Models | Select from the auto-fetched list (see below) |
- Click Submit. GreenPT's models appear in the model picker.
Automatic model detection
Once you enter a valid Base URL and API key, Kilo Code queries GreenPT's
/v1/models endpoint and shows a searchable picker with all models available on
your account — no manual model-ID typing needed. Select the models you want
(e.g. glm-5.2, minimax-m2.5, kimi-k2.6) and submit.
If auto-detection fails, enter the model IDs manually — they must exactly match
GreenPT's /v1/models response, including case.
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 |
Setup (CLI) — kilo.jsonc
The Kilo Code CLI bundles @ai-sdk/openai-compatible as its default fallback
provider. Add GreenPT to your kilo.jsonc config:
{
"$schema": "https://app.kilo.ai/config.json",
"model": "greenpt/glm-5.2",
"provider": {
"greenpt": {
"name": "GreenPT",
"options": {
"apiKey": "{env:GREENPT_API_KEY}",
"baseURL": "https://api.greenpt.ai/v1"
},
"models": {
"glm-5.2": {
"name": "GLM-5.2",
"tool_call": true,
"cost": {
"input": 1.32,
"output": 4.62
},
"limit": {
"context": 1000000,
"output": 131072
}
},
"minimax-m2.5": {
"name": "MiniMax M2.5",
"tool_call": true,
"cost": {
"input": 0.17,
"output": 0.99
}
},
"kimi-k2.6": {
"name": "Kimi K2.6",
"tool_call": true,
"cost": {
"input": 0.83,
"output": 3.85
}
}
}
}
}
}Set the key in your shell:
export GREENPT_API_KEY="your-greenpt-key"Notes:
limit— setlimit.contextandlimit.outputto the model's real values. Iflimit.contextstays unset (0), conversations grow without being compacted.limitis only filled in forglm-5.2above; add it for the other models once their output limits are confirmed.cost— prices per million tokens, used for Kilo's in-session cost display. Values above match GreenPT's EU pricing so the display matches your actual billing.tool_call: true— required for agentic use; all three models support tool calling.
Verify the connection
curl https://api.greenpt.ai/v1/models \
-H "Authorization: Bearer $GREENPT_API_KEY"You should get back a list including the model IDs above. This is also the endpoint Kilo's auto-detection uses — if this call works, the model picker will populate.
Troubleshooting
| Symptom | Fix |
|---|---|
| Models don't appear in auto-detect picker | Confirm the curl check above works; Base URL must expose /v1/models |
| "Model Not Found" | Model ID must exactly match GreenPT's /v1/models response (case-sensitive) |
| 401 Unauthorized | Paste the key raw — no Bearer prefix in the API Key field |
| Connection errors | Verify the Base URL and that GreenPT's endpoint is reachable from your network |
| CLI shows provider but wrong model responds | Set "model": "greenpt/<model-id>" at the top level of kilo.jsonc so the default doesn't fall back to another provider |
| Conversations never compact (CLI) | limit.context is unset for that model — add the real context size |