Expand description
The provider side: what a runner sends each provider for one item, and
what the provider answers. Both starting providers share one shape
(Cloudflare calls clef “fully Jev-API compatible”); CONTRACT.md cites
the documentation each shape comes from.
One provider call carries one item’s state with every question of the
batch. The runner maps the batch’s catalog id to the provider’s own model
value (models) and forwards state, the questions and the images as
the caller wrote them.
Modules§
- catalog_
ids - Catalog ids of the starting providers’ models: models.dev’s provider key,
then
/, then models.dev’s model id. The first/splits the two, so@and any further/belong to the model id. Each pins a model version, never a moving alias. - clef_
limits - clef’s limits on one request, from Cloudflare’s documentation.
- hosts
- Provider hosts a
role.describenames asegress_host. - models
- The
modelvalue each provider expects in its request body.
Structs§
- Provider
Request - The provider request for one item:
{model, state, questions, images?}.imagesis clef only; TypeSafe takes text only. - Provider
Response - The provider response for one item:
{model, answers, usage}.
Constants§
- TYPESAFE_
ENDPOINT - TypeSafe’s classification endpoint.
Functions§
- item_
code_ for_ status - The per-item error code for a provider’s HTTP status, once the runner’s own retries are spent. Neither provider documents an error body, so the status is all the mapping reads: