diff --git a/nodejs/test/shared-codegen.test.ts b/nodejs/test/shared-codegen.test.ts index 88f4d3cc3..95342e733 100644 --- a/nodejs/test/shared-codegen.test.ts +++ b/nodejs/test/shared-codegen.test.ts @@ -36,6 +36,7 @@ describe("shared schema definition codegen utilities", () => { ReasoningSummary: { type: "string", enum: ["concise", "detailed"], + description: "Reasoning summary mode used for model calls.", }, SharedPayload: { type: "object", @@ -74,6 +75,7 @@ describe("shared schema definition codegen utilities", () => { ReasoningSummary: { type: "string", enum: ["concise", "detailed"], + description: "Reasoning summary mode to request for supported model clients.", }, SharedPayload: { type: "object", diff --git a/scripts/codegen/utils.ts b/scripts/codegen/utils.ts index 6f06e8670..6ebe0531e 100644 --- a/scripts/codegen/utils.ts +++ b/scripts/codegen/utils.ts @@ -998,7 +998,9 @@ function normalizeDefinitionForComparison(definition: JSONSchema7Definition): un const result: Record = {}; for (const [key, value] of Object.entries(definition as Record)) { - if (key === "$ref" && typeof value === "string") { + if (key === "description" || key === "markdownDescription") { + continue; + } else if (key === "$ref" && typeof value === "string") { const localRef = parseLocalDefinitionRef(value); result[key] = localRef ? `#/definitions/${localRef}` : value; } else if (Array.isArray(value)) {