Engine reference — generated from the canonical engineering source. Do not edit this page by hand.
Model Catalog
Cost-accounting scope. The
pricingblock on this page is per-model vendor rate metadata used bysol_costfor spend accounting. It is not a commercial offer; commercial terms are not announced. For licensing or evaluation, contact Spacebeam.
Status: LIVE. One declarative source describes every model ZERG knows: identity, aliases, provider, wire, context window, modalities, capabilities, rate metadata and serving/registration posture. Runtime reads only the generated artifacts — never YAML.
Source of truth
contract/model_catalog.yaml (version: 1, a models: list). Each
descriptor carries:
| Field | Meaning |
|---|---|
id | Canonical model id (what a client sends). Unique. |
aliases | Additional request ids. Globally unique; an alias may never equal an id. |
provider | Canonical provider name (e.g. anthropic, zai, groq, local). |
wire | openai, anthropic or local (lane-owned llama.cpp). |
context_window | Positive integer token window. |
modalities | text / image (non-empty). |
capabilities | Subset of tools, thinking, vision, cache, streaming, strict_json. cache gates Anthropic cache_control injection: an unknown/non-declared model gets no automatic markers, and the caller’s markers are capped at Anthropic’s 4-breakpoint budget. |
pricing | input_per_mtok + output_per_mtok (+ optional cache read/write). Either free: true (a zero-rate local row) or unpriced: true with a reason when no bundled rate exists. |
serving | register: adapter | declarative | local | none; adapter rows name adapter (the behavior-owning Erlang module). |
luna_descriptor | Present only for the models shipped in Luna’s static catalog (name, provider override, max temperature, thinking levels). |
The catalog covers every bundled adapter model, every declarative
provider JSON model, the 18 Luna client descriptors and the local
lane model rows (wire: local, with the registry filename slug as an
alias).
Canonical identity. Aliases are request ids only: the
runtime resolves them to their id before building a provider body
(sol_model_catalog:canonical/1), and the declarative loader stamps
canonical_model on every registry row. A registered row is not
necessarily dispatchable: dispatchability requires an endpoint +
credentials (remote) or a local lane identity; the fallback candidate set
and the health probe use the dispatchable set.
Regenerate and verify
python3 ci/catalog_gen.py # rewrite every committed artifact
python3 ci/catalog_gen.py --check # exit 1 on drift (CI gate)
python3 ci/model_catalog_lint.py # bidirectional parity gate
Generated artifacts (all committed, deterministic sorted-key output with a content hash):
server/priv/model_catalog.json — Sol boot artifact read by
sol_model_catalog.
docs/fixtures/model_provider_map.json — the Sol↔Luna model→provider
fixture (sol_provider_* modules, adapter models, ordered Luna prefixes,
declared divergences).
client/data/models.json and client/core/_models_data.lua — Luna’s static
catalog (bundled inline form included).
server/test/fixtures/model_catalog_bounded.json — bounded loader/lint
fixture (12 rows).
Duplicate ids or aliases are a hard error in the generator (never last-write-wins). An empty catalog is also a hard error.
Add or override a model without code
A model on an existing declarative provider
- Add
{"id": "...", "alias": "..."}to the provider’sserver/priv/providers/*.json(or the operator user config directory). - Add a descriptor for the id to
contract/model_catalog.yaml(serving: {register: declarative, provider_config: <name>}), including aliases and rate metadata. - Run
python3 ci/catalog_gen.py.
Declarative providers are still registered at boot by
sol_provider_declarative:load_configs/0; the catalog owns the metadata and
the lint parity, not the provider URL/key.
A bundled adapter model
Add the id to the adapter’s models list and the catalog descriptor
with serving: {register: adapter, adapter: sol_provider_<name>}. The
adapter keeps behavior ownership (format_request/2, parse_*); boot
registers the catalog row with the same #{wire_format => …} opts as before.
Override rates or capabilities
Edit the descriptor and regenerate. The client catalog and fixture update
together. pricing is the ONE billing rate source (sol_cost:price/1);
metadata_override records a deliberate divergence between the catalog and
the bundled sol_model_metadata fallback table for clients/tooling. It never
changes what sol_cost charges:
pricing:
input_per_mtok: <input-rate>
output_per_mtok: <output-rate>
metadata_override:
input_per_mtok: <input-rate>
output_per_mtok: <output-rate>
reason: "catalog is the rate source; metadata is the no-catalog-row fallback"
A stale override (one that no longer matches the metadata table) fails the lint, and so does a reason that claims metadata is the rate source.
A local lane row
Local lanes are described with wire: local, provider: local and
serving: {register: local, lane: <lane>, engine: <engine>}. The alias is
the registry filename slug (the id sol_http_streaming actually resolves via
sol_registry:find_by_name/1), e.g. qwen38_atx ↔
qwen3.8-27b-atx-4-xs. The lane registry remains the lifecycle owner; see
local-inference-lanes.md.
Runtime behavior
Billing: the catalog pricing block is the
server billing rate source (sol_cost:price/1). Aliases and local lane ids
resolve through the same lookup; rows without numeric rates are
unknown_price (never a silent zero). metadata_override remains a
generated client-view annotation.
Boot: sol_provider_boot:register_defaults/0 calls
sol_model_catalog:register_defaults/0 (bundled adapter rows and their
catalog aliases), then keeps
the dynamic Ollama discovery and the declarative JSON load. If the
generated artifact is missing/invalid, boot logs the typed error and falls
back to the legacy adapter lists loudly — never silently zero providers.
Unknown models: sol_pipeline:build_request_body/3 returns
{error, {unknown_model, Model}} instead of silently building an
OpenAI-wire body. The pipeline relays that as the existing not_found
class, so HTTP clients receive 404, not a 500 or a wrong-provider
request. ’s unknown-wire refusal in the declarative loader is
unchanged.
Adapter rows without an endpoint: a catalog register: adapter row is
only dispatchable once a declarative provider supplies base_url +
api_key_env; the HTTP funnel answers a typed 503 provider not configured instead of a misleading resolver 404.
Local lane models still resolve: a catalog wire: local row (lane id
or filename alias) or a live/prepared sol_registry row keeps the local
OpenAI-compatible body path.
What the lint pins
ci/model_catalog_lint.py fails on:
duplicate ids/aliases, aliases colliding with ids, dangling aliases;
adapter models ↔ catalog (missing and extra entries, provider drift);
boot registration surface (catalog registration + dynamic Ollama +
declarative JSON);
declarative provider JSON ↔ catalog (a provider model without a descriptor,
or a register: declarative descriptor with no provider row);
sol_model_metadata rates (exact match or a matching typed override);
Luna client/data/models.json ↔ luna_descriptor rows;
Luna’s ordered prefix table / default / declared divergences;
unpriced descriptors without the typed flag;
empty corpus and stale generated artifacts (catalog_gen --check).
See also
api-reference.md — GET /api/v1/models/metadata and
the model-listing endpoints.
local-inference-lanes.md — lane lifecycle and
validation.
local-inference-runbook.md — operator
start/stop/validate.