Skip to content

[BUG] preview_screenshot crashes the turn with "Invalid image_url" on vision-capable models #977

Description

@youlianvr

On a vision-capable model (ChatGPT-5.6 Luna/Mimo), calling preview_screenshot crashes the turn
with an invalid image payload. The screenshot tool itself returns "ok", but the image attached
to the model request is not a valid base64 data URL:

⚠️ Provider returned error [OpenAI: { "error": { "message":
"Invalid 'input[126].content[0].image_url'. Expected a base64-encoded data URL with an image
MIME type (e.g. 'data:image/png;base64,...'), but got an invalid base64-encoded value.",
"type": "invalid_request_error", "param": "input[126].content[0].image_url",
"code": "invalid_value" } }]

Key observation

  • The crash happens ONLY on models that DO support vision
  • Text-only models are NOT affected: the orchestrator does not attach the screenshot to them,
    so there is nothing to reject.
  • Conclusion: the bug is in the screenshot pipeline (binary → base64 encoding / transport).

Steps to reproduce

  1. Start a conversation on a vision-capable model (e.g. ChatGPT-5.6 Luna/Mimo 2.5).
    Then the agent should:
  2. Register a preview (htmlPath or url+pid).
  3. Call preview_screenshot.

  1. The tool returns "ok", but the next model turn fails with the invalid image_url error above.
  2. Repeats on every retry in this session.

Environment

  • OS: Windows 11 LTSC IoT Enterprise
  • Freebuff Desktop 0.55
  • Preview feature: register_preview + preview_screenshot
  • Affected model: ChatGPT-5.6 Luna/Mimo-2.5. Text-only models unaffected.

I used Freebuff to help me write this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions