{"id":51464610,"url":"https://github.com/alfaoz/opencode-see-image","last_synced_at":"2026-07-06T09:31:48.379Z","repository":{"id":365754784,"uuid":"1273602869","full_name":"alfaoz/opencode-see-image","owner":"alfaoz","description":"give non-vision models the ability to see images by routing images to a vision capable model ","archived":false,"fork":false,"pushed_at":"2026-06-18T18:50:28.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-18T19:22:37.455Z","etag":null,"topics":["ai-agents","opencode-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alfaoz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-18T17:27:13.000Z","updated_at":"2026-06-18T18:50:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/alfaoz/opencode-see-image","commit_stats":null,"previous_names":["alfaoz/opencode-see-image"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/alfaoz/opencode-see-image","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfaoz%2Fopencode-see-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfaoz%2Fopencode-see-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfaoz%2Fopencode-see-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfaoz%2Fopencode-see-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alfaoz","download_url":"https://codeload.github.com/alfaoz/opencode-see-image/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfaoz%2Fopencode-see-image/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35185688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-06T02:00:07.184Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","opencode-plugin"],"created_at":"2026-07-06T09:31:47.701Z","updated_at":"2026-07-06T09:31:48.287Z","avatar_url":"https://github.com/alfaoz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# opencode-see-image\n\ngive non-vision opencode models the ability to see images and screenshots by routing them to a vision-capable model.\n\nwhen a user attaches a screenshot to a text-only model, opencode rejects it with an error. This plugin intercepts that flow by registering a `see_image` tool that sends the image to a vision model and returns a textual description the primary model can reason about.\n\n## install\n\n**one command (recommended):**\n```bash\nopencode plugin opencode-see-image --global\n```\nThis installs the package and adds it to your config. Then restart opencode.\n\n**edit config manually:**\n\nAdd the plugin to your opencode config:\n\n```jsonc\n// ~/.config/opencode/opencode.jsonc\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"plugin\": [\"opencode-see-image\"]\n}\n```\nThen restart opencode.\n\n## install via your agent (for some reason?)\n\nask your agent:\n```\ninstall the opencode-see-image plugin\n```\nit'll run `opencode plugin opencode-see-image --global` and tell you to restart. \n\n## prerequisites\n\nyou need a connected vision-capable provider. The plugin auto-detects whichever you have connected, **either of these work**:\n\n### free (OpenCode Zen)\n1. run `/connect` in opencode\n2. select **opencode** (OpenCode Zen)\n3. paste your API key from [opencode.ai/auth](https://opencode.ai/auth)\n\nthe plugin uses **mimo-v2.5-free** automatically — if you don't have an OpenCode Go sub, it skips the paid model entirely (no errors) and routes to the free model.\n\n### paid, w/ OpenCode Go\n1. run `/connect` in opencode\n2. select **opencode-go**\n3. paste your API key from [opencode.ai/auth](https://opencode.ai/auth)\n\nthe plugin prefers **minimax-m3** via opencode-go when available.\n\n### paid, w/ another provider\n\nset the `SEE_IMAGE_*` env vars to point at any Anthropic-Messages-compatible endpoint. see [Configuration](#configuration) below.\n\n**the resolve order:** explicit `SEE_IMAGE_API_KEY` env → configured `SEE_IMAGE_PROVIDER` → `opencode-go` (MiniMax M3) *if you have a Go sub connected* → `opencode` (mimo-v2.5-free). If no Go sub is connected, `opencode-go` is skipped so free users never hit a \"model not found\" error.\n\n## how the _eye surgery_ works\n\n```\nuser attaches screenshot\n        |\n        v\nopencode rejects it: 'this model does not support image input'\n        |      (the model only sees the filename)\n        v\nplugin's system-prompt instructions tell the model to call see_image\n        |\n        v\nsee_image tool:\n  1. queries opencode's SQLite DB for the image\n  2. falls back to filesystem search if not in DB\n  3. sends the image to the vision model via opencode's SDK\n  4. returns the textual description\n        |\n        v\nprimary model answers using the description\n```\n\n## the `see_image` tool\n\nthe plugin registers a `see_image` tool with two arguments:\n\n| arg | type | required? | description |\n|---|---|---|---|\n| `filePath` | string | y | path to the image. Absolute path, or a bare filename like `\"Screenshot 2026-06-18 at 17.32.24.png\"` to auto-locate. |\n| `question` | string | n | a specific question about the image. Defaults to a general detailed description. Use this to focus on a particular detail (e.g. `\"What error is shown in the terminal?\"`). |\n\nyour model calls this tool automatically when you attach a screenshot, you don't need to do anything special. The `question` arg is optional; the model uses it when you ask something specific about the image.\n\n## configuration\n\nall settings are env-var overrides. The plugin uses opencode's SDK client by default (handles auth automatically). Set `SEE_IMAGE_API_KEY` to bypass the SDK and call an HTTP endpoint directly.\n\n| env var | default | description |\n|---|---|---|\n| `SEE_IMAGE_MODEL` | `minimax-m3` | Vision model ID |\n| `SEE_IMAGE_PROVIDER` | `opencode-go` | Provider ID for SDK routing |\n| `SEE_IMAGE_API_KEY` | _(uses SDK)_ | Bypass SDK, call HTTP endpoint directly |\n| `SEE_IMAGE_ENDPOINT` | `https://opencode.ai/zen/go/v1/messages` | HTTP endpoint (only used if `SEE_IMAGE_API_KEY` is set) |\n| `SEE_IMAGE_API_VERSION` | `2023-06-01` | `anthropic-version` header (HTTP mode only) |\n| `SEE_IMAGE_USER_AGENT` | _(Chrome UA)_ | User-Agent header (HTTP mode only) |\n| `SEE_IMAGE_TIMEOUT` | `30000` | Per-candidate timeout in ms. Prevents hanging on slow models. |\n\n### using a different vision model\n\nany Anthropic-Messages-compatible endpoint works. for example, to use a direct MiniMax key:\n\n```bash\nexport SEE_IMAGE_ENDPOINT=\"https://api.minimax.io/v1/messages\"\nexport SEE_IMAGE_MODEL=\"minimax-m3\"\nexport SEE_IMAGE_API_KEY=\"your-minimax-key\"\n```\n\nto use a different opencode-go model (e.g. Kimi K2.7):\n\n```bash\nexport SEE_IMAGE_MODEL=\"kimi-k2.7-code\"\n```\n\n### verified vision-capable models\n\n**Free (OpenCode Zen):**\n\n| model | Notes |\n|---|---|\n| `mimo-v2.5-free` |  free. may be a bit slow. default fallback when only Zen is connected (routed via CLI). |\n| `big-pickle` | for some reason, big pickle works as an image capable model when called through the sdk w/ an active opencode go sub. |\n\n**paid (OpenCode Go):**\n\n| model | speed | notes |\n|---|---|---|\n| `minimax-m3` | ~3000ms | default. fast, clean, and accurate. |\n| `kimi-k2.7-code` | ~7000ms | clean and accurate. |\n| `kimi-k2.6` | ~12000ms | accurate but slow. |\n| `qwen3.7-plus` | ~15000ms | slow, spends a bit more tokens because of thinking. |\n\n## updating\n\n**auto-update (built in):** uses the opencode-plugin-update-kit and shows a toast: *\"opencode-see-image updated to X.Y.Z, restart opencode to apply\"*. You just need to restart opencode to load the new version.\n\n**manual update**:\n```bash\nopencode plugin opencode-see-image --force --global\n```\nthen restart opencode.\n\n**pin a version** in your config to opt out of auto-updates:\n```jsonc\n\"plugin\": [\"opencode-see-image@0.4.2\"]\n```\n\n## platform support\n\nworks on **macOS, Windows, and Linux**. The DB lookup is cross-platform; the filesystem fallback now searches per-platform screenshot locations (see below). The plugin probes several opencode data-dir locations so the DB and auth keys are found wherever opencode stored them.\n\n## file search locations\n\nwhen opencode rejects an image attachment, the model only receives a bare filename. `see_image` first checks the opencode DB (cross-platform), then falls back to searching these filesystem locations, in order:\n\n**macOS**\n1. `$TMPDIR/TemporaryItems/NSIRD_screencaptureui_*/` (where macOS stashes dragged screenshots)\n2. `$TMPDIR/TemporaryItems/`\n3. `~/Desktop`, `~/Downloads`, current working directory\n\n**Windows**\n1. `%TEMP%` / `%TMP%` (dragged/temp images)\n2. `%USERPROFILE%\\Pictures\\Screenshots` and the OneDrive-redirected `%USERPROFILE%\\OneDrive\\Pictures\\Screenshots` (Win+PrtScn / Snipping Tool)\n3. `%USERPROFILE%\\Pictures`\n4. `~\\Desktop`, `~\\Downloads`, current working directory\n\n**Linux**\n1. `$TMPDIR` / `/tmp`\n2. `~/Pictures/Screenshots`, `~/Pictures`\n3. `~/Desktop`, `~/Downloads`, current working directory\n\npass an absolute `filePath` to skip the search.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falfaoz%2Fopencode-see-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falfaoz%2Fopencode-see-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falfaoz%2Fopencode-see-image/lists"}