Claude access, Ollama, more models & context7
Claude access
.aiflow/config.json → claude.auth (both supported; OAuth wins if both are set):
apikey→ANTHROPIC_API_KEY(pay-per-use, console.anthropic.com).oauth→ runclaude setup-token→CLAUDE_CODE_OAUTH_TOKEN(uses your Claude plan).
Both live in .env (gitignored, never global).
Ollama (local, no API key)
Enable at aiflow init, or manage any time:
aiflow ollama add qwen3-coder # add a model to config + pull it
aiflow ollama pull # pull every model listed in config
aiflow ollama list # what's installed
qwen3-coder (newest Qwen) is the recommended default. Selected models are written into
.aiflow/router-config.json as a provider, so they’re actually used for easy/background work:
aiflow shell --router # routes cheap/background steps to local models
Adding more / cloud models
For DeepSeek, OpenRouter, Gemini, and other providers:
- Add the provider + key to
~/.claude-code-router/config.json(never committed). - Enable
routerin.aiflow/config.json. - Optional keys can also live in
.env(DEEPSEEK_API_KEY,OPENROUTER_API_KEY,GEMINI_API_KEY).
Route trivial/background steps to cheap models; keep top Claude models for hard reasoning. Measure
the effect with aiflow cost.
context7 — live library docs
context7 is an MCP server that fetches live, version-correct documentation for the libraries
you use, so the agent codes against the real current API instead of a stale memory. Enabled by
default (mcp.context7).
- In a session, just ask normally (“use the latest
zodschema API”) — the agent calls context7 to pull current docs. You can also nudge it: “check context7 for the current Prisma migrate API”. - Works keyless; a
CONTEXT7_API_KEYin.envraises rate limits. - Pair it with the code indexes: context7 = external library docs, graphify/cocoindex = your code. See Memory.