Skip to content

Bad request ... input should be image/jpeg ... #23990

@FlominatorTM

Description

@FlominatorTM

Description

Bad Request: messages.2.content.0.tool_result.content.1.image.source.base64.media_type: Input should be 'image/jpeg', 'image/png', 'image/gif' or 'image/webp'

Plugins

No response

OpenCode version

1.14.21
1.14.22

Steps to reproduce

  1. Ask to update something in the spec of a custom image format
  2. the spec file is read
  3. message Bad Request: messages.2.content.0.tool_result.content.1.image.source.base64.media_type: Input should be 'image/jpeg', 'image/png', 'image/gif' or 'image/webp'appears using Claude Sonnet 4.6 (but similar error messages also come with Gemini/ChatGPT, while Big Pickle seems to work)

I've updated to the latest version and I've added explicitly to agents.md not to send, retrieve ety. any images

Screenshot and/or share link

Error Slaude Sonnet 4.6:
Image

Error ChatGPT:

Image

Operating System

Win11 25H2

Terminal

Windows Terminal

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)windows

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions