opencode-minimax-websearch
v0.1.2
Published
OpenCode plugin: web_search backed by the MiniMax Token Plan API.
Maintainers
Readme
opencode-minimax-websearch
OpenCode plugin that adds one tool backed by the MiniMax Token Plan API:
web_search— search the web for up-to-date information
Zero npm runtime dependencies. Pure Node built-ins.
Install
git clone https://github.com/Changhochien/opencode-minimax-websearch ~/.config/opencode/plugins/minimaxOr symlink:
git clone https://github.com/Changhochien/opencode-minimax-websearch /tmp/opencode-minimax-websearch
ln -s /tmp/opencode-minimax-websearch ~/.config/opencode/plugins/minimaxOpenCode auto-loads any .ts/.js file under ~/.config/opencode/plugins/.
Configuration
Add a minimax block to your opencode.json (project or ~/.config/opencode/opencode.json):
{
"minimax": {
"apiKey": "sk-xxxxxxxxxxxx",
"host": "https://api.minimax.io"
}
}apiKey— required. Get one at https://platform.minimax.io/subscribe/token-planhost— optional. Defaults tohttps://api.minimax.io(global). Usehttps://api.minimaxi.comfor China.
Env var fallback (for CI):
export MINIMAX_API_KEY=sk-xxxxxxxxxxxx
export MINIMAX_HOST=https://api.minimax.ioTools
web_search
web_search({
query: "Python 3.13 release date",
related: true // optional
})Returns a numbered list of {title, url, snippet}. With related: true, appends a Related: … line of suggested follow-up queries.
Why a plugin instead of MCP?
- No server prefix on tool names (
web_searchvs.minimax.web_search) - No MCP protocol/handshake overhead per turn
- One schema format (Zod) consumed directly by OpenCode
- ~200 fewer tokens of fixed overhead per request vs. an MCP wrapper
Development
bun install
bun run typecheckThe plugin is loaded directly from plugins/minimax.ts by OpenCode, so no build step is required.
Related
- websearch-and-image-understanding-using-minimax — the original pi-coding-agent extension this was adapted from.
