Capabilities
MODEL_CAPABILITIES maps model identifiers to a ModelCapabilityConfig:
taskOutputTokens holds per-task-kind output budgets. For example, OpenAI GPT 5.4 caps extraction_long_list at 24,576 output tokens and extraction_classify at 2,048.
Lookup helpers
modelCapabilitiesForRoute(route)returns the capability entry for a route, falling back to the direct-provider model identifier, then to a bare{ modelName }entry.modelSupportsImageInput(route)returnstruewhen the entry declares image support or the provider isopenai,anthropic,google, orxai.modelSupportsAudioInput(route)returnstrueonly for OpenAI models that declare audio support.modelRouteSupportsTask(task, route)checks a route against a task.chat_visionrequires image input,voice_transcriptionrequires audio input, andembeddingsrequires a priced embedding modality.
Effective output tokens
getEffectiveMaxTokens clamps a requested output budget to the route’s limit, preferring the per-task-kind budget when one exists:
Price manifest
PRICE_MANIFEST is the reviewed, versioned price list. Rates are stored as integer nano-USD per token, so call-cost arithmetic stays integral: one USD per million tokens equals 1,000 nano-USD per token.
sourceUrl it was reviewed against. Long-context fields describe threshold-based price multipliers for models that charge more past a token threshold.
Looking up a price
priceForRoute(route, manifest?) returns a discriminated union:
unpriced, never zero. Treat an unpriced result as missing data, not free usage. modelPriceKey(provider, model) builds the provider/model key used by manifest entries.