Skip to main content

Module model

Module model 

Source
Expand description

Catalog models: what a provider serves and how to talk to it.

Mirrors Model and the compat interfaces in packages/ai/src/types.ts in pi v1.0.0. The same shape is used by the built-in catalog, by models resolved from models.json and by extension-registered providers.

Structs§

AnthropicMessagesCompat
compat for anthropic-messages.
ClassifierModel
A structured classifier model, usable with classify() only. Fields follow pi’s catalog order.
ImageModel
An image-generation model, usable with generateImages() only. Fields follow pi’s catalog order.
Model
A chat model.
OpenAiCompletionsCompat
compat for openai-completions.
OpenAiResponsesCompat
compat for the OpenAI Responses family.
Pricing
US dollars per million tokens. pi calls this ModelCost.