Error when attempting to read TGA file #7583

Open
opened 2026-02-16 18:07:39 -05:00 by yindo · 1 comment
Owner

Originally created by @zaidka on GitHub (Jan 25, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

I get the following error when the agent attempts to read a .tga file:

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'

Strangely, I can only observe it happening when using one of the Anthropic models (e.g. Opus 4.5, Sonnet 4.5). Can't reproduce the issue with other models like Devstral Small 2.

Plugins

None

OpenCode version

1.1.36

Steps to reproduce

Simply ask the agent "Read the file example.tga" where example.tga is a valid TGA file.

Screenshot and/or share link

Image

Operating System

Fedora 43

Terminal

ptyxis

Originally created by @zaidka on GitHub (Jan 25, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description I get the following error when the agent attempts to read a .tga file: > 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' Strangely, I can only observe it happening when using one of the Anthropic models (e.g. Opus 4.5, Sonnet 4.5). Can't reproduce the issue with other models like Devstral Small 2. ### Plugins None ### OpenCode version 1.1.36 ### Steps to reproduce Simply ask the agent "Read the file example.tga" where example.tga is a valid TGA file. ### Screenshot and/or share link <img width="934" height="412" alt="Image" src="https://github.com/user-attachments/assets/a90a3964-9305-48dd-841d-10011f75dda8" /> ### Operating System Fedora 43 ### Terminal ptyxis
yindo added the bug label 2026-02-16 18:07:39 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 25, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #9785: Issue with Editor crashing when encountering .ico favicon file (same media_type validation error)
  • #9210: Reading .fbs files fails with unsupported image mime type error (same root cause - invalid media types for vision models)
  • #9512: Trying to read an invalid image file bricks the session (related image format validation issue)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 25, 2026): This issue might be a duplicate of existing issues. Please check: - #9785: Issue with Editor crashing when encountering .ico favicon file (same media_type validation error) - #9210: Reading .fbs files fails with unsupported image mime type error (same root cause - invalid media types for vision models) - #9512: Trying to read an invalid image file bricks the session (related image format validation issue) Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7583