zot/packages
Raymond Gasper f41efbe21c fix(bedrock): handle ImageBlock in tool results and user messages
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.
2026-06-17 10:14:53 -04:00
..
agent feat(tui): apply .gitignore in both @-picker modes + add respect_gitignore toggle 2026-06-09 15:57:50 -04:00
core style: drop em-dashes from output-token-budget strings/comments 2026-06-09 18:38:09 +02:00
ignore refactor: honor .gitignore in recursive @-search instead of a hardcoded denylist 2026-06-09 15:54:23 -04:00
provider fix(bedrock): handle ImageBlock in tool results and user messages 2026-06-17 10:14:53 -04:00
tui Word-wrap provider error rows instead of truncating 2026-06-04 19:25:16 +02:00