EKOSdocs
Docs / Configuration Build

LLM Providers

Configure Ollama, Anthropic or any OpenAI-compatible host; nothing in the deterministic core needs one.

An LLM is optional and is used only by opt-in or read-side features: ekos ask, SQL semantic naming, document semantics, architecture role classification, [llm-description], and (in the extension) binary reconstruction.

[llm]
provider = "ollama"                       # local, no key
model = "llama3:latest"
context-window = 8192                     # sent as num_ctx
[llm]
provider = "anthropic"
model = "…"
api-key-env = "ANTHROPIC_API_KEY"
[llm]
provider = "openai"                        # any OpenAI-compatible Chat Completions host
base-url = "https://opencode.ai/zen/v1"
model = "deepseek-v4-flash"
api-key-env = "OPENCODE_API_KEY"
Key Meaning
provider ollama, anthropic or openai
model model name
api-key-env name of the env var holding the key
base-url openai only
context-window ollama only
max-tokens ceiling for compiler-pass calls; leave unset to let each pass size its budget

The read side: [ai]

[ai] tunes ekos ask: model, max-matches, neighborhood-depth, max-tokens, max-context-chars, source-text-top-k, system-prompt (classic path), reason-system-prompt. Reasoning models spend tokens on hidden reasoning; raise max-tokens (8192 is a good start) if answers truncate.

Cost control

Responses are cached in .ekos/llm-cache/. Steps that make many calls ([llm-description], [document-semantics]) are off by default, show an estimate and ask before spending, and accept --yes for automation. ekos doctor shows the provider, endpoint and whether the key variable is set.