Documentation Index
Fetch the complete documentation index at: https://ahvn.top/llms.txt
Use this file to discover all available pages before exploring further.
Provider chooses where a model is served. Gateway chooses how HeavenBase sends the request.
1. Default route
For new projects, set one OpenRouter key and use presets:preset="chat" resolves to deepseek-v4-flash by default. The bundled default provider is openrouter, and the default gateway is openai, which means HeavenBase uses the OpenAI Python SDK against the provider’s OpenAI-compatible endpoint.
2. Provider examples
Usedefault_provider when most calls should use one provider:
3. Gateway examples
Usegateway="portkey" when you want routing policy, observability, or gateway-side controls:
| Gateway | Use when |
|---|---|
openai | You want direct OpenAI-compatible SDK calls. This is the default. |
anthropic | You want the official Anthropic SDK and native Messages payloads. |
portkey | You want routing, policy, observability, or hosted gateway behavior. |
litellm | You already standardize provider routing through LiteLLM model names. |
bifrost | You run a Bifrost-compatible OpenAI endpoint. |
mock | You need offline deterministic tests. |
4. Anthropic gateway decision
HeavenBase supports two Anthropic routes. Use the OpenAI SDK compatibility endpoint for quick Claude checks and comparisons with other OpenAI-compatible providers:preset -> model -> provider -> gateway, and the final URL comes from provider config, gateway config, or a runtime base_url=... override. The native gateway converts HeavenBase’s internal OpenAI-style message/tool history into Anthropic Messages payloads, maps canonical think and reasoning_effort controls to Anthropic thinking fields, then normalizes the response back to the usual include fields.
Current proxy support fits that model:
- Portkey supports OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages gateway formats, and its Anthropic integration supports native
/messages, the Anthropic SDK, prompt caching, extended thinking, files, and web search. - LiteLLM supports Anthropic through the
anthropic/provider route, chat-completions style calls, and/v1/messagespassthrough. - Bifrost supports Anthropic through OpenAI-compatible chat/responses conversion to
/v1/messagesand through provider-compatible Anthropic SDK endpoints.
format="openai" or format="anthropic" before adding a new endpoint abstraction.
Use materialize() when you need route evidence without live Claude spend:
5. GLM and Z.ai route checks
For GLM tool-call validation, keep native OpenAI JSON tools as the default. Start withglm-flash through OpenRouter via Portkey when you want a broadly compatible route.
6. Proxy and VPN notes
Local live checks can use provider keys, base URL overrides, and simple proxy exports from~/.bashrc, including HTTP_PROXY, HTTPS_PROXY, and NO_PROXY. Use those exports when VPN/TUN mode changes GLM, Anthropic, or OpenRouter reachability.
You can also pass proxy settings directly:

