Skip to main content
Use RunInfra models in Aider through its native OpenAI-compatible settings. Support level: ready. Connect supports automatic setup.

Connect Aider

Have Aider installed, a workspace API key, and available RunInfra credits.
In an interactive terminal, Connect starts login if needed. Review and approve the proposed changes. Connect saves a snapshot, writes the settings and model metadata, and makes a real Chat Completions request that uses credits. To choose a model during setup:
See Connect for status, diagnostics, and key replacement.

What Connect writes

Both files live in your home directory. Connect does not move them to an application-data or XDG directory. The YAML sets model to openai/<slug> and openai-api-base to https://api.runinfra.ai/v1. The metadata contains catalog token limits under each openai/<slug> entry: max_input_tokens, max_output_tokens, and max_tokens. Here, max_tokens is the output limit. The catalog supplies token limits, not cost data. Existing cost fields are preserved but are not verified by this catalog. Unknown cost warnings may remain. Connect does not add tool or reasoning capability fields to the metadata.

Key placement

The default literal mode writes your key to openai-api-key in .aider.conf.yml. Helper mode removes an owned saved literal and requires Aider’s native environment variable:
Set RUNINFRA_API_KEY securely, then run the handoff in the environment that launches Aider:
For GUI apps and background services, set RUNINFRA_API_KEY securely in their launch environment and restart them with the native handoff above. On Windows, use the user environment and also set AIDER_OPENAI_API_KEY there before restarting the launcher. GUI and Start menu launches do not inherit a terminal-only assignment. Connect does not write YAML environment interpolation.

Verify

Aider 0.86.2 completed a verified round trip through RunInfra using the Connect-written .aider.conf.yml and .aider.model.metadata.json. This manual verification template is docs-only. Connect does not execute it:
Use an authorized isolated scratch environment. The prompt is not a tool permission boundary, and a reply alone does not prove the request destination. Confirm the selected provider and destination after restart.
Aider loads home, repository, current-directory, and selected dotenv files with override=True. Those files can replace the initial shell environment. The default git-root .env is loaded last after deduplication and can override a current-directory .env when you launch from a subdirectory. An explicitly selected dotenv file can change that ordering.Dotenv files and Aider set-env settings can introduce OPENAI_BASE_URL overrides. A plain OPENAI_API_KEY does not override a saved YAML openai-api-key.

Restart

Restart Aider in a new Aider process to load the selected model and credentials.

Troubleshooting

The planning check cannot prevent later project, command-line, dotenv, model extra_params, or set-env changes from redirecting Aider. Confirm the actual destination after restart.

Revert

With intact state and snapshots, off restores the original bytes from before the first on in the active connection. It removes managed files that did not exist then. Later on calls and key rotations keep that restore point. If either managed file changed after setup, Connect refuses to overwrite it. Back up and review the edits before choosing to discard them:
Connect saves the current contents in a recovery snapshot and prints its id before restoring the origin. Keep the snapshots. If the origin snapshot is missing, cleanup is not a promise of original-byte restoration; see Connect recovery. Restore any manual AIDER_OPENAI_API_KEY environment changes yourself. File restoration does not change project overrides or dotenv files outside the managed pair.

Connect

Set up, inspect, and restore your coding agent.

Chat completions

Read the request contract.

Models

Find model ids and context windows.