HeavenBase routes LLM calls through an OpenAI-compatible gateway. The default provider is OpenRouter, giving you access to most major models with a single API key. Model choices never appear in your code. You reference presets — normal chat presets choose the model and behavior, whileDocumentation Index
Fetch the complete documentation index at: https://ahvn.top/llms.txt
Use this file to discover all available pages before exploring further.
heavenbase.llm.default_provider chooses where that model is served. Explicit provider= arguments and provider pins on a preset still override the default provider.
1. Set an API Key
HeavenBase ships with built-in configs for these providers. Set the relevant environment variables or usehb cfg set:
default_provider can take effect:
hb cfg set heavenbase.llm.providers.<provider>.base_url for any OpenAI-compatible provider, and hb cfg set heavenbase.llm.providers.<provider>.api_key if the provider doesn’t use the standard environment variable. Local providers (ollama, lmstudio, and vllm) accept provider-specific model IDs too; the curated qwen3.6-flash entry maps to each local provider’s configured name.
Any LiteLLM-compatible provider can be added via config. See the LLM overview for the complete provider and model catalog.
2. CLI Chat
Send a message. By default this uses thechat preset with deepseek-v4-flash on your configured default_provider (openrouter out of the box):
--preset:
--preset/-p: use a named preset (system,chat,reason,coder,embed,local, …)--model/-m: override the model (ds-flash,sonnet,gpt, … support canonical model names or defined aliases)--provider/-b: override the provider (openrouter,openai,anthropic, …)--verbose/-v: show the resolved LLM spec including model, provider, gateway, args, etc.--input/-i: read the prompt from a file
The
chat preset is used by hb llm chat and hb llm session. The default hb.LLM() (no preset) uses system, a lightweight preset for short orchestration calls. The embed preset controls hb llm embed and uses text-embedding-3-small; set heavenbase.llm.presets.embed.provider when your default provider does not serve embeddings.3. CLI Embeddings
The embed preset defaults totext-embedding-3-small (1536 dimensions). It uses your default_provider unless you pin an embedding provider.
Configuring an embedding provider is similar to chat, just set the embed preset’s provider and model.
--json for full output including usage:
4. Interactive Session
Start a multi-turn session:chat preset. Type messages at the >>> prompt. Example:
/help, /save <path>, /load <path>, /clear, /regen <seed>, /back, /tools, /mcp, /exit.
Attach MCP tools to a session with repeated --mcp values. Each value can be a URL or a registered Toolkit ref:
/mcp to add more tools. For one-shot tool use, attach MCP directly to chat:
5. Python API
TheLLM class is the same engine the CLI uses. Construct one with no arguments for the system preset, or pass any overrides:
The
LLM constructor accepts preset, model, provider, gateway, and any extra kwargs (e.g., temperature, max_tokens, seed) which become provider request defaults. When only a normal chat preset is given, the model comes from heavenbase.llm.presets.<name>.model and the provider comes from heavenbase.llm.default_provider unless the preset explicitly pins one.
