Using Aider with Our Lab's AI Server

1. Install Aider

pip install aider-chat

Or with pipx (recommended to avoid dependency conflicts):

pipx install aider-chat

2. Set Environment Variables

Add these to your shell profile (~/.bashrc, ~/.zshrc, or ~/.config/fish/config.fish):

export OPENAI_API_KEY=YOUR_API_KEY
export OPENAI_API_BASE=https://chat.catholic-u.ai/api/v1

Reload your shell:

source ~/.bashrc   # or source ~/.zshrc

3. Usage

Run with a specific model

aider --model openai/RedHatAI/Qwen3-Coder-Next-NVFP4
aider --model openai/Sehyo/Qwen3.5-35B-A3B-NVFP4

The openai/ prefix tells aider to use the OpenAI-compatible API format.

Add files to the session

aider --model openai/RedHatAI/Qwen3-Coder-Next-NVFP4 file1.py file2.py

Or add files during the session:

/add file1.py

4. Available Models

Aider Command Description
openai/RedHatAI/Qwen3-Coder-Next-NVFP4 Qwen3 Coder Next - optimized for coding tasks
openai/Sehyo/Qwen3.5-35B-A3B-NVFP4 Qwen3.5 35B - general purpose

5. Useful Aider Commands

Command Description
/add <file> Add a file to the chat context
/drop <file> Remove a file from the chat context
/ls List files in the chat context
/diff Show the last diff
/undo Undo the last change
/run <command> Run a shell command
/help Show all available commands
/quit Exit aider

6. Tips

  • Work inside a git repo: Aider works best inside a git repository. It will automatically commit changes it makes.
  • Be specific: Tell aider exactly which files to edit and what changes to make.
  • Review changes: Use /diff to review what aider changed before moving on.
  • Undo mistakes: Use /undo to revert the last change aider made.

7. Using Aider in VS Code

You can run aider directly in the VS Code integrated terminal:

  1. Open VS Code in your project folder
  2. Open the terminal (Ctrl+`)
  3. Run aider --model openai/RedHatAI/Qwen3-Coder-Next-NVFP4

8. Troubleshooting

  • "Could not connect" error: Make sure your environment variables are set: echo $OPENAI_API_KEY
  • "Model not found" error: Verify the model name is correct and includes the openai/ prefix.
  • Slow responses: The server is shared — response times may vary depending on load.
  • Permission errors on install: Use pip install --user aider-chat or use pipx.