mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 16:16:52 +00:00
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)
This commit is contained in:
@@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user