feat(ai): add input-based pricing tiers

This commit is contained in:
Armin Ronacher
2026-07-09 22:43:19 +02:00
parent 6c735db060
commit a9ecf301fb
14 changed files with 241 additions and 60 deletions
@@ -1451,8 +1451,8 @@ export interface ProviderModelConfig {
thinkingLevelMap?: Model<Api>["thinkingLevelMap"];
/** Supported input types. */
input: ("text" | "image")[];
/** Cost per token (for tracking, can be 0). */
cost: { input: number; output: number; cacheRead: number; cacheWrite: number };
/** Per-million-token cost rates and optional request-wide input pricing tiers. */
cost: Model<Api>["cost"];
/** Maximum context window size in tokens. */
contextWindow: number;
/** Maximum output tokens. */