Skip to content

[FEATURE]:Pasted images use data: URL instead of file path, breaking MCP tools for non-vision models #14673

@zhengwh

Description

@zhengwh

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem

When pasting an image from clipboard, OpenCode stores it as a data: URL (base64).
This works for vision models (GLM-4.6V), but non-vision models (GLM-5) need to
call MCP tools (look_at, understand_image) which expect file paths, not data URLs.

Expected Behavior

Pasted images should be saved to a temp file, and the url field should contain
the file path so MCP tools can access them.

Workaround

Use @filename to reference files already in the working directory.

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)discussionUsed for feature requests, proposals, ideas, etc. Open discussion

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