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, kimi-k3, deepseek-v4-flash-0731) 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.10€4.401M
kimi-k3Moonshot AICoding€3.30€16.501M
deepseek-v4-flash-0731DeepSeekCoding€0.14€0.351M

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.10,
            "output": 4.40
          },
          "limit": {
            "context": 1000000,
            "output": 131072
          }
        },
        "kimi-k3": {
          "name": "Kimi K3",
          "tool_call": true,
          "cost": {
            "input": 3.3,
            "output": 16.5
          }
        },
        "deepseek-v4-flash-0731": {
          "name": "DeepSeek V4 Flash",
          "tool_call": true,
          "cost": {
            "input": 0.14,
            "output": 0.35
          }
        }
      }
    }
  }
}

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