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.3 and deepseek-v4.1-flash) and submit.

If auto-detection fails, enter the model IDs manually — they must exactly match GreenPT's /v1/models response, including case.

glm-5.3z.aiFlagship

The newest z.ai flagship reasoning model, successor to glm-5.2, with agentic tool-use at the same price.

Input€1.10
Cached input€0.275
Output€4.40
Context1M
ReleasedAug 2026
ChatReasoningTool useAgentic coding

Use it for: The default: agentic, multi-file work across a large codebase.

deepseek-v4.1-flashDeepSeek

DeepSeek V4.1 Flash, a multimodal reasoning model with a 1M-token context window for chat and agentic coding.

Input€0.22
Cached input€0.011
Output€1.10
Context1M
ReleasedSep 2026
ChatReasoningVisionLong context

Use it for: Routine edits, quick questions and test runs, at a fraction of the cost.

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.3",
  "provider": {
    "greenpt": {
      "name": "GreenPT",
      "options": {
        "apiKey": "{env:GREENPT_API_KEY}",
        "baseURL": "https://api.greenpt.ai/v1"
      },
      "models": {
        "glm-5.3": {
          "name": "GLM-5.3",
          "tool_call": true,
          "cost": {
            "input": 1.1,
            "output": 4.4
          },
          "limit": {
            "context": 1000000,
            "output": 32768
          }
        },
        "deepseek-v4.1-flash": {
          "name": "DeepSeek V4.1 Flash",
          "tool_call": true,
          "cost": {
            "input": 0.22,
            "output": 1.1
          },
          "limit": {
            "context": 1000000,
            "output": 32768
          }
        }
      }
    }
  }
}

Set the key in your shell:

export GREENPT_API_KEY="your-greenpt-key"

Notes:

  • limit: limit.context is the model's context window; if it stays unset (0), conversations grow without being compacted. limit.output is the reply budget Kilo requests; 32,768 leaves room for reasoning tokens.
  • 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; both 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