mirror of
https://github.com/patriceckhart/zot.git
synced 2026-06-27 05:46:34 +02:00
The read tool wraps image data in a ToolResultBlock. The Bedrock buildRequest serialiser only handled TextBlock in toolResult inner content, so ImageBlock was silently dropped, leaving Bedrock an empty content array which it rejects with HTTP 500. Fix: - Add case ImageBlock in the ToolResultBlock inner-content loop, serialising to Bedrock's native image wire format (image.format + image.source.bytes as base64). - Add case ImageBlock for top-level user message content blocks (belt-and-suspenders: covers images attached directly by the user). - Add encoding/base64 import. Both paths reuse anthShrinkImageBytesIfTooBig to stay within Bedrock's per-image dimension limits. Tests: TestBedrockBuildRequestImageBlock and TestBedrockBuildRequestImageInToolResult reproduce both failure modes. |
||
|---|---|---|
| .. | ||
| agent | ||
| core | ||
| ignore | ||
| provider | ||
| tui | ||