Aider integration
Use Aider, the terminal pair programmer, with Modellane through its OpenAI-compatible settings and the openai/ model prefix.
Aider connects to any OpenAI-compatible API. Export the base URL and key, then start it with the model id behind the openai/ prefix.
Aider is a pair programmer for the terminal that edits the files in your git repository. It connects to OpenAI-compatible APIs and uses the Chat Completions API (POST /v1/chat/completions).
Configure Aider#
Export the base URL and key, then start Aider with the model id behind the openai/ prefix:
Shell
export OPENAI_API_BASE=https://usemodellane.com/v1
export OPENAI_API_KEY="your-api-key"
cd your-project
aider --model openai/lane-1The openai/ prefix tells Aider to send the request to the OpenAI-compatible base URL; it is not part of the model id that reaches Modellane. Use any id from Models & pricing.
Tell Aider about the model#
Aider does not know Modellane models, so it shows a warning about unknown context size and cost. To silence it and let Aider size the chat correctly, create .aider.model.metadata.json in your project or home directory:
JSON
{
"openai/lane-1": {
"max_input_tokens": 128000,
"max_output_tokens": 8192,
"mode": "chat"
}
}Replace the two numbers with the context length and output limit of your model from the models table. Aider does not enforce these limits; it uses them for its warnings and token reports.
Aider edits files with text edit formats instead of tool calls, so models without Tool calls work too.
Verify#
Ask a question without editing anything:
Shell
aider --model openai/lane-1 --message "Reply with the word ready."A reply means the base URL, key and model id are right. An authentication error points at the key, and model_not_found at the model id.