From 7bf5b4b95e0bb12afc1d23d668fb43546608db58 Mon Sep 17 00:00:00 2001 From: Sergey Galuza Date: Sat, 11 Apr 2026 19:33:00 +0200 Subject: [PATCH] fix(cliproxy): guard against undefined catalog and add issueUrl field - Add null check for catalog entries from Partial type - Include issueUrl in JSON output for broken model tracking Built [OnSteroids](https://onsteroids.ai) --- src/commands/cliproxy/catalog-subcommand.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/commands/cliproxy/catalog-subcommand.ts b/src/commands/cliproxy/catalog-subcommand.ts index 05c4f172..adcdb5e5 100644 --- a/src/commands/cliproxy/catalog-subcommand.ts +++ b/src/commands/cliproxy/catalog-subcommand.ts @@ -184,6 +184,7 @@ interface CatalogJsonModel { deprecated?: boolean; deprecationReason?: string; broken?: boolean; + issueUrl?: string; thinking?: ThinkingSupport; extendedContext?: boolean; nativeImageInput?: boolean; @@ -198,6 +199,9 @@ export function handleCatalogJson(): void { const catalogs = getAllResolvedCatalogs(); const result: Record = {}; for (const [provider, catalog] of Object.entries(catalogs)) { + if (!catalog) { + continue; + } result[provider] = catalog.models.map((m) => { const entry: CatalogJsonModel = { id: m.id, name: m.name }; if (m.tier !== undefined) entry.tier = m.tier; @@ -205,6 +209,7 @@ export function handleCatalogJson(): void { if (m.deprecated !== undefined) entry.deprecated = m.deprecated; if (m.deprecationReason !== undefined) entry.deprecationReason = m.deprecationReason; if (m.broken !== undefined) entry.broken = m.broken; + if (m.issueUrl !== undefined) entry.issueUrl = m.issueUrl; if (m.thinking !== undefined) entry.thinking = m.thinking; if (m.extendedContext !== undefined) entry.extendedContext = m.extendedContext; if (m.nativeImageInput !== undefined) entry.nativeImageInput = m.nativeImageInput;