emergence-mini-dilles/.env.example
Jeuners e0d72021e4 Per-agent provider routing + 2-OR / 2-Ollama model mix
Routing fix:
- New provider_for_model(name): a model name containing '/' is
  treated as an OpenRouter slug, bare names (llama3.2:3b) as Ollama.
  Previously the global PROVIDER variable routed all calls, so a
  per-agent override 'llama3.2:3b' would have hit OpenRouter and 404'd.
- decide_tool now uses provider_for_model() so per-agent models
  route correctly regardless of global PROVIDER setting.
- New provider_for_agent() helper for callers that need the
  provider of a specific agent.

Live mix: Anchor + Flora on OpenRouter (claude-haiku, gpt-4o-mini);
Lovely + Spark on Ollama (llama3.2:3b, free local).

.env:
- Provider set to 'auto' (uses OpenRouter when key is set)
- Per-agent assignments documented in .env.example
- Cost estimate updated: 2 OR + 2 Ollama = ~$0.10-0.30/day for OR
  portion, $0 for Ollama portion

Tests: 100 passing (was 99). New test_provider_for_model() covers
the routing heuristic. Existing tests updated to pass model=...
explicitly so they don't depend on env-loaded .env overrides.
2026-06-15 02:53:42 +02:00

38 lines
1.2 KiB
Text

# Emergence-Mini environment configuration
# COPY this file to .env and fill in your own values.
# .env is git-ignored; do not commit secrets.
# === LLM PROVIDER ===
# "auto" picks OpenRouter if key is set, else Ollama.
# "ollama" forces local-only. "openrouter" requires the key below.
EMERGENCE_LLM_PROVIDER=auto
# === OPENROUTER (only if EMERGENCE_LLM_PROVIDER=openrouter) ===
# Get a key at https://openrouter.ai/keys
# Free models exist but tool-use support is limited; see README.
OPENROUTER_API_KEY=
# Default OpenRouter model
EMERGENCE_OPENROUTER_MODEL=anthropic/claude-3.5-haiku
# === OLLAMA (default, free, local) ===
# Get Ollama at https://ollama.com. Pull once:
# ollama pull llama3.2:3b
EMERGENCE_OLLAMA_URL=http://127.0.0.1:11434
EMERGENCE_OLLAMA_MODEL=llama3.2:3b
# === PER-AGENT MODEL ASSIGNMENT ===
# Example: 2 cheap cloud models + 2 free local models.
# Uncomment and edit to assign models per agent.
# Cloud (cheap, good tool-use):
# EMERGENCE_AGENT_ANCHOR_MODEL=anthropic/claude-3.5-haiku
# EMERGENCE_AGENT_FLORA_MODEL=openai/gpt-4o-mini
# Local (free, requires Ollama running):
# EMERGENCE_AGENT_LOVELY_MODEL=llama3.2:3b
# EMERGENCE_AGENT_SPARK_MODEL=llama3.2:3b
# === BEHAVIOUR ===
EMERGENCE_LLM_ENABLED=1
EMERGENCE_LLM_TIMEOUT=30