grith.aidocs

[llm]

LLM provider configuration — Ollama, OpenAI, Anthropic, OpenRouter.

Provider configuration for grith run / built-in REPL. If you only supervise external agents (Claude Code, Codex, Aider), they manage their own model connections — this section can stay at defaults.

[llm]

KeyTypeDefaultDescription
default_providerstring"ollama"

[llm.ollama]

KeyTypeDefaultDescription
base_urlstring"http://localhost:11434"
modelstring"llama3.1:8b"

[llm.openai]

KeyTypeDefaultDescription
modelstring"gpt-4o-mini"

[llm.anthropic]

KeyTypeDefaultDescription
modelstring"claude-sonnet-4-5-20250514"

[llm.openrouter]

KeyTypeDefaultDescription
modelstring"anthropic/claude-sonnet-4-5-20250514"

API keys

API keys can live in two places:

  1. Inline in the config file, e.g. api_key = "sk-...". Permissioned to 0600 on the user config file.
  2. Environment variable — provider-prefixed: OPENAI_API_KEY, ANTHROPIC_API_KEY, OPENROUTER_API_KEY. Env vars take precedence over inline values.

For Pro teams, an encrypted shared keystore is available; see Encrypted key management.

Switching providers per call

grith run --provider anthropic "explain mutexes"
grith run --provider ollama "explain mutexes"

--provider overrides default_provider for that invocation. The other provider configs stay in the config file but aren't touched.

See also

Last updated: 2026-05-14Edit this page on GitHub →
© 2026 grith. All rights reserved.