GreenPT Docs
GreenPT Code

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)

  1. Click the gear icon in the Kilo Code panel to open settings.
  2. Under API Provider, choose OpenAI Compatible.
  3. Fill in the fields:
FieldValue
Provider APIOpenAI Compatible (Chat Completions)
Base URLhttps://api.greenpt.ai/v1
API KeyYour GreenPT API key (raw, no Bearer prefix)
ModelsSelect from the auto-fetched list (see below)
  1. 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 IDProviderCategoryInput (€/1M)Output (€/1M)Context
glm-5.2z.aiCoding€1.32€4.621M
minimax-m2.5MiniMaxCoding€0.17€0.99200k
kimi-k2.6Moonshot AICoding€0.83€3.85256k

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 — set limit.context and limit.output to the model's real values. If limit.context stays unset (0), conversations grow without being compacted. limit is only filled in for glm-5.2 above; 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

SymptomFix
Models don't appear in auto-detect pickerConfirm 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 UnauthorizedPaste the key raw — no Bearer prefix in the API Key field
Connection errorsVerify the Base URL and that GreenPT's endpoint is reachable from your network
CLI shows provider but wrong model respondsSet "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

On this page