From e6ca119f5ee11ae09199f885cd76c7ff3059d595 Mon Sep 17 00:00:00 2001 From: decolua Date: Mon, 19 Jan 2026 23:01:39 +0700 Subject: [PATCH] Fix combo fallback --- open-sse/services/accountFallback.js | 5 +++++ src/app/(dashboard)/dashboard/usage/page.js | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/open-sse/services/accountFallback.js b/open-sse/services/accountFallback.js index f29a5970..a23281a4 100644 --- a/open-sse/services/accountFallback.js +++ b/open-sse/services/accountFallback.js @@ -24,6 +24,11 @@ export function checkFallbackError(status, errorText, backoffLevel = 0) { const errorStr = typeof errorText === "string" ? errorText : JSON.stringify(errorText); const lowerError = errorStr.toLowerCase(); + // "No credentials" - should fallback to next model in combo + if (lowerError.includes("no credentials")) { + return { shouldFallback: true, cooldownMs: COOLDOWN_MS.notFound }; + } + // "Request not allowed" - short cooldown (5s), takes priority over status code if (lowerError.includes("request not allowed")) { return { shouldFallback: true, cooldownMs: COOLDOWN_MS.requestNotAllowed }; diff --git a/src/app/(dashboard)/dashboard/usage/page.js b/src/app/(dashboard)/dashboard/usage/page.js index e74897c6..ba550339 100644 --- a/src/app/(dashboard)/dashboard/usage/page.js +++ b/src/app/(dashboard)/dashboard/usage/page.js @@ -1,6 +1,6 @@ "use client"; -import { useState } from "react"; +import { useState, Suspense } from "react"; import { UsageStats, RequestLogger } from "@/shared/components"; export default function UsagePage() { @@ -33,7 +33,9 @@ export default function UsagePage() { {/* Content */} - {activeTab === "overview" ? : } + Loading...}> + {activeTab === "overview" ? : } + ); }