From ef66c22127b68300f59ef01387438f49385e8d43 Mon Sep 17 00:00:00 2001 From: ferenci84 Date: Tue, 4 Mar 2025 09:54:05 +0100 Subject: [PATCH] add reasoning option to Anthropic class constructor --- core/llm/llms/Anthropic.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/llm/llms/Anthropic.ts b/core/llm/llms/Anthropic.ts index bdbd67639..a7b055c27 100644 --- a/core/llm/llms/Anthropic.ts +++ b/core/llm/llms/Anthropic.ts @@ -30,6 +30,10 @@ class Anthropic extends BaseLLM { description: tool.function.description, input_schema: tool.function.parameters, })), + thinking: options.reasoning ? { + type: "enabled", + budget_tokens: options.reasoningBudgetTokens, + } : undefined, tool_choice: options.toolChoice ? { type: "tool",