Skip to content

Commit efb53b2

Browse files
committed
Fix Anthropic tool format to match SDK examples
1 parent 3595d1f commit efb53b2

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
const 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
console.log('Tools for Anthropic:', JSON.stringify(tools, null, 2));
9188
(requestOptions as any).tools = tools;

0 commit comments

Comments
 (0)