From 62e357a6573dbbbfd82cc0d17737aed28bd8ee14 Mon Sep 17 00:00:00 2001 From: can1357 Date: Tue, 19 May 2026 17:16:25 +0900 Subject: [PATCH] test(ai): update additionalProperties expectation to true after empty-schema normalization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Following ff9e007e1 ({}→true normalization applied to all providers via toolWireSchema), the explicit additionalProperties: {} input now arrives at the Anthropic normalizer as additionalProperties: true. Both forms are semantically equivalent open-map per JSON Schema 2020-12 §4.3.1. --- packages/ai/test/anthropic-alignment.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/ai/test/anthropic-alignment.test.ts b/packages/ai/test/anthropic-alignment.test.ts index cb1f74bd0..cfdd229c0 100644 --- a/packages/ai/test/anthropic-alignment.test.ts +++ b/packages/ai/test/anthropic-alignment.test.ts @@ -452,8 +452,9 @@ describe("Anthropic request fingerprint alignment", () => { expect(inputSchema?.additionalProperties).toBe(false); // The unsupported `propertyNames` keyword is still stripped … expect(extra).not.toHaveProperty("propertyNames"); - // … but the explicit open-map schema survives. - expect(extra.additionalProperties).toEqual({}); + // … but the explicit open-map schema survives (normalized to `true` per + // JSON Schema 2020-12 §4.3.1 — `{}` and `true` are equivalent). + expect(extra.additionalProperties).toBe(true); // A typed value schema is preserved verbatim (and would be recursed into // if it were an object — covered separately). expect(extraTyped.additionalProperties).toEqual({ type: "string" });