import type { Api, KnownProvider, Model, ModelCost, ModelPricingStatus, TimeBasedCost, TokenCost, Usage } from "./types.js"; /** Provider identifier accepted by the bundled model registry. */ export type GeneratedProvider = string; /** Whether `provider` has bundled rows in models.json (e.g. a provider id authored in KDL). */ export declare function isGeneratedProvider(provider: string): provider is GeneratedProvider; /** Look up a bundled model; nested catalog values are shared and must not be mutated. */ export declare function getBundledModel(provider: GeneratedProvider, modelId: string): Model; /** List providers with bundled rows; the array is shared and frozen. */ export declare function getBundledProviders(): readonly KnownProvider[]; /** List a provider's bundled models; nested catalog values are shared and must not be mutated. */ export declare function getBundledModels(provider: GeneratedProvider): Model[]; /** Resolve display semantics without mistaking an absent rate card for a free model. */ export declare function getModelPricingStatus(model: Pick, "cost" | "pricingStatus">): ModelPricingStatus; /** Factory Droid credit rate in force at a time, and the next dated change to it. */ export interface FactoryDroidCreditRate { rate: number; /** The earliest later `credit-rates` card that changes `rate`: the rate it sets and when (Unix ms). */ next?: { rate: number; at: number; }; } /** * Factory Droid Standard Credits rate at `timestamp` (Unix ms, default now): * the `input` of the `credit-rates` card due then (the latest at or before * it, as for cost cards), else the base rate. Undefined for models without a * credit rate. */ export declare function getFactoryDroidCreditRate(model: Pick, timestamp?: number): FactoryDroidCreditRate | undefined; /** * The base token card in force at `timestamp` (Unix ms, default now): the * latest due `timeBased` effective rate, else the row's own legs. Price * displays read this rather than the scalar legs, which keep the card current * when the row was built while bundles, caches, and long sessions outlive it. * Applies no long-context tier or peak/off-peak multiplier. */ export declare function getEffectiveTokenCost(cost: ModelCost, timestamp?: number): TokenCost; /** * Whether a schedule carries a recurring peak/off-peak tariff. A schedule with * no peak windows at a 1x off-peak multiplier only carries dated rate cards * (`cost-patch`/`cost-fallback` `effective-rates`): its price changes on a * date, never by time of day. */ export declare function hasRecurringTariff(schedule: TimeBasedCost): boolean; /** Return the recurring UTC tariff period, independently of its monetary multiplier. */ export declare function getTimeBasedPricingPeriod(cost: ModelCost, timestamp?: number): "peak" | "off-peak" | undefined; /** Return the next actual peak/off-peak change strictly after the Unix-ms timestamp. */ export declare function getNextTimeBasedPricingTransition(cost: ModelCost, timestamp?: number): number | undefined; /** Price a fully uncached prompt at its request timestamp (Unix ms); scheduled prices default to now. */ export declare function calculateUncachedInputCost(cost: ModelCost, promptInputTokens: number, timestamp?: number): number; /** Price usage at its request timestamp (Unix ms); only scheduled prices default to now. */ export declare function calculateUsageCost(cost: ModelCost, usage: Usage, timestamp?: number): Usage["cost"]; /** Price usage at its request timestamp (Unix ms); preserve the resulting monetary amounts for display. */ export declare function calculateCost(model: Model, usage: Usage, timestamp?: number): Usage["cost"]; /** * Check if two models are equal by comparing both their id and provider. * Returns false if either model is null or undefined. */ export declare function modelsAreEqual(a: Model | null | undefined, b: Model | null | undefined): boolean;