Skip to content

fix(media): normalize ICO images to PNG#2540

Open
lihailong00 wants to merge 1 commit into
MoonshotAI:mainfrom
lihailong00:codex/issue-2367-ico-media
Open

fix(media): normalize ICO images to PNG#2540
lihailong00 wants to merge 1 commit into
MoonshotAI:mainfrom
lihailong00:codex/issue-2367-ico-media

Conversation

@lihailong00

@lihailong00 lihailong00 commented Jul 23, 2026

Copy link
Copy Markdown

Summary

  • normalize ICO image payloads to PNG before sending them to the model
  • preserve the original MIME type, byte length, and dimensions in the user-facing metadata
  • leave all other image formats unchanged

Reproduction and verification

Before the fix, the regression test deterministically produced a data:image/x-icon;base64 model payload. After the fix:

  • uv run pytest tests/tools/test_read_media_file.py -q — 7 passed
  • targeted Ruff check — passed
  • targeted Pyright — 0 errors

Closes #2367


Open in Devin Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

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.

LLM provider error: Error code: 400

1 participant