Skip to main content
Provider picks the kitchen; Gateway decides whether the order travels by waiter, API, or carrier pigeon.

1. Motivation

HeavenBase separates where a model is served from how a request is transported. That keeps application intent stable while credentials, endpoints, and Gateway policy vary by environment.
  • provider owns model hosting, credentials, and base URL.
  • gateway owns the SDK or proxy transport shape.
  • model owns Provider-specific identifiers behind one canonical alias.

2. Use the Default Route

One OpenRouter key covers the broadest bundled model set:
The default route is preset -> model -> openrouter -> openai. Here openai names the OpenAI-compatible Gateway, not necessarily the model host.

3. Choose a Hosted Provider

Set the default Provider when most calls should share one host:
Pin one call when comparing routes:

4. Choose a Gateway

Use the native Anthropic Gateway when Claude Messages payloads or Anthropic SDK behavior matter:

5. Inspect a Route without Spending

The print Apply profile resolves a redacted route view without making a model call.
The final URL comes from Provider config, Gateway config, or a call-time base_url=... override. The print profile redacts secrets. Raw spec.to_dict() bindings may contain them and must not be logged.

6. Run Local Providers

Packaged local Presets keep their Provider explicit:
  • local and worker-local use LM Studio with qwen3.6-flash.
  • embed-local uses LM Studio with embeddinggemma.
  • imagen-local uses Ollama with z-image-turbo.
  • ocr-local uses Ollama with glm-ocr.
Override the environment URL when the server runs elsewhere:

7. Handle Proxies Deliberately

Standard HTTP_PROXY, HTTPS_PROXY, and NO_PROXY values work for many SDK routes. Call-time values make the route visible in application code:
Local Provider defaults clear inherited proxies so loopback calls do not accidentally leave the machine. Review materialized routes when VPN or TUN mode changes reachability.

Summary

  • Provider selects hosting; Gateway selects transport.
  • Canonical model aliases keep route changes out of application logic.
  • The redacted print Apply profile provides route evidence without a live request.
  • Local Presets pin the Provider that their runtime requires.

Further Exploration

Related resources:
  • First LLM — Configure credentials and run a first call
  • LLM Overview — Presets and the model catalog
  • Advanced LLM — Gateway limits, caching, and client exports