Skip to main content
llmwiki is provider-portable. Whether you have an Anthropic API key, a GitHub Copilot subscription, a locally-running Ollama server, or just a Claude Code login, you can point llmwiki at the right backend with a handful of environment variables - no config files required for most setups. Choose the provider that matches your existing credentials and infrastructure.

Configuration precedence

When you use the Anthropic provider (the default), llmwiki resolves credentials in this order:
  1. Shell environment variables or a .env file in your project directory
  2. Claude Code settings fallback - ~/.claude/settings.json → env block
  3. Built-in provider defaults (where applicable)
This means that if you already have Claude Code configured on your machine, you can run llmwiki compile without exporting a single variable.

Providers

Use 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):
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 /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. Set LLMWIKI_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.
A truncation warning prints to stderr when the cap fires, naming the concept that hit the budget.

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> on llmwiki compile or llmwiki 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.