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:
parent
aa6dce948c
commit
92a3460b66
1 changed files with 10 additions and 9 deletions
|
|
@ -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", () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue