Kilo Code Access

Kilo Code officially provides both VS Code graphical interface and command line configuration. The graphical interface can automatically discover the model through /v1/models; the command line configuration uses kilo.json. If

If not yet installed, open Kilo documentation and follow the editor extension or command-line installation guide. CLI means a client operated through commands in a terminal.

VS Code graphical interface

  1. Install Kilo Code extension and open settings.
  2. Enter Providers, scroll below, and click Custom provider.
  3. Fill in:
Field Fill in content
Provider ID shanhai
Display name ShangHai Do
Provider API OpenAI Compatible
Base URL https://shanghaido.com/v1
API key Your site token
Models Select the automatically discovered qwen3.8-flash, or manually add the model
  1. Click Submit and select shanhai/qwen3.8-flash in the model selector.

Kilo will access /v1/models to automatically obtain the model list. If automatic discovery fails, you can click Fetch models to try again, or manually fill in the model name. Kilo also supports filling in the complete /v1/chat/completions address into the Base URL, but the recommended way of writing ShangHai Do is still the root address /v1.

CLI configuration

Kilo official CLI configuration file location is:

Windows users open the corresponding files according to the configuration directory rules of the current version of Kilo. Add a custom provider:

{
  "provider": {
    "shanhai": {
      "env": ["SHANHAI_API_KEY"],
      "npm": "@ai-sdk/openai-compatible",
      "models": {
        "qwen3.8-flash": {
          "name": "qwen3.8-flash",
          "limit": {
            "context": 16384,
            "output": 2048,
          },
        },
      },
      "options": {
        "baseURL": "https://shanghaido.com/v1",
      },
    },
  },
  "model": "shanhai/qwen3.8-flash",
}

Set environment variables before starting Kilo:

$env:SHANHAI_API_KEY = "YOUR_API_KEY"
kilo

macOS / Linux:

export SHANHAI_API_KEY="YOUR_API_KEY"
kilo

limit determines how Kilo manages historical conversations and output; when the official description is not filled in, it will default to 0. This example actively sets the client budget to 16384 context units and 2048 output units, which are only used for ordinary question and answer and small file operations. These two values ​​are not verified model specifications. Token is the unit used by the model to calculate text length, which is not equivalent to the number of Chinese characters. For larger projects, you need to confirm the actual model limitations with the site customer service before adjusting these two values.

Usage and troubleshooting

Use ordinary text request first, and then try to call the tool. When encountering Model Not Found, check whether the provider prefix and model name of shanhai/qwen3.8-flash are both correct.

official information

encountered a problem

If you encounter problems with calling or configuration, please contact the site customer service and provide the model name, error time and error information to facilitate troubleshooting.