Skip to content

v1.4.3

Choose a tag to compare

@dalehurley dalehurley released this 05 Feb 21:20
· 7 commits to master since this release

Bug Fix: Always Add tool_results After tool_use

Removes the if (! empty($toolResults)) guard that could skip adding a tool_result message after the assistant's tool_use blocks. The Anthropic API requires every tool_use block to have a corresponding tool_result in the immediately following user message — skipping it leaves the conversation in an invalid state.

Changes

  • ReactLoop — always add tool_results message
  • ReflectionLoop — same fix in both generate() and refine() methods
  • PlanExecuteLoop — same fix in executeStep()
  • StreamingLoop — same fix

Full Changelog

v1.4.2...v1.4.3