
Each model in kilo.jsonc can have a limit with the context and the output. For your own providers, the Kilo Code documentation says to always set both. Without them, Kilo Code does not summarise the conversation and asks for long answers.
The two fields
"moonshotai/kimi-k2.7-code": { "name": "Kimi K2.7 Code", "tool_call": true, "limit": { "context": 262144, "output": 16000 } }
| Field | What it is | What to put |
| limit.context | The model's total context. Kilo Code uses it to know when to summarise the conversation. | The model's context_length, in GET /v1/models. |
| limit.output | The most tokens per answer. Kilo Code sends it to the API as max_tokens. | 16000, without going over the model's max_output_tokens. |
There is also limit.input, optional: a lower ceiling for the input. If you set it, Kilo Code summarises the conversation against it instead of context.
Without limit
Kilo Code looks first in your file and then in its own model catalogue. For a model that is not in that catalogue, the values are 0:
| Missing value | What happens |
| context at 0 | Kilo Code does not summarise the conversation. It grows until the API rejects the request. |
| output at 0 | Kilo Code uses its own default, 32,000 tokens. |
Why the output matters for your credits
Before each answer, we reserve credits for the input and for the max_tokens that Kilo Code sends. With 32,000, the output part of the reservation is twice that of 16,000, and with a low balance the API answers 402 insufficient_credits. At the end you only pay for the real tokens, and the rest of the reservation goes back to your balance.
The values for the recommended models
| Model | limit.context | limit.output |
| moonshotai/kimi-k2.7-code | 262144 | 16000 |
| deepseek-ai/deepseek-v4-pro | 1048576 | 16000 |
| zai-org/glm-5.2 | 1048576 | 16000 |
| deepseek-ai/deepseek-v4-flash | 1048576 | 16000 |
The ids are in the Models tab of All in One AI or in the API list. On Linux and macOS:
curl "https://api.interweb.co.mz/v1/models?type=text" -H "Authorization: Bearer $INTERWEB_API_KEY"
In Windows PowerShell:
curl.exe "https://api.interweb.co.mz/v1/models?type=text" -H "Authorization: Bearer $env:INTERWEB_API_KEY"
Each model comes with its id (always with the slash), its context_length and its price in pricing. Listing the models spends no credits.
In the VS Code extension too
The Custom provider window has no fields for the limits. According to the Kilo Code documentation, the token limits, tools and variants of your own provider are set in kilo.jsonc. The full file is in the article on the global kilo.jsonc.
|
Want Kilo Code to spend only what it needs? Visit the Coding with AI page. See Coding with AI |
RECOMMENDED PRODUCT Web hosting with cPanel Domain and SSL included, daily backups and the panel you already know. from 321,75 MT/mo (3-year plan, with coupon) See plans |











