Kilo Code with MartLLM: add a custom provider in 1 minute
In Kilo Code open Settings → Providers → Custom provider, set Provider API to OpenAI Compatible, Base URL to https://api.martllm.com/v1, paste your MartLLM key, press Fetch models, pick the ones you want and Submit. The same setup can live in ~/.config/kilo/kilo.jsonc.
Kilo Code's current version (7.x) shares one settings file between VS Code, JetBrains and the kilo CLI, so you set MartLLM up once. Older guides that show a provider dropdown with model-info fields describe the legacy extension.
Fastest: one command
npx uberllm init --tool kilo-code
For VS Code, JetBrains and the kilo CLI at once: it makes a key in your browser, adds the provider to ~/.config/kilo/kilo.jsonc with each model's real context and output limits, and adds one line to your shell profile that loads the key. The file is backed up first, and npx uberllm init --undo puts it back. What it changes. To do it by hand, follow the steps below.
Steps (in the editor)
- Make a key on your keys page and add credit.
- Open Kilo Code, click the gear icon → Providers tab, scroll to the bottom and click Custom provider.
- Fill in:
- Provider ID:
uberllm - Display name:
MartLLM - Provider API: OpenAI Compatible
- Base URL:
https://api.martllm.com/v1 - API key: your
ull_…key
- Provider ID:
- Press Fetch models. The list comes from MartLLM; keep the ones you want, for example
moonshotai/kimi-k3. - Click Submit, then choose the model in Kilo's model picker.
Steps (config file)
The same provider in ~/.config/kilo/kilo.jsonc (Windows: C:\Users\<you>\.config\kilo\kilo.jsonc; for one project, .kilo/kilo.jsonc in the project):
{
"provider": {
"uberllm": {
"npm": "@ai-sdk/openai-compatible",
"name": "MartLLM",
"env": ["UBERLLM_API_KEY"],
"options": { "baseURL": "https://api.martllm.com/v1" },
"models": {
"moonshotai/kimi-k3": {
"name": "moonshotai/kimi-k3",
"tool_call": true,
"limit": { "context": 200000, "output": 32000 }
}
}
}
},
"model": "uberllm/moonshotai/kimi-k3"
}
Then set UBERLLM_API_KEY=ull_your_key in your environment. The limit numbers are an example: copy the real context length from the model's page on martllm.com/models.
Two settings people miss
limit: without it Kilo treats the context as 0 and never compacts a long task, so it eventually fails. The editor dialog cannot set it; add it in the file ("edit advanced settings in the JSON config file").tool_call: true: Kilo's agent works through tools. If the model answers in plain text instead of editing files, this is missing.
Prefer the Anthropic format?
Kilo also offers Provider API → Anthropic Messages. With MartLLM, use https://api.martllm.com/v1 as the Base URL there as well (not the bare host), and the same key. Model fetching is not available in that mode, so type the ids yourself.
Troubleshooting
- "Authentication failed. Check the API key above and try again." when fetching: the key is missing or has a space.
- Model not in the picker: the model key must match
uberllm/<model id>. Runkilo modelsto see what Kilo loaded. - Agent never edits files: add
"tool_call": trueto the model. - Task fails after a long session: set
limit.context. - 402 insufficient credits: add credit on the credits page.
Keep reading
- Reference page: Kilo Code doc
- OpenCode setup (Kilo's config format comes from OpenCode)
- Cline setup