diff --git a/backend/src/modules/invoices/invoice.processor.ts b/backend/src/modules/invoices/invoice.processor.ts index abd2eba..ca66e18 100644 --- a/backend/src/modules/invoices/invoice.processor.ts +++ b/backend/src/modules/invoices/invoice.processor.ts @@ -115,11 +115,11 @@ export class InvoiceProcessor { * حساب تكلفة استخدام Gemini بناءً على التسعيرة الحالية */ private calculateCost(usage: any): number { - // Gemini 1.5 Flash Pricing (as of late 2024): - // Prompt: $0.075 / 1M tokens - // Completion: $0.30 / 1M tokens - const promptCost = (usage.promptTokens / 1000000) * 0.075; - const completionCost = (usage.completionTokens / 1000000) * 0.30; + // Gemini 1.5 Flash-Lite Pricing (from user .env): + // Prompt: $0.10 / 1M tokens + // Completion: $0.40 / 1M tokens + const promptCost = (usage.promptTokens / 1000000) * 0.10; + const completionCost = (usage.completionTokens / 1000000) * 0.40; return promptCost + completionCost; } diff --git a/frontend/src/pages/dashboard/RiskMonitorPage.tsx b/frontend/src/pages/dashboard/RiskMonitorPage.tsx index badb0e2..9c1eeb2 100644 --- a/frontend/src/pages/dashboard/RiskMonitorPage.tsx +++ b/frontend/src/pages/dashboard/RiskMonitorPage.tsx @@ -3,9 +3,8 @@ import { AlertTriangle, ShieldAlert, FileWarning, - ChevronRight, Search, - Filter, + Filter, Loader2, Building2, Calendar,