Refactor error handling to config-driven approach with centralized error rules
Made-with: Cursor
This commit is contained in:
1 parent
b1288c5064
commit
b669b6ffc1
20 files changed
+1056
-991
No files matched your search
@@ -665,8 +665,9 @@ export default function ProviderDetailPage() {
|
||||
{/* Suggested models from provider API — show only models not yet added */}
|
||||
{suggestedModels.length > 0 && (() => {
|
||||
const addedFullModels = new Set(Object.values(modelAliases));
|
||||
const hardcodedIds = new Set(models.map((m) => m.id));
|
||||
const notAdded = suggestedModels.filter(
|
||||
(m) => !addedFullModels.has(`${providerStorageAlias}/${m.id}`)
|
||||
(m) => !addedFullModels.has(`${providerStorageAlias}/${m.id}`) && !hardcodedIds.has(m.id)
|
||||
);
|
||||
if (notAdded.length === 0) return null;
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user