Skip to content

[FEATURE]: Add RapidOCR-json support — reading image text into the model when it can't see imagesI come from CHINA! I solution OPENCODE'S EYE problem, you can use RapidOCR-json, let bigpickle model (LLM) takes the picture's words!! #46785

Closed as not planned

Description

@27201904hui

Problem

OpenCode refuses images for models that don't support image input, e.g. "Cannot read image.png ... this model does not support image input". Users who rely on text-only LLMs (like bigpickle) can't share screenshots of errors, logs, or documents.

Proposed solution

Integrate the local, offline RapidOCR-json engine as an optional image-to-text step:

  • When a user attaches an image and the active model doesn't accept vision, run RapidOCR-json locally to extract the text.
  • Replace the image part with that extracted text before sending to the model, so text-only models can still read image content.
  • Fall back gracefully if no OCR engine is installed or recognition fails (vision models keep receiving the image unchanged).

Expected behavior

A user can paste a screenshot and, on a non-vision model, receive a reply based on the text read from the image — with no network and no image data sent to the provider.

Environment

  • Windows, OCR engine: RapidOCR-json (offline, RapidOcrOnnx based)
  • Region/backends: local text-only LLM (bigpickle)words!!

Activity

  1. 27201904hui commented on Sep 2, 2026

    @27201904hui
    Author
  2. 27201904hui commented on Sep 2, 2026

    @27201904hui
    Author
  3. 27201904hui commented on Sep 2, 2026

    @27201904hui
    Author

    OC MODIFY BY ME! SET UP “eyes” HE can read the debug message from picture!

    Image
  4. changed the title [-]I come from CHINA! I solution OPENCODE'S EYE problem, you can use RapidOCR-json, let bigpickle model (LLM) takes the picture's words!![/-] [+][FEATURE]: Add RapidOCR-json support — reading image text into the model when it can't see imagesI come from CHINA! I solution OPENCODE'S EYE problem, you can use RapidOCR-json, let bigpickle model (LLM) takes the picture's words!![/+] on Sep 2, 2026
  5. github-actions commented on Sep 2, 2026

    @github-actions
    Contributor

    Thanks for updating the issue! The title now has the [FEATURE]: prefix and the description clearly explains the problem, proposed solution, and expected behavior. This issue is now compliant with our contributing guidelines.

  6. neriousy commented on Oct 21, 2026

    @neriousy
    Member

    Thanks for sharing this, and nice work getting it running in your own build! We'd rather not bundle an OCR engine into opencode. You can get the same result without changing opencode: wrap RapidOCR-json in an MCP server that exposes an ocr tool (https://opencode.ai/v2/docs/mcp-servers), save the screenshot to a file, and ask the text-only model to run OCR on that path. If you want images rewritten automatically before they reach the model, that's a job for a plugin (https://opencode.ai/v2/docs/plugins). Closing as not planned.

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