Aider's Unknown context window size warning: what it means

Coding with AIAider·· 11 views· 3 min read

When you open Aider with an All in One AI model, you see a line like this:

Model openai/moonshotai/kimi-k2.7-code: Unknown context window size and costs, using sane defaults.

It is not an error. Aider has its own list of known models, and the ones in our catalogue are not on it. The request still goes to the API as usual.

What Aider does without that data

According to the Aider documentation, without data on the model it assumes an unlimited context window and that the model is free. The same page says this is usually not a significant problem. In practice, there are two effects:

1 Aider does not know when the chat gets too big for the model. It never enforces token limits: it only shows the error the API returns.
2 The cost Aider works out stays at 0. The real spending shows in All in One AI, as the article about the cost of 0 explains.

How to remove the warning

Give Aider the model data in the .aider.model.metadata.json file, in your home folder. That is what the Aider documentation points to. The article about the file explains each field and this other one says where Aider looks for it.

If you only want to hide the warnings, without giving Aider any data, use the --no-show-model-warnings option or the line show-model-warnings: false in .aider.conf.yml.

Another warning: "Did you mean"

When it does not recognise a name, Aider may suggest models with similar names, to catch typos. With our models, do not switch to the suggested name. Use the catalogue id, as it is in the Models tab or in GET /v1/models, with openai/ in front.

The warning also shows with a sandbox_ key. It comes from Aider and says nothing about the key or the address. To check those, see checking Aider with a sandbox_ key.

Want to use our models in Aider without warnings? Visit the Coding with AI page.

See Coding with AI

SEE ALSO

The .aider.model.metadata.json file: the context and output of each model

Where Aider looks for .aider.model.metadata.json: home folder, repository and start folder

Why Aider shows a cost of 0, and where to see what you really spent

Aider with All in One AI: the two variables, the openai/ prefix and the context window

Coding with AI in All in One AI

RECOMMENDED PRODUCT

Web hosting with cPanel

Domain and SSL included, daily backups and the panel you already know. from $6.60/mo (3-year plan, with coupon)

See plans
Was this answer helpful? Your answer helps us improve this article.