From f5520de42ad76ec9ed22bf36893e68d8fba0af4e Mon Sep 17 00:00:00 2001 From: Sergey Galuza Date: Sat, 11 Apr 2026 19:08:24 +0200 Subject: [PATCH] fix(cliproxy): preserve explicit false values in catalog --json Use !== undefined checks instead of truthy checks so that explicitly set false booleans (e.g. extendedContext: false) appear in JSON output, allowing consumers to distinguish "not set" from "explicitly disabled". Built [OnSteroids](https://onsteroids.ai) --- src/commands/cliproxy/catalog-subcommand.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/commands/cliproxy/catalog-subcommand.ts b/src/commands/cliproxy/catalog-subcommand.ts index 78fb6e1d..3090c28e 100644 --- a/src/commands/cliproxy/catalog-subcommand.ts +++ b/src/commands/cliproxy/catalog-subcommand.ts @@ -198,13 +198,13 @@ export function handleCatalogJson(): void { for (const [provider, catalog] of Object.entries(catalogs)) { result[provider] = catalog.models.map((m) => { const entry: CatalogJsonModel = { id: m.id, name: m.name }; - if (m.tier) entry.tier = m.tier; - if (m.description) entry.description = m.description; - if (m.deprecated) entry.deprecated = m.deprecated; - if (m.deprecationReason) entry.deprecationReason = m.deprecationReason; - if (m.broken) entry.broken = m.broken; - if (m.extendedContext) entry.extendedContext = m.extendedContext; - if (m.nativeImageInput) entry.nativeImageInput = m.nativeImageInput; + if (m.tier !== undefined) entry.tier = m.tier; + if (m.description !== undefined) entry.description = m.description; + 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.extendedContext !== undefined) entry.extendedContext = m.extendedContext; + if (m.nativeImageInput !== undefined) entry.nativeImageInput = m.nativeImageInput; return entry; }); }