fix: normalize proxyModel in yaml/json output, drop deprecated gated field
Resolves proxyModel from gated boolean when the DB value is empty (pre-migration projects). The gated field is no longer included in get -o yaml/json output, making it apply-compatible with the new schema. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -109,6 +109,14 @@ export function stripInternalFields(obj: Record<string, unknown>): Record<string
|
|||||||
delete result.members;
|
delete result.members;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Normalize proxyModel: resolve from gated when empty, then drop deprecated gated field
|
||||||
|
if ('gated' in result || 'proxyModel' in result) {
|
||||||
|
if (!result.proxyModel) {
|
||||||
|
result.proxyModel = result.gated === false ? 'content-pipeline' : 'default';
|
||||||
|
}
|
||||||
|
delete result.gated;
|
||||||
|
}
|
||||||
|
|
||||||
// Strip null values last (null = unset, omitting from YAML is cleaner and equivalent)
|
// Strip null values last (null = unset, omitting from YAML is cleaner and equivalent)
|
||||||
for (const key of Object.keys(result)) {
|
for (const key of Object.keys(result)) {
|
||||||
if (result[key] === null) {
|
if (result[key] === null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user