We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7947c7 commit be52e8aCopy full SHA for be52e8a
src/agent/src/Toolbox/StreamResult.php
@@ -33,8 +33,11 @@ public function getContent(): \Generator
33
if ($value instanceof ToolCallResult) {
34
$innerResult = ($this->handleToolCallsCallback)($value, Message::ofAssistant($streamedResult));
35
36
- $this->getMetadata()->set($innerResult->getMetadata()->all());
37
-
+ // Propagate metadata from inner result to this result
+ foreach ($innerResult->getMetadata()->all() as $key => $metadataValue) {
38
+ $this->getMetadata()->add($key, $metadataValue);
39
+ }
40
+
41
$content = $innerResult->getContent();
42
// Strings are iterable in PHP but yield from would iterate character-by-character.
43
// We need to yield the complete string as a single value to preserve streaming behavior.
0 commit comments