From 934038027fa64f0a7135b9e1ed654796abeabd93 Mon Sep 17 00:00:00 2001 From: Saqib Date: Wed, 7 Oct 2026 13:29:17 +0530 Subject: [PATCH] fix(sitemap): keep entities with numeric ids AIModel ids are GraphQL Int. The string-only isEntityItem filter added in d750e889 dropped every AI model, so aimodels-N.xml served an empty urlset. --- app/sitemap/[entityPage]/route.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/sitemap/[entityPage]/route.ts b/app/sitemap/[entityPage]/route.ts index 6f7b8dbc..df6ece46 100644 --- a/app/sitemap/[entityPage]/route.ts +++ b/app/sitemap/[entityPage]/route.ts @@ -10,7 +10,8 @@ import { } from '@/lib/sitemap-utils'; interface EntityItem { - id: string; + // AIModel ids are GraphQL Int; every other entity's are strings. + id: string | number; slug?: string; name?: string; fullName?: string; @@ -25,7 +26,7 @@ function isEntityItem(item: unknown): item is EntityItem { typeof item === 'object' && item !== null && 'id' in item && - typeof (item as { id: unknown }).id === 'string' + ['string', 'number'].includes(typeof (item as { id: unknown }).id) ); }