[PR #10426] fix: pdf attachment handling in tool parts for anthropic models #13434

Open
opened 2026-02-16 18:18:17 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/10426

State: open
Merged: No


What does this PR do?

Fixes PDF attachment handling for Anthropic models by relocating PDF attachments from tool results to the preceding user message. This works around Anthropic's limitation where PDFs cannot be included in tool results.

How did you verify your code works?

Verified running long session with multiple pdf reads in them

#10294

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/10426 **State:** open **Merged:** No --- ### What does this PR do? Fixes PDF attachment handling for Anthropic models by relocating PDF attachments from tool results to the preceding user message. This works around Anthropic's limitation where PDFs cannot be included in tool results. ### How did you verify your code works? Verified running long session with multiple pdf reads in them #10294
yindo added the pull-request label 2026-02-16 18:18:17 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13434