Skip to content

Commit 0da2cc5

Browse files
committed
Fix Anthropic provider tool format to use custom nested object
1 parent 0708891 commit 0da2cc5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/agent/src/core/llm/providers/anthropic.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,11 @@ export class AnthropicProvider implements LLMProvider {
8181
if (functions && functions.length > 0) {
8282
(requestOptions as any).tools = functions.map(fn => ({
8383
type: 'custom',
84-
name: fn.name,
85-
description: fn.description,
86-
input_schema: fn.parameters,
84+
custom: {
85+
name: fn.name,
86+
description: fn.description,
87+
input_schema: fn.parameters,
88+
}
8789
}));
8890
}
8991

0 commit comments

Comments
 (0)