From ce6faa44e56e71e420408558bb3712bea78ab7eb Mon Sep 17 00:00:00 2001 From: Diego Rodrigues de Sa e Souza Date: Thu, 6 Aug 2026 10:40:00 -0300 Subject: [PATCH] feat(models): treat quota-exhausted errors as non-hideable in Test All (#9511) (#9537) Validated in local merge-train (diegosouzapw batch) --- ...9511-quota-exhausted-transient-test-all.md | 1 + .../components/CompatibleModelsSection.tsx | 2 +- .../providers/[id]/components/ModelRow.tsx | 14 ++-- .../[id]/components/PassthroughModelRow.tsx | 14 ++-- .../components/PassthroughModelsSection.tsx | 9 ++- .../[id]/components/ProviderModelsSection.tsx | 2 +- .../[id]/hooks/useModelVisibilityHandlers.ts | 16 ++-- .../providers/[id]/providerPageHelpers.ts | 10 ++- src/app/api/models/test-all/route.ts | 14 +++- src/i18n/messages/en.json | 1 + src/i18n/messages/pt-BR.json | 1 + src/lib/api/modelTestRunner.ts | 58 ++++++++++++++- tests/unit/model-test-runner.test.ts | 73 +++++++++++++++++++ tests/unit/test-all-model-status.test.ts | 38 ++++++++++ 14 files changed, 223 insertions(+), 30 deletions(-) create mode 100644 changelog.d/features/9511-quota-exhausted-transient-test-all.md diff --git a/changelog.d/features/9511-quota-exhausted-transient-test-all.md b/changelog.d/features/9511-quota-exhausted-transient-test-all.md new file mode 100644 index 0000000000..d9b3e54270 --- /dev/null +++ b/changelog.d/features/9511-quota-exhausted-transient-test-all.md @@ -0,0 +1 @@ +- **feat(models):** Test All's "Auto-hide failed models" no longer hides quota errors — daily-quota-exhausted and credits-exhausted responses are now classified via the routing path's existing quota detectors, so an evening Test All on a free-tier provider no longer silently wipes the catalog. Quota results stay visible with a distinct amber badge ([#9511](https://github.com/diegosouzapw/OmniRoute/issues/9511)) diff --git a/src/app/(dashboard)/dashboard/providers/[id]/components/CompatibleModelsSection.tsx b/src/app/(dashboard)/dashboard/providers/[id]/components/CompatibleModelsSection.tsx index f82e7f9f70..2a7e8d7bbe 100644 --- a/src/app/(dashboard)/dashboard/providers/[id]/components/CompatibleModelsSection.tsx +++ b/src/app/(dashboard)/dashboard/providers/[id]/components/CompatibleModelsSection.tsx @@ -67,7 +67,7 @@ export interface CompatibleModelsSectionProps { bulkTogglePending?: boolean; togglingModelId?: string | null; onTestModel?: (modelId: string, fullModel: string) => Promise; - modelTestStatus?: Record; + modelTestStatus?: Record; testingModelId?: string | null; onTestAll?: (targets: Array<{ modelId: string; fullModel: string }>) => Promise; testingAll?: boolean; diff --git a/src/app/(dashboard)/dashboard/providers/[id]/components/ModelRow.tsx b/src/app/(dashboard)/dashboard/providers/[id]/components/ModelRow.tsx index 8580acccc8..2c453971d5 100644 --- a/src/app/(dashboard)/dashboard/providers/[id]/components/ModelRow.tsx +++ b/src/app/(dashboard)/dashboard/providers/[id]/components/ModelRow.tsx @@ -278,7 +278,7 @@ export interface ModelRowProps { onToggleHidden?: (modelId: string, hidden: boolean) => Promise; togglingHidden?: boolean; onTestModel?: (modelId: string, fullModel: string) => Promise; - testStatus?: "ok" | "error" | null; + testStatus?: "ok" | "error" | "quota" | null; testingModel?: boolean; } @@ -404,15 +404,17 @@ export default function ModelRow({