Documentation
¶
Overview ¶
Package modelfacts is what the runner knows about a hosted model without asking anyone at run time: its context window, its output limit and its prices.
The facts are a snapshot compiled into the CLI (catalog.json), a trimmed copy of models.dev's public list for the providers a policy can name; its licence is in LICENSE.models-dev. scripts/modelfacts/update.py regenerates it. Nothing here reaches the network: a model the snapshot does not hold has no facts, and the runner goes on without them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Facts ¶
type Facts struct {
// ContextWindow is the model's window in tokens, and MaxOutput the
// most output one request may ask for; zero when not listed.
ContextWindow int64
MaxOutput int64
// Priced reports that the catalogue lists the model's prices. The
// four prices are dollars a million tokens: input read fresh, input
// read from the provider's cache, input written to it, and output.
// A cache price the catalogue does not list is the fresh price.
Priced bool
Input float64
CacheRead float64
CacheWrite float64
Output float64
}
Facts is what the catalogue holds about one model.
Click to show internal directories.
Click to hide internal directories.