diff --git a/.changeset/wicked-starfishes-bow.md b/.changeset/wicked-starfishes-bow.md new file mode 100644 index 0000000000..4afd4e9156 --- /dev/null +++ b/.changeset/wicked-starfishes-bow.md @@ -0,0 +1,5 @@ +--- +"@effect/ai": patch +--- + +Avoid inclusion of `_tag` in tool call JSONSchema diff --git a/packages/ai/ai/src/Completions.ts b/packages/ai/ai/src/Completions.ts index 144e11a8f5..885f5412d0 100644 --- a/packages/ai/ai/src/Completions.ts +++ b/packages/ai/ai/src/Completions.ts @@ -315,7 +315,7 @@ const convertTool = ( ) => ({ name, description: getDescription(schema.ast), - parameters: makeJsonSchema(schema.ast), + parameters: makeJsonSchema(AST.omit(schema.ast, ["_tag"])), structured })