npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-minimax-easy-vision

v1.2.3

Published

OpenCode plugin that enables vision support for Minimax models by saving pasted images and injecting MCP tool instructions

Readme

Opencode MiniMax Easy Vision

MiniMax Easy Vision is a plugin for OpenCode that enables vision support for models that lack native image attachment support.

Originally built for MiniMax models, it can be configured to work with any model that requires MCP-based image handling.

It restores the "paste and ask" workflow by automatically saving image assets and routing them through the MiniMax Coding Plan MCP

Table of Contents

Demo

See how it works:

https://github.com/user-attachments/assets/df396c6c-6fa8-46b8-8984-c003ecf1c12c

https://github.com/user-attachments/assets/826f90ea-913f-427e-ace8-0b711302c497

The Problem

When using MiniMax models (like MiniMax M2.1) in OpenCode, native image attachments aren't supported.

These models expect the MiniMax Coding Plan MCP's understand_image tool, which requires an explicit file path. This breaks the normal flow:

  • Ignored images: Pasted images are simply ignored by the model.
  • Manual steps: You have to save screenshots manually, find the path, and reference it in your prompt.
  • Broken flow: The "paste and ask" experience available with Claude or GPT models is lost.

Prerequisites

The MiniMax Coding Plan MCP server must be configured in your opencode.json:

{
  "mcp": {
    "MiniMax": {
      "command": "uvx",
      "args": ["minimax-coding-plan-mcp"],
      "env": {
        "MINIMAX_API_KEY": "your-api-key-here",
        "MINIMAX_API_HOST": "https://api.minimax.io"
      }
    }
  }
}

Installation

Via npm

Just add the plugin to the plugin array in your opencode.json file:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["opencode-minimax-easy-vision"]
}

From Local Source

  1. Clone the repository.
  2. Build the plugin:
    npm install && npm run build
  3. Copy the built dist/index.js into your OpenCode plugin directory.

What This Plugin Does

This plugin automates the vision pipeline so you don't have to think about it.

How it works:

  1. Detects when a configured model is active.
  2. Intercepts images pasted into the chat.
  3. Saves them to a temporary local directory.
  4. Injects the necessary context for the model to invoke the understand_image tool with the correct path.

Result: You just paste the image and ask your question just like how you do with Claude or GPT models. The plugin handles the rest.

Supported Models

By default, the plugin activates for MiniMax models:

  • Provider ID containing minimax
  • Model ID containing minimax or abab

Examples:

  • minimax/minimax-m2.1
  • minimax/abab6.5s-chat

Custom Model Configuration

You can enable this for other models by creating a config file.

Locations (Priority Order)

  1. Project level: .opencode/opencode-minimax-easy-vision.json
  2. User level: ~/.config/opencode/opencode-minimax-easy-vision.json

Config Format

{
  "models": ["minimax/*", "opencode/*", "*/glm-4.7-free"]
}

Pattern Syntax

| Pattern | Matches | | ---------------- | --------------------------------------- | | * | Match ALL models | | minimax/* | All models from the minimax provider | | */glm-4.7-free | Specific model from any provider | | opencode/* | All models from the opencode provider | | */abab* | Any model containing abab |

Wildcard Rules

  • *suffix matches values ending with suffix
  • prefix* matches values starting with prefix
  • * matches everything
  • *text* matches values containing text

If the config is missing or empty, it defaults to MiniMax-only behavior.

Configuration Examples

Enable for all models:

{
  "models": ["*"]
}

Specific providers:

{
  "models": ["minimax/*", "opencode/*", "google/*"]
}

Mix of providers and models:

{
  "models": ["minimax/*", "opencode/gpt-5-nano", "*/claude-3-7-sonnet*"]
}

Custom Image Analysis Tool

By default, the plugin uses the mcp_minimax_understand_image tool from the MiniMax Coding Plan MCP. You can configure a different tool for image analysis:

{
  "models": ["*"],
  "imageAnalysisTool": "mcp_openrouter_analyze_image"
}

[!NOTE] The imageAnalysisTool value is the tool name, not the MCP server name.

MCP servers expose one or more tools—for example, the MiniMax Coding Plan MCP server exposes the mcp_minimax_understand_image tool.

This allows you to use tools from other MCP servers that provide image analysis capabilities, such as:

The plugin will instruct the model to use the configured tool. The tool should accept an image file path as input.

Supported Image Formats

  • PNG
  • JPEG
  • WebP

(Limited by the MiniMax Coding Plan MCP understand_image tool.)

Usage

  1. Select a supported model in OpenCode.
  2. Paste an image (Cmd+V / Ctrl+V).
  3. Ask a question about it, just like how you do for other models with native vision support.

Example Interaction

You: [pasted screenshot] Why is this failing?

Model: I'll check the image using the understand_image tool. [Calls mcp_minimax_understand_image path="/tmp/xyz.png"]

Model: The error suggests a syntax error on line 12.

Development

npm install
npm run build

The built plugin will be available at dist/index.js

License

AGPL-3.0. See LICENSE

References