Configuration precedence
When you use the Anthropic provider (the default), llmwiki resolves credentials in this order:- Shell environment variables or a
.envfile in your project directory - Claude Code settings fallback -
~/.claude/settings.json→envblock - Built-in provider defaults (where applicable)
llmwiki compile without exporting a single variable.
Providers
- Converse gateway
- Anthropic (Default)
- Claude Agent SDK
- OpenAI Codex CLI
- OpenAI-Compatible
- Ollama
- GitHub Copilot
- OrcaRouter
- Atlas Cloud
- Runcrate
Use These packages are loaded only when making a Converse request. Other providers
and CLI commands do not require them.Set all three model, endpoint, and credential values explicitly. The provider
appends
converse for a gateway exposing the Amazon Bedrock Converse and
ConverseStream protocols with bearer authentication. It supports text generation,
streaming, and required tool calls. The existing default provider is unchanged.Install the optional protocol packages alongside your llmwiki installation
(add -g if llmwiki is installed globally):/model/<encoded-model-id>/converse or /converse-stream to the endpoint.
The endpoint must be HTTP(S), without userinfo, query parameters, or a fragment.
Use HTTPS for remote services. This adapter does not discover AWS credentials,
sign requests with SigV4, select a default model, or switch to another provider.
Tool selection defaults to any. For models that reject forced tool selection,
set LLMWIKI_CONVERSE_TOOL_CHOICE=auto; extraction still fails unless the model
returns the requested tool and a valid structured result.Converse does not serve embeddings. To enable them, explicitly configure
LLMWIKI_EMBEDDING_PROVIDER and that backend’s model, endpoint, and credential.
For OpenAI-compatible embeddings, use OPENAI_EMBEDDINGS_BASE_URL and
OPENAI_EMBEDDINGS_API_KEY; the Converse token is never reused for that service.
Compile can run with embeddings disabled; semantic retrieval needs a separate
compatible embedding backend.LLMWIKI_REQUEST_TIMEOUT_MS bounds a request, including streaming, and defaults
to ten minutes. Incomplete or truncated output fails instead of becoming a page.
Errors retain HTTP status without copying remote error bodies into diagnostics.
The compiler’s existing retry and review behavior still applies. Model/provider
provenance is persisted normally; the gateway token is not written to the wiki.
Route availability and data retention remain properties of your selected service,
not guarantees provided by this adapter.Per-concept prompt budget
When many sources contribute to the same compiled concept, llmwiki enforces a character cap on the combined source content sent to the LLM so no single concept blows past the model’s context window. Each contributing source gets a fair share when truncation kicks in. SetLLMWIKI_PROMPT_BUDGET_CHARS to control the cap. The default is 200000 (~50k tokens), which fits modern context windows with headroom. Raise it for larger-context models; lower it for small-context local models.
Output language
Generated wiki content defaults to whatever language the model produces from the source material - typically English. You can override this two ways:LLMWIKI_OUTPUT_LANG- applies to every prompt the compile and query pipelines make. For example:zh-CN,Chinese,ja,Japanese.--lang <code>onllmwiki compileorllmwiki query- same effect, scoped to one invocation. Wins over the env var.
For a complete listing of every environment variable llmwiki reads, see the Environment Variables reference.