# brain0 local config — copy to `.env` (gitignored) and fill in. # Loaded automatically by `pnpm dev` and `pnpm --filter @brain0/server start` # (via Node's --env-file-if-exists; requires Node >= 20.12). You can also just # `export` these in your shell instead of using a file. # ── LLM for the dashboard smart chat (debug/audit) ─────────────────────────── # Default with NO keys = local Ollama (zero egress). A present API key opts into # that remote provider (context is redacted before egress + shown in the UI). ANTHROPIC_API_KEY= # OPENAI_API_KEY= # Force a provider regardless of keys: ollama | anthropic | openai | orcarouter | cheaperinference | # echo(tests). # BRAIN0_LLM_PROVIDER=anthropic # OrcaRouter Cyber Inference (named provider for security teams doing authorized, scoped work): # provider id `orcarouter`, inference/catalog at https://api.orcarouter.ai/v1, default model # `orcarouter/auto`. A key alone does NOT select it — pin the provider. # BRAIN0_LLM_PROVIDER=orcarouter # ORCAROUTER_API_KEY= # BRAIN0_ORCAROUTER_ENDPOINT= # Cheaper Inference (OpenAI-compatible gateway): provider id `cheaperinference`, inference at # https://api.cheaperinference.com/v1, default model `gpt-5.4-mini`. A key alone does NOT select # it — pin the provider. # BRAIN0_LLM_PROVIDER=cheaperinference # CHEAPER_INFERENCE_API_KEY= # Override model / endpoint (defaults: anthropic=claude-sonnet-4-6, openai=gpt-4o-mini, # ollama=qwen3:4b @ http://localhost:11434/v1). # BRAIN0_LLM_MODEL= # BRAIN0_LLM_ENDPOINT= # ── Embeddings (SECOND egress channel) ─────────────────────────────────────── # Default = LOCAL even if OPENAI_API_KEY is set (the query is not sent anywhere). # Opt into remote OpenAI embeddings explicitly (the query is redacted first): # BRAIN0_EMBED_PROVIDER=openai # BRAIN0_EMBED_MODEL=text-embedding-3-small # ── Co-change risk graph tuning (optional) ─────────────────────────────────── # BRAIN0_COCHANGE_MIN_SUPPORT=2 # BRAIN0_COCHANGE_MAX_COMMIT_FILES=50 # ── Privacy (optional) ─────────────────────────────────────────────────────── # BRAIN0_EXCLUDE=**/dist-test/**,**/*.secret # BRAIN0_REDACT=my-internal-token-[0-9]+