diff --git a/src/services/providers.ts b/src/services/providers.ts index f9067d2..c1d4321 100644 --- a/src/services/providers.ts +++ b/src/services/providers.ts @@ -37,8 +37,8 @@ export async function fetchPoeQuota(): Promise { // POE logic: 75000 daily points is standard. We might need to adjust based on actual API payload. // Assuming response has: { available: number } - const available = res.data.available || 0; - const total = 75000; + const available = res.data.current_point_balance || 0; + const total = 2575000; const used = total - available > 0 ? total - available : 0; const percentage = (used / total) * 100; @@ -57,10 +57,10 @@ export async function fetchMinimaxQuota(): Promise { } }); - // Assuming response has { used_quota: number, total_quota: number } - const used = res.data.used_quota || 0; - const total = res.data.total_quota || 100; - const percentage = (used / total) * 100; + const remains = res.data.model_remains?.find((r: any) => r.model_name === 'general'); + const total = 100; + const percentage = remains ? (100 - remains.current_weekly_remaining_percent) : 0; + const used = percentage; return { provider: 'MiniMax', used, total, percentage }; } catch (error: any) {