feat: Add parallel tool call streaming for anthropic [LET-4601] (#5225)

* wip

* Fix parallel tool calling interface

* wip

* wip adapt using id field

* Integrate new multi tool return schemas into parallel tool calling

* Remove example script

* Reset changes to llm stream adapter since old agent loop should not enable parallel tool calling

* Clean up fallback logic for extracting tool calls

* Remove redundant check

* Simplify logic

* Clean up logic in handle ai response

* Fix tests

* Write anthropic dict conversion to be back compatible

* wip

* Double write tool call id for legacy reasons

* Fix override args failures

* Patch for approvals

* Revert comments

* Remove extraneous prints
This commit is contained in:
Matthew Zhou
2025-10-10 15:16:08 -07:00
committed by Caren Thomas
parent 1c285f5170
commit bb8a7889e0
6 changed files with 563 additions and 310 deletions

View File

@@ -1514,6 +1514,7 @@ class Message(BaseMessage):
}
],
}
else:
raise ValueError(self.role)