Skip to content

No empty text block beside an image (Anthropic refused the request) - #28

Merged
ayman3000 merged 1 commit into
mainfrom
image-only-messages
Oct 17, 2026
Merged

ayman3000 merged 1 commit into
mainfrom
image-only-messages

Conversation

@ayman3000

Copy link
Copy Markdown
Owner

Image-only user messages and screenshot-only tool results no longer carry an empty text block (Anthropic 400). Tests added; 81 pass.

🤖 Generated with Claude Code

A pasted image with no words, or a tool result that is only a screenshot,
sent an empty text block; Anthropic answers 'text content blocks must be
non-empty'. The block is now left out (and an empty tool_result has no
content). OpenAI gets the same rule; Gemini already had it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ayman3000
ayman3000 merged commit ad373f9 into main Oct 17, 2026
@ayman3000
ayman3000 deleted the image-only-messages branch October 17, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant