From 92a3460b6681512663095ea09f41ccfaa71d1c58 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sun, 29 Mar 2026 23:06:44 -0500 Subject: [PATCH] fix(pi-ai): cast test tool fixtures to any for TSchema compatibility The Tool interface requires TSchema parameters (TypeBox), but test fixtures use plain objects. Cast makeTool return as any to satisfy tsc. --- .../src/providers/anthropic-shared.test.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/pi-ai/src/providers/anthropic-shared.test.ts b/packages/pi-ai/src/providers/anthropic-shared.test.ts index 279e0afd4..a20c72d40 100644 --- a/packages/pi-ai/src/providers/anthropic-shared.test.ts +++ b/packages/pi-ai/src/providers/anthropic-shared.test.ts @@ -2,15 +2,16 @@ import { describe, it } from "node:test"; import assert from "node:assert/strict"; import { convertTools } from "./anthropic-shared.js"; -const makeTool = (name: string) => ({ - name, - description: `desc for ${name}`, - parameters: { - type: "object" as const, - properties: { arg: { type: "string" } }, - required: ["arg"], - }, -}); +const makeTool = (name: string) => + ({ + name, + description: `desc for ${name}`, + parameters: { + type: "object" as const, + properties: { arg: { type: "string" } }, + required: ["arg"], + }, + }) as any; describe("convertTools cache_control", () => { it("adds cache_control to the last tool when cacheControl is provided", () => {