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.providerowns model hosting, credentials, and base URL.gatewayowns the SDK or proxy transport shape.modelowns Provider-specific identifiers behind one canonical alias.
2. Use the Default Route
One OpenRouter key covers the broadest bundled model set: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:
4. Choose a Gateway
5. Inspect a Route without Spending
Theprint Apply profile resolves a redacted route view without making a model call.
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:
localandworker-localuse LM Studio withqwen3.6-flash.embed-localuses LM Studio withembeddinggemma.imagen-localuses Ollama withz-image-turbo.ocr-localuses Ollama withglm-ocr.
7. Handle Proxies Deliberately
StandardHTTP_PROXY, HTTPS_PROXY, and NO_PROXY values work for many SDK routes.
Call-time values make the route visible in application code:
Summary
- Provider selects hosting; Gateway selects transport.
- Canonical model aliases keep route changes out of application logic.
- The redacted
printApply profile provides route evidence without a live request. - Local Presets pin the Provider that their runtime requires.

