Skip to main content

Module models_access

Module models_access 

Source
Expand description

The subscription models through the Cloud models gateway (mz6, docs/model-access-subscription.md §4): the connector’s CloudTokenSource for the proxy’s built-in leanctx provider, and the catalog of lean-ctx models and of the Local Read kind cloud.models.catalog (read_catalog).

Order of every admission, each step before the next one may run: Cloud on, enrolled, the models origin on the Cloud host (a foreign models_url is refused before any token is read or minted), lease valid or in grace and granting models.subscription, no hold of the models path (throttle::Scope::Models), then the instance token.

Structs§

CatalogRead
The catalog as Cloud served it, with what the engine knows beside it.
CatalogRow
One row of lean-ctx models.

Constants§

CATALOG_DOMAIN
Signing domain of the catalog Cloud serves (Cloud cloud_wire::models).
GATEWAY_BASE_PATH
Path of the LeanCTX gateway below the Cloud origin (Cloud routes::gateway::GATEWAY_BASE_PATH): an OpenAI-compatible base URL.

Functions§

catalog_rows
The rows of a catalog document (leanctx.cloud.model-catalog/v1). Display only: nothing is served or refused on these rows.
catalog_verified
Whether document is signed by a key set v3 policy key valid at received_at (ms): Ed25519 (verify_strict) over CATALOG_DOMAIN ‖ canonical JSON of the document without signature (128 hex), with the key named by key_id, as the effective policy is verified.
ensure_registered
Register the connector as this process’s subscription-model token source (once).
fetch_catalog
GET /v1/models/catalog with this instance’s credentials.
gateway_base_url
The gateway base URL of a Cloud enrolled at cloud_url.
note_answer_at
Record what a gateway refusal says about the models path at now.
origin_for
The models origin of the instance in store, or why there is none. Reads only the instance record and the config, never a token.
read_catalog
GET /v1/models/catalog as the connected instance, verified against the stored key set v3 (fetched once when it does not know the key).