Skip to main content
Andi AIRun supports multiple AI providers, allowing you to choose between local models (free, private) and cloud APIs (powerful, scalable).

Runtimes

AI Runner supports multiple runtimes. Provider availability depends on the runtime: See Runtimes for the full compatibility reference.

Quick Reference

Ollama, LM Studio, and Azure work with both runtimes. AWS, Vertex, Vercel, and Pro are Claude Code only. Codex custom providers use --profile. See Runtimes.

How Configuration Works

All provider credentials are stored in one file: ~/.ai-runner/secrets.sh

Initial Setup

This file is created automatically by ./setup.sh from the secrets.example.sh template:
Andi AIRun loads this file at startup. You don’t need to set environment variables in your shell profile or .bashrc — just add them to secrets.sh, and then switch providers freely with ai --aws, ai --vertex, etc.
You only need to configure the providers you want to use. Configure multiple providers to switch between them when you hit rate limits or want to use different models.

Session-Scoped Behavior

All provider configurations are session-scoped:
  • Changes only affect the active terminal session
  • On exit, original settings automatically restore
  • Plain claude always runs in native state
  • Running claude in another terminal is unaffected
This means you can safely run ai --lmstudio in one terminal while using claude normally in another.

Provider Detection and Defaults

Automatic Provider Selection

AI Runner first detects which runtime to use (Claude Code or Codex CLI), then selects the appropriate provider. If you don’t specify a provider flag, Andi AIRun automatically detects and uses:
  1. Claude Pro (if logged in with claude login)
  2. First configured provider in secrets.sh

Setting a Default Provider

You can set a default provider to avoid typing the flag every time:
Clear the default:

Model Tier System

Andi AIRun uses a tiered model system to balance performance and cost:

Tier Levels

Claude Fable 5 is Anthropic’s most capable model, a tier above Opus. It’s opt-in (Opus stays the default) and available on Anthropic providers only — on Ollama, LM Studio, and Codex, --fable/--best falls back to that runtime’s highest tier with a notice.

Usage Examples

Background Model

Andi AIRun uses a “small/fast” model for background operations (like file searches, quick checks). By default, this is set to the Low tier model (Haiku). For local providers (Ollama, LM Studio), the background model defaults to the same model as the main tier to avoid costly model swapping.

Configuring Model Tiers

You can customize model tiers per provider in secrets.sh:

Cloud Providers

Local Providers

Custom Models

Override the tier system with a specific model:

Agent Teams

All providers support agent teams (ai --team). Coordination uses Claude Code’s internal task list and mailbox, not provider-specific features.

Learn More

Read the Claude Code Agent Teams documentation

Next Steps

Local Providers

Set up Ollama or LM Studio for free, private AI

Cloud Providers

Configure AWS, Google, Anthropic, Azure, or Vercel

Switching Providers

Learn to switch providers to avoid rate limits