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.
This commit is contained in:
Jeremy 2026-03-29 23:06:44 -05:00
parent aa6dce948c
commit 92a3460b66

View file

@ -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", () => {