Aider
Saturn integrates with Aider, the AI pair programming tool. The saturn aider command browses _saturn._tcp.local., picks an instance by priority, and launches Aider with OPENAI_BASE_URL / OPENAI_API_KEY already populated — no API keys or configuration needed on the user's side.
What it does on the wire
$ dns-sd -B _saturn._tcp .local # browse
$ dns-sd -L "<instance>" _saturn._tcp local. # resolve
$ curl http://<host>:<port>/v1/models # enumerate models
# ↓ then exec aider with OPENAI_BASE_URL / OPENAI_API_KEY set
Everything below is the Python wrapper for those steps.
Prerequisites
Install both Saturn and Aider:
Ensure at least one Saturn service is running on your network:
Basic usage
This will:
- Discover all Saturn services on the network (8-second timeout)
- Select the best service based on priority, cost, and capabilities
- Pick the first available model from that service
- Launch Aider with
OPENAI_BASE_URLandOPENAI_API_KEYset automatically
Interactive selection
Use --select to manually choose a server and model:
This displays all discovered services with their deployment type, API type, models, context window, cost, and priority.
Model specification
Skip selection entirely by passing a model name:
Filtering
Filter which services are eligible:
# Require specific capabilities
saturn aider --saturn-needs code,chat
# Require minimum context window size
saturn aider --saturn-min-context 64000
# Disable preference for free services
saturn aider --no-saturn-prefer-free
Passing arguments to Aider
Arguments not recognized by Saturn are forwarded directly to Aider:
CLI flags
| Flag | Default | Description |
|---|---|---|
--select |
off | Interactively select server and model |
--saturn-model MODEL |
— | Use a specific model (skips selection) |
--saturn-needs CAPS |
— | Required capabilities, comma-separated (e.g., code,chat) |
--saturn-min-context N |
0 |
Minimum context window size |
--saturn-prefer-free / --no-saturn-prefer-free |
on | Prefer free services when ranking |
--saturn-verbose |
off | Show discovery details |
--timeout SECONDS |
8.0 |
Discovery timeout in seconds |
Under the hood
saturn aider calls discover() to find services, then select_best_service() to pick the best one. It fetches the model list from the selected service's /v1/models endpoint, then launches Aider as a subprocess with:
OPENAI_BASE_URLset to the service endpointOPENAI_API_KEYset to the service's ephemeral key (for cloud/beacon services) orsaturn(for local services)--model openai/<selected_model>passed to Aider
For cloud services (beacons), Saturn uses the service's api_base and ephemeral key. For local/network services, it uses the discovered endpoint directly.