Skip to content

Commit f7d2a62

Browse files
committed
Fix Anthropic provider tool format based on official examples
1 parent 0da2cc5 commit f7d2a62

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,9 @@ export class AnthropicProvider implements LLMProvider {
8080
// Add tools if provided
8181
if (functions && functions.length > 0) {
8282
(requestOptions as any).tools = functions.map(fn => ({
83-
type: 'custom',
84-
custom: {
85-
name: fn.name,
86-
description: fn.description,
87-
input_schema: fn.parameters,
88-
}
83+
name: fn.name,
84+
description: fn.description,
85+
input_schema: fn.parameters,
8986
}));
9087
}
9188

0 commit comments

Comments
 (0)