This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

thinking

+6 -1
+6 -1
src/runner/anthropic.ts
··· 431 431 432 432 if (request.tools.length > 0 && request.tool_choice !== "none") { 433 433 body.tools = toAnthropicTools(request.tools) 434 - const tc = toAnthropicToolChoice(request.tool_choice) 434 + let tc = toAnthropicToolChoice(request.tool_choice) 435 + // Anthropic rejects tool_choice 'any' when thinking is enabled. 436 + if (tc && (tc as unknown as { type: string }).type === "any" && ENABLE_THINKING) { 437 + console.warn("[anthropic] tool_choice='any' is incompatible with thinking; downgrading to 'auto'") 438 + tc = { type: "auto" } 439 + } 435 440 if (tc) body.tool_choice = tc 436 441 } 437 442