Analysis updated 2026-06-24
Wire AgentRouter as a provider inside the OpenCode editor
Pick between deepseek v4 pro, deepseek v4 flash, and glm 5.1 from OpenCode
Run a local OpenAI-shape proxy on 127.0.0.1:4000 for other tools
Test AgentRouter endpoints with a curl command before wiring an editor
| fares-nosair/opencode-agentrouter-support | gugao-bug/openart-auto-register | idleprocesscc/co-reading-mcp | |
|---|---|---|---|
| Stars | 11 | 11 | 11 |
| Language | JavaScript | JavaScript | JavaScript |
| Setup difficulty | easy | hard | moderate |
| Complexity | 2/5 | 3/5 | 3/5 |
| Audience | developer | developer | general |
Figures from each repo's GitHub metadata at analysis time.
Needs Node 18+, an AgentRouter API key pasted into the script, and the opencode.jsonc placed in the right per-OS folder.
This project is a small local helper that lets the OpenCode app use AI models from a service called AgentRouter. OpenCode is a coding tool that expects to talk to AI providers through a specific kind of plugin called the openai compatible adapter. AgentRouter does offer an API in that style, but it does not plug directly into OpenCode. The repository solves the gap with a lightweight Node.js proxy that runs on your own machine and translates between the two. The way the README describes the flow, OpenCode sends a chat request to the proxy on http://127.0.0.1:4000, the proxy forwards it on to AgentRouter, and the streamed reply comes back through the proxy to OpenCode. The proxy is one JavaScript file, agenrouter_server.js, and the OpenCode side is configured by a single config file, opencode.jsonc. The README also includes an ASCII diagram showing this three step path. Setup needs Node.js version 18 or higher and an AgentRouter API key, which the README says has a free tier. You install three npm packages, express, cors, and openai, paste your API key into line 11 of the proxy script, then run the script with node agenrouter_server.js. The expected log line is AgentRouter proxy running on http://127.0.0.1:4000. The opencode.jsonc file goes into the OpenCode config directory, which on Windows is C colon backslash Users backslash your name backslash .opencode and on macOS or Linux is the tilde slash .opencode folder. Once running, you pick AgentRouter as the provider inside OpenCode and choose one of three models the config exposes: deepseek v4 pro, deepseek v4 flash, or glm 5.1. The README provides two curl commands to verify the proxy is up. Customization covers changing the port if 4000 is in use and updating the upstream API base URL if AgentRouter changes their endpoint. The project is released under the MIT license.
Local Node.js proxy that lets the OpenCode coding tool talk to AgentRouter models through an OpenAI-compatible adapter. Ships one server file and an opencode.jsonc config.
Mainly JavaScript. The stack also includes Node.js, Express, OpenAI.
MIT license, use freely in commercial and personal projects with attribution.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.