Provider picks the restaurant. Gateway picks how you place the order.
provider) from how the request is sent (gateway). Most projects set one API key, keep the default openrouter provider, and never touch gateway config until they need Portkey, LiteLLM, or native Anthropic.
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.
See First LLM for the full provider catalog and per-key setup examples.
2. Switch Default Provider
Usedefault_provider when most calls should use one provider:
local and worker-local use LM Studio with qwen3.6-flash, imagen-local uses Ollama with x/z-image-turbo, and ocr-local uses Ollama with glm-ocr. The omlx provider is available for direct OpenAI-compatible calls, LiteLLM (openai/<model>), Portkey custom-host routing, and Bifrost OpenAI-compatible provider routing.
Use an explicit provider for one call when you are comparing routes:
3. Gateway Examples
Usegateway="portkey" when you want routing policy, observability, or gateway-side controls:
Gateway setup walkthroughs live in First LLM §5.2 and Advanced LLM.
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 call-time 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.
Proxy support fits that model:
- Portkey supports OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages gateway formats.
- LiteLLM supports Anthropic through the
anthropic/provider route and/v1/messagespassthrough. - Bifrost supports Anthropic through OpenAI-compatible conversion to
/v1/messagesand through provider-compatible Anthropic SDK endpoints.
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:

