🔧 How to Route AI API Calls Through a Local Model

Redirect cloud AI API traffic (OpenAI, Anthropic, Gemini) to a local Ollama instance or another backend, transparently to the application.

Prerequisites

1. Open the Routing Panel

Press R to open the Inference Routing panel.

2. Select a Preset Route

cella comes with built-in presets:

SourceBackendDescription
api.openai.comlocalhost:11434OpenAI → local Ollama
api.anthropic.comlocalhost:11434Anthropic → local Ollama
api.business.githubcopilot.comlocalhost:11434Copilot → local Ollama
generativelanguage.googleapis.comlocalhost:11434Gemini → local Ollama

3. Enable a Route

Navigate to the desired route and press Enter to toggle it on. The route takes effect immediately.

4. How It Works

When the MITM proxy intercepts a request for a routed domain, it rewrites the upstream destination to the configured backend. The application sees a normal HTTPS response — no code changes needed.

💡 All presets route to local Ollama by default. Ollama's OpenAI-compatible endpoint (/v1) handles requests from OpenAI, Copilot, and Gemini clients natively. The Anthropic route needs an API format adapter since Anthropic uses a different request schema.