Skip to content

Commit 0708891

Browse files
committed
Fix Anthropic provider tool format to use custom type
1 parent a6b14f2 commit 0708891

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,10 @@ 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: 'function',
84-
function: {
85-
name: fn.name,
86-
description: fn.description,
87-
parameters: fn.parameters,
88-
}
83+
type: 'custom',
84+
name: fn.name,
85+
description: fn.description,
86+
input_schema: fn.parameters,
8987
}));
9088
}
9189

0 commit comments

Comments
 (0)