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

All in One AI·· 8 views· 17 min read

Aider is a terminal coding assistant that works inside your Git repository. It accepts any OpenAI-compatible API, so it can use All in One AI models with the Interweb key. You only need two variables and the model name with the openai/ prefix.

Before you start

1 Create a key in the API Center with the ai:read and ai:write permissions. Use a sandbox_ key to check the setup without spending and a prod_ key to work. The fields are explained in creating an API key.
2 Have AI credits or an active Coding Plan in All in One AI.
3 Install Aider, as the official documentation says: python -m pip install aider-install and then aider-install.

1. The two variables

Aider reads the address from OPENAI_API_BASE and the key from OPENAI_API_KEY. On Windows, in Command Prompt or PowerShell:

setx OPENAI_API_BASE https://api.interweb.ao/v1
setx OPENAI_API_KEY "prod_..."

Close the terminal and open a new one, which will read the variables. On Linux and macOS:

export OPENAI_API_BASE=https://api.interweb.ao/v1
export OPENAI_API_KEY="prod_..."

To have them in every new terminal, add both lines to ~/.bashrc or ~/.zshrc. Note: these are OpenAI's names. Any other program on the computer that reads them will also use our API.

2. Open Aider with the model

cd my-project
aider --model openai/moonshotai/kimi-k2.7-code

openai/ tells Aider to use the OpenAI-compatible format. The rest is the catalogue id, with its own slash. Say "hello". With a sandbox_ key, the answer is always "Resposta de teste (sandbox).".

3. The "Unknown context window size" warning

Aider has no data on our models, so it warns that it does not know their context or cost. Its documentation says that in most cases you can ignore the warning. To give it the context, create the file .aider.model.metadata.json in your home folder. On Linux and macOS:

nano ~/.aider.model.metadata.json

In Windows PowerShell:

notepad "$HOME\.aider.model.metadata.json"

Notepad asks whether to create the file: answer yes. That way the name is exact. If you use Save as, choose All files (*.*) as the type: otherwise Windows adds .txt and the file becomes .aider.model.metadata.json.txt, which the tool does not read. Windows hides that ending. To check, type dir in the same folder: the name must end in .json.

Paste this and save:

{
"openai/anthropic/claude-fable-5": { "max_tokens": 16000, "max_input_tokens": 1000000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/anthropic/claude-fable-5.1": { "max_tokens": 16000, "max_input_tokens": 1000000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/openai/gpt-6-astra-codex": { "max_tokens": 16000, "max_input_tokens": 1050000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/anthropic/claude-fable-5.2-ccmax": { "max_tokens": 16000, "max_input_tokens": 1000000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/openai/gpt-6.2-astra": { "max_tokens": 16000, "max_input_tokens": 1050000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/openai/gpt-6.2-astra-codex": { "max_tokens": 16000, "max_input_tokens": 1050000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/openai/gpt-5.5": { "max_tokens": 16000, "max_input_tokens": 1050000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/anthropic/claude-opus-4.5-20251101-coding": { "max_tokens": 16000, "max_input_tokens": 200000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/anthropic/claude-opus-4.6": { "max_tokens": 16000, "max_input_tokens": 1000000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/anthropic/claude-opus-4.7": { "max_tokens": 16000, "max_input_tokens": 1000000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/anthropic/claude-opus-4.8": { "max_tokens": 16000, "max_input_tokens": 1000000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/anthropic/claude-opus-5": { "max_tokens": 16000, "max_input_tokens": 1000000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/anthropic/claude-opus-5.5": { "max_tokens": 16000, "max_input_tokens": 1000000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/moonshotai/kimi-k3.1-pro-highspeed": { "max_tokens": 16000, "max_input_tokens": 1048576, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/openai/gpt-5.6-sol-codex": { "max_tokens": 16000, "max_input_tokens": 1050000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/anthropic/claude-sonnet-4.6": { "max_tokens": 16000, "max_input_tokens": 200000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/moonshotai/kimi-k3": { "max_tokens": 16000, "max_input_tokens": 1048576, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/google/gemini-3.1-pro-preview": { "max_tokens": 16000, "max_input_tokens": 1000000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/anthropic/claude-sonnet-5": { "max_tokens": 16000, "max_input_tokens": 1000000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/anthropic/claude-sonnet-5.5-aws": { "max_tokens": 16000, "max_input_tokens": 1000000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/moonshotai/kimi-k3.1-pro": { "max_tokens": 16000, "max_input_tokens": 1048576, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/openai/gpt-6-sol-codex": { "max_tokens": 16000, "max_input_tokens": 1050000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/openai/gpt-6.1-sol-codex": { "max_tokens": 16000, "max_input_tokens": 1050000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/openai/gpt-6.2-sol-codex": { "max_tokens": 16000, "max_input_tokens": 1050000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/google/gemini-2.5-pro": { "max_tokens": 16000, "max_input_tokens": 1000000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/google/gemini-3.5-flash": { "max_tokens": 16000, "max_input_tokens": 1048576, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/qwen/qwen3.7-max": { "max_tokens": 16000, "max_input_tokens": 1000000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/google/gemini-4-argon": { "max_tokens": 16000, "max_input_tokens": 1048576, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/google/gemini-3.6-flash": { "max_tokens": 16000, "max_input_tokens": 1048576, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/xai/grok-4.5": { "max_tokens": 16000, "max_input_tokens": 500000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/xai/grok-4.6": { "max_tokens": 16000, "max_input_tokens": 500000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/xai/grok-4.7": { "max_tokens": 16000, "max_input_tokens": 500000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/google/gemini-4-carbon-developer": { "max_tokens": 16000, "max_input_tokens": 1048576, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/anthropic/claude-haiku-4.5-20251001": { "max_tokens": 16000, "max_input_tokens": 200000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/openai/gpt-6.1-terra-codex": { "max_tokens": 16000, "max_input_tokens": 1050000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/zai-org/glm-5.3": { "max_tokens": 16000, "max_input_tokens": 1048576, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/qwen/qwen3.8-max": { "max_tokens": 16000, "max_input_tokens": 1000000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/bytedance/doubao-seed-2.1-pro-260628": { "max_tokens": 16000, "max_input_tokens": 262144, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/zai-org/glm-5.1": { "max_tokens": 16000, "max_input_tokens": 202752, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/deepseek-ai/deepseek-v4-pro": { "max_tokens": 16000, "max_input_tokens": 1048576, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/moonshotai/kimi-k2.6": { "max_tokens": 16000, "max_input_tokens": 262144, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/moonshotai/kimi-k2.7-code": { "max_tokens": 16000, "max_input_tokens": 262144, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/google/gemini-3.7-flash": { "max_tokens": 16000, "max_input_tokens": 1048576, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/google/gemini-3.8-flash": { "max_tokens": 16000, "max_input_tokens": 1048576, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/zai-org/glm-5": { "max_tokens": 16000, "max_input_tokens": 202752, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/qwen/qwen3.5-397b-a17b": { "max_tokens": 16000, "max_input_tokens": 262144, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/zai-org/glm-5.2": { "max_tokens": 16000, "max_input_tokens": 1048576, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/xai/grok-4.3": { "max_tokens": 16000, "max_input_tokens": 1000000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/bytedance/doubao-seed-2.0-pro-260215": { "max_tokens": 16000, "max_input_tokens": 262144, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/google/gemini-3-flash-preview": { "max_tokens": 16000, "max_input_tokens": 200000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/qwen/qwen3.8-27b": { "max_tokens": 16000, "max_input_tokens": 1048576, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/tencent/hy4-preview": { "max_tokens": 16000, "max_input_tokens": 1048576, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/moonshotai/kimi-k2.5": { "max_tokens": 16000, "max_input_tokens": 262144, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/google/gemini-2.5-flash": { "max_tokens": 16000, "max_input_tokens": 1048576, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/google/gemini-3.5-flash-lite": { "max_tokens": 16000, "max_input_tokens": 1048576, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/qwen/qwen3.5-plus": { "max_tokens": 16000, "max_input_tokens": 1000000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/bytedance/doubao-seed-2.1-turbo-260628": { "max_tokens": 16000, "max_input_tokens": 262144, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/qwen/qwen3.5-122b-a10b": { "max_tokens": 16000, "max_input_tokens": 262144, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/qwen/qwen3.5-27b": { "max_tokens": 16000, "max_input_tokens": 262144, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/qwen/qwen3.6-plus": { "max_tokens": 16000, "max_input_tokens": 1000000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/bytedance/doubao-seed-2.0-lite-260428": { "max_tokens": 16000, "max_input_tokens": 262144, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/qwen/qwen3.7-plus": { "max_tokens": 16000, "max_input_tokens": 1000000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/google/gemini-3.1-flash-lite": { "max_tokens": 16000, "max_input_tokens": 1048576, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/deepseek-ai/deepseek-v4.1-flash": { "max_tokens": 16000, "max_input_tokens": 1048576, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/meituan-longcat/longcat-2.0": { "max_tokens": 16000, "max_input_tokens": 1048756, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/xiaomi/mimo-v2.5-pro": { "max_tokens": 16000, "max_input_tokens": 1024000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/qwen/qwen3.6-35b-a3b": { "max_tokens": 16000, "max_input_tokens": 262144, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/bytedance/doubao-seed-character-260628": { "max_tokens": 16000, "max_input_tokens": 131072, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/tencent/hy3": { "max_tokens": 16000, "max_input_tokens": 262144, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/zai-org/glm-5.3-flash": { "max_tokens": 16000, "max_input_tokens": 1048576, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/deepseek-ai/DeepSeek-V3.2-Exp": { "max_tokens": 16000, "max_input_tokens": 163840, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/deepseek-ai/deepseek-v3.2": { "max_tokens": 16000, "max_input_tokens": 163840, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/anthropic/claude-haiku-5.5-ccmax": { "max_tokens": 16000, "max_input_tokens": 1000000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/openai/gpt-6-luna-codex": { "max_tokens": 16000, "max_input_tokens": 1050000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/bytedance/doubao-seed-2.0-mini-260428": { "max_tokens": 16000, "max_input_tokens": 262144, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/google/gemini-2.5-flash-lite": { "max_tokens": 16000, "max_input_tokens": 1048576, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/qwen/qwen3.5-flash": { "max_tokens": 16000, "max_input_tokens": 1000000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/deepseek-ai/deepseek-v4-flash": { "max_tokens": 16000, "max_input_tokens": 1048576, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" },
"openai/dots-studio/dots-3-note-prev-free": { "max_tokens": 16000, "max_input_tokens": 512000, "max_output_tokens": 16000, "input_cost_per_token": 0, "output_cost_per_token": 0, "litellm_provider": "openai", "mode": "chat" }
}

The block key is the full name you pass in --model. The costs are 0 because Aider does not know our credits: the real spending shows in the History tab of All in One AI. We reserve credits for the maximum output the tool asks for in each answer. That is why the examples ask for 16,000 tokens: it is enough for coding and needs a smaller balance than a higher value. Aider also reads this file at the root of the repository and in the folder where you start it.

So you do not have to type the model every time

Create .aider.conf.yml in your home folder, with this line:

model: openai/moonshotai/kimi-k2.7-code

Then just type aider. For another model, change the id. Use one that supports tools:

Model Context What for
moonshotai/kimi-k2.7-code 262,144 tokens Built for coding: the starting point for everyday work.
deepseek-ai/deepseek-v4-pro 1,048,576 tokens Strong reasoning, for big changes and hard bugs.
zai-org/glm-5.2 1,048,576 tokens Made for agents: handles tools well in long tasks.
deepseek-ai/deepseek-v4-flash 1,048,576 tokens Fast and cheap, for background tasks and short questions.

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.ao/v1/models?type=text" -H "Authorization: Bearer $INTERWEB_API_KEY"

In Windows PowerShell:

curl.exe "https://api.interweb.ao/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.

If you get an error, see errors when setting up a tool with All in One AI.

Want our models in Aider? Visit the Coding with AI page.

See Coding with AI

SEE ALSO

Errors when setting up a tool with All in One AI: 401, model not found, no credits, /v1 and rejected config files

Which coding tool to use with All in One AI: OpenCode, Claude Code, Codex, Cursor, Cline, Kilo Code or Aider

OpenCode with All in One AI: creating opencode.json from scratch, the key and the models

Coding Plan: which plan to choose, what it costs and how to subscribe

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.59/mo (3-year plan, with coupon)

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