fix(cost): korrekt Gemini 3.5 Flash Lite priser i kod + docs

gemini.ts estimateCostUsd: 2.5-Flash-priser (0.075/0.30) -> 3.5-Flash-Lite standard (0.30/2.50). Pessimistiska per-bild-estimat 0.0015->0.004, OCR 0.001->0.002. docs/10: Claude-modelltabell + kostnad-per-uppgift omskrivna till Gemini. 36/36 gront.
This commit is contained in:
Claude
2026-08-17 18:41:45 +00:00
parent ecc3c6395e
commit 0ff3396d6e
2 changed files with 36 additions and 38 deletions
+4 -4
View File
@@ -115,10 +115,10 @@ function requestOnce(
}
/** Estimated max cost per image call in USD (pessimistic). */
const COST_ESTIMATE_PER_IMAGE_USD = 0.0015;
const COST_ESTIMATE_PER_IMAGE_USD = 0.004;
/** Estimated max cost per simple OCR image call in USD. */
const COST_ESTIMATE_PER_OCR_IMAGE_USD = 0.001;
const COST_ESTIMATE_PER_OCR_IMAGE_USD = 0.002;
export interface BudgetStore {
/** Return current daily spend in USD. */
@@ -1013,8 +1013,8 @@ Språk: ${lang}.`;
}
private estimateCostUsd(inputTokens: number, outputTokens: number): number {
// Gemini 2.5 Flash pricing (Aug 2025): ~$0.075/1M input, $0.30/1M output.
return inputTokens * 0.075e-6 + outputTokens * 0.3e-6;
// Gemini 3.5 Flash Lite standard-tier pricing (2026): $0.30/1M input, $2.50/1M output.
return inputTokens * 0.3e-6 + outputTokens * 2.5e-6;
}
private async isOverBudget(estimateUsd: number): Promise<boolean> {