/** * Registry of known LLM provider free-tier limits + per-token pricing. * * Complements `LLMCostCalculator` (v0.9) — the calculator turns * (model, tokens_in, tokens_out) into a cost using whatever price table you * hand it; this module IS a curated price + free-tier data source for the * providers wa-agent has been used against in production. * * Data verified against provider docs 2026-06-19 (bibliafala's snapshot). * These numbers move — the registry is a starting point, not truth. Consumers * that need authoritative caps should read them from the provider's own API * where possible (Groq exposes them via response headers). * * Prices are USD per million tokens. RPD = Requests Per Day; RPM = per * Minute; TPD/TPM = Tokens Per Day/Minute. `null` / absent means "no * documented cap" — never trust "0". * * Usage: * * import { PROVIDER_LIMITS, estimateCostUsd } from '@emerleite/wa-agent'; * const cost = estimateCostUsd('groq_70b', 1200, 350); * // → 0.00098 (USD) * * For multi-provider routing decisions ("this call would blow Groq's TPD; * fall through to Cerebras"), pair the registry with your own request/token * counters in D1 or KV — the registry itself is static data. */ export interface ProviderLimit { /** Human label for dashboards. */ display: string; /** Free-tier requests per day. */ rpd_free?: number; /** Free-tier requests per minute. */ rpm_free?: number; /** Free-tier requests per hour. */ rph_free?: number; /** Free-tier tokens per day. */ tpd_free?: number; /** Free-tier tokens per minute. */ tpm_free?: number; /** Free-tier tokens per hour. */ tph_free?: number; /** USD per million input tokens. */ price_in: number; /** USD per million output tokens. */ price_out: number; /** Freeform note (e.g. "free allowance counted in Neurons, not RPD"). */ note?: string; } /** * Curated registry — keyed by an app-specific slug (not the provider's * canonical model id) so consumers can distinguish `groq_8b` from `groq_70b` * without parsing model strings. */ export declare const PROVIDER_LIMITS: Record; /** Dollars-per-M × tokens / 1M = dollars. Unknown provider → 0. */ export declare function estimateCostUsd(provider: string, tokensIn: number, tokensOut: number): number; /** Integer micro-USD (1/1M USD) — right shape for `AICallLedger.est_cost_micro_usd`. */ export declare function estimateCostMicroUsd(provider: string, tokensIn: number, tokensOut: number): number; //# sourceMappingURL=provider_limits.d.ts.map