fix(core): tolerate missing tool input schemas (#39130)
Co-authored-by: Dax Raad <d@ironbay.co>
This commit is contained in:
parent
1f2c59a1b6
commit
33e3d1ebca
3 changed files with 34 additions and 1 deletions
|
|
@ -143,3 +143,18 @@ test("raw JSON schemas are render-only and omitted output means model-only", asy
|
|||
content: [{ type: "text", text: '{"value":1}' }],
|
||||
})
|
||||
})
|
||||
|
||||
test("missing external input schemas fall back to an empty schema", () => {
|
||||
const tool = {
|
||||
name: "external",
|
||||
description: "External tool",
|
||||
input: undefined,
|
||||
execute: () => Effect.succeed({ content: "unused" }),
|
||||
} as unknown as Info
|
||||
|
||||
expect(definition(tool)).toEqual({
|
||||
name: "external",
|
||||
description: "External tool",
|
||||
inputSchema: {},
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue