Skip to content

feat(compose): unify FunctionToolResult with Blocks#968

Merged
JonXSnow merged 1 commit intoalpha/09from
feat/agentic-tools-multimodal
Apr 27, 2026
Merged

feat(compose): unify FunctionToolResult with Blocks#968
JonXSnow merged 1 commit intoalpha/09from
feat/agentic-tools-multimodal

Conversation

@JonXSnow
Copy link
Copy Markdown
Contributor

  • Add ContentBlocks field to FunctionToolResult for multimodal output
  • Convert MessageInputPart (image/audio/video/file) to ContentBlock in toolMessageToAgenticMessage for both sync and stream paths
  • Add messageInputPartsToContentBlocks helper and derefString utility

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 15, 2026

Codecov Report

❌ Patch coverage is 81.43713% with 31 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (alpha/09@28a9142). Learn more about missing BASE report.

Files with missing lines Patch % Lines
schema/tool.go 71.64% 17 Missing and 2 partials ⚠️
schema/agentic_message.go 47.82% 11 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             alpha/09     #968   +/-   ##
===========================================
  Coverage            ?   82.63%           
===========================================
  Files               ?      161           
  Lines               ?    21695           
  Branches            ?        0           
===========================================
  Hits                ?    17927           
  Misses              ?     2542           
  Partials            ?     1226           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shentongmartin shentongmartin added C-enhancement Category: This is a PR that adds a new feature or fixes a bug. D-compose Domain: this issue relates to eino's compose package labels Apr 20, 2026
@JonXSnow JonXSnow force-pushed the feat/agentic-tools-multimodal branch 2 times, most recently from 3f014e3 to cc7c167 Compare April 27, 2026 07:10
Comment thread schema/agentic_message.go
Comment thread schema/agentic_message.go Outdated
@JonXSnow JonXSnow force-pushed the feat/agentic-tools-multimodal branch 2 times, most recently from 6e9e9b2 to 727ec8c Compare April 27, 2026 09:15
@JonXSnow JonXSnow changed the title feat(compose): support multimodal content in tool results feat(schema,compose): unify FunctionToolResult with Blocks Apr 27, 2026
@JonXSnow JonXSnow changed the title feat(schema,compose): unify FunctionToolResult with Blocks feat(compose): unify FunctionToolResult with Blocks Apr 27, 2026
Replace FunctionToolResult.Result string field with Blocks
[]*FunctionToolResultBlock to uniformly represent all tool results
(text-only and multimodal) as structured content blocks.

- Add FunctionToolResultBlock type supporting text, image, audio,
  video, and file content with String() method
- Remove FunctionToolResult.Result field; text results are now
  wrapped as FunctionToolResultBlock{Text: ...}
- Update FunctionToolResultAgenticMessage to accept blocks parameter
- Convert MessageInputPart to FunctionToolResultBlock in compose layer
- Update concatFunctionToolResults to merge via Blocks append
- Add comprehensive tests for multimodal and streaming tool results
@JonXSnow JonXSnow force-pushed the feat/agentic-tools-multimodal branch from 727ec8c to 3b2cd0b Compare April 27, 2026 09:22
@JonXSnow JonXSnow merged commit d4a9e3b into alpha/09 Apr 27, 2026
16 checks passed
@JonXSnow JonXSnow deleted the feat/agentic-tools-multimodal branch April 27, 2026 11:24
shentongmartin pushed a commit that referenced this pull request Apr 28, 2026
Replace FunctionToolResult.Result string field with Blocks
[]*FunctionToolResultBlock to uniformly represent all tool results
(text-only and multimodal) as structured content blocks.

- Add FunctionToolResultBlock type supporting text, image, audio,
  video, and file content with String() method
- Remove FunctionToolResult.Result field; text results are now
  wrapped as FunctionToolResultBlock{Text: ...}
- Update FunctionToolResultAgenticMessage to accept blocks parameter
- Convert MessageInputPart to FunctionToolResultBlock in compose layer
- Update concatFunctionToolResults to merge via Blocks append
- Add comprehensive tests for multimodal and streaming tool results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-enhancement Category: This is a PR that adds a new feature or fixes a bug. D-compose Domain: this issue relates to eino's compose package

Development

Successfully merging this pull request may close these issues.

2 participants