> ## Documentation Index
> Fetch the complete documentation index at: https://docs.infercom.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Aider Integration Guide

> Set up Aider with Infercom's EU sovereign inference in 2 minutes. Terminal-based AI coding with git integration and MiniMax-M2.7 for fast, sovereign AI.

[Aider](https://aider.chat) is a terminal-based AI coding assistant that works directly with your git repository. It can make changes across multiple files, understand your codebase context, and commit changes automatically.

<Info>
  **Verified working** with MiniMax-M2.7 on Infercom.
</Info>

## Prerequisites

* Python 3.8 or later
* pip3 installed
* [Infercom API key](https://cloud.infercom.ai/apis)

## Installation

```bash theme={null}
pip3 install aider-chat
```

Verify installation:

```bash theme={null}
aider --version
```

## Configuration

### Option 1: Environment Variables (Recommended)

Set these environment variables:

```bash theme={null}
export OPENAI_API_BASE="https://api.infercom.ai/v1"
export OPENAI_API_KEY="your-infercom-api-key"
```

Then run Aider:

```bash theme={null}
aider --model openai/MiniMax-M2.7
```

<Tip>
  Add the export commands to your shell profile (`~/.bashrc`, `~/.zshrc`) for persistence.
</Tip>

### Option 2: Config File

Create `~/.aider.conf.yml`:

```yaml theme={null}
openai-api-base: https://api.infercom.ai/v1
openai-api-key: your-infercom-api-key
model: openai/MiniMax-M2.7
```

Then simply run:

```bash theme={null}
aider
```

### Option 3: Command Line

Pass everything on the command line:

```bash theme={null}
OPENAI_API_BASE="https://api.infercom.ai/v1" \
OPENAI_API_KEY="your-infercom-api-key" \
aider --model openai/MiniMax-M2.7
```

## Model

Use MiniMax-M2.7 with the `openai/` prefix:

```
openai/MiniMax-M2.7
```

<Warning>
  The `openai/` prefix is required. Using just `MiniMax-M2.7` will not work.
</Warning>

## Example Usage

### Interactive Mode

```bash theme={null}
cd your-project
aider --model openai/MiniMax-M2.7
```

Then chat with Aider:

```
> Add error handling to the main function in app.py
```

### Non-Interactive Mode

```bash theme={null}
aider --model openai/MiniMax-M2.7 \
  --message "Add a hello world function" \
  --yes \
  main.py
```

### Disable Auto-Commits

```bash theme={null}
aider --model openai/MiniMax-M2.7 --no-auto-commits
```

## Reasoning Output

MiniMax-M2.7 has built-in reasoning capabilities. To see the model's thinking process, disable streaming:

```bash theme={null}
aider --model openai/MiniMax-M2.7 --no-stream
```

You'll see a **THINKING** section before each response showing the model's reasoning.

### Controlling Reasoning Effort

You can adjust reasoning intensity with `--reasoning-effort`:

```bash theme={null}
aider --model openai/MiniMax-M2.7 \
  --no-stream \
  --reasoning-effort medium \
  --no-check-model-accepts-settings
```

Valid values: `low`, `medium`, `high`

<Tip>
  `--no-stream` is required to display reasoning output. The `--no-check-model-accepts-settings` flag is needed because Aider doesn't recognize MiniMax-M2.7's reasoning support by default.
</Tip>

## Troubleshooting

### Unknown Model Warning

You may see this warning:

```
Warning for openai/MiniMax-M2.7: Unknown context window size and costs,
using sane defaults.
```

**Fix:** Create `~/.aider.model.metadata.json` with MiniMax-M2.7 specs:

```json theme={null}
{
  "openai/MiniMax-M2.7": {
    "max_tokens": 16384,
    "max_input_tokens": 192000,
    "max_output_tokens": 16384,
    "input_cost_per_token": 0.0000003,
    "output_cost_per_token": 0.0000012,
    "litellm_provider": "openai",
    "mode": "chat",
    "accepts_settings": ["reasoning_effort"]
  }
}
```

This enables proper context window handling and cost tracking.

**Alternative:** Suppress the warning with `--no-show-model-warnings`:

```bash theme={null}
aider --model openai/MiniMax-M2.7 --no-show-model-warnings
```

### Connection Errors

Verify your configuration:

```bash theme={null}
curl -s https://api.infercom.ai/v1/models \
  -H "Authorization: Bearer $OPENAI_API_KEY" | head -20
```

You should see a list of available models.

### Model Not Found

Ensure you're using the correct model name with the `openai/` prefix:

```bash theme={null}
# Correct
aider --model openai/MiniMax-M2.7

# Wrong
aider --model MiniMax-M2.7
```

## Performance

* **Token throughput:** 400+ tokens/sec with MiniMax-M2.7
* **Context window:** 192K tokens - handles large codebases

## Next Steps

* [OpenCode](/en/agentic-coding/opencode) - Full TUI experience
* [Choosing a Tool](/en/agentic-coding/choosing-a-tool) - Compare options
* [API Reference](/en/api-reference/overview) - Direct API usage
