Skip to content

[FEATURE]:Expose image file path alongside [image] placeholder so non-vision models can use MCP vision tools #31221

Closed as duplicate

Description

@wha7ev9r

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

What do you want to change or add?
Currently, when pasting an image (or even an image file path) into OpenCode, it gets converted to an [image] placeholder. For vision-capable models this works great — they can directly interpret the image. However, for text-only models (e.g., deepseek-v4-pro), the [image] placeholder is opaque and contains no referenceable file path.
Many users pair text-only models with external MCP vision tools (like agent-vision which accepts a local file path / URL) to analyze images. Without the actual file path, these models have no way to access the pasted image.

Proposed solution
When an image is pasted and stored to a temp location, expose that file path to the model in the message context, e.g.:
[image: C:\Users...\AppData\Local\Temp\opencode\paste-20250607-xxxxx.png]

Benefits

  • Enables text-only models to leverage MCP vision tools for image analysis
  • Gives users more flexibility in model choice without sacrificing image input capability
  • Low implementation cost — it's mainly about exposing the temp path that already exists under the hood

Workaround today
Manually type out the absolute file path in chat instead of pasting it, so the AI receives the raw text path.

Activity

  1. github-actions commented on Jun 7, 2026

    @github-actions
    Contributor

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

    If your request is already covered by one of those, please add a comment or reaction there rather than opening a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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