dsh-opencodeproxy is a DSH (dsh web) plugin for managing the local opencode-free-proxy service in the Settings page. The proxy itself automatically fetches the model list from the OpenCode Zen API (big-pickle + all models with the -free suffix). This plugin handles starting/stopping the service and displaying its status.
Basic Information¶
- Name: dsh-opencodeproxy
- Owner: infexpense
- Category: Networking Tools
- License: MIT
Core Features¶
- Start/Stop Proxy Service: Control the proxy process via a toggle in the Settings page.
- Start with DSH: If the toggle in the Settings page is enabled, the proxy service is automatically started when
dshstarts. - Auto Refresh Model List: After a successful start, automatically requests the proxy to refresh upstream models once.
- Manual Refresh Model List: Manually triggers the proxy refresh operation and displays the current models.
- Connectivity Test: Tests
/healthand/v1/modelsin sequence, showing latency and model count. - Take Over Existing Process: If a proxy is already running on the port and the toggle is turned on, it takes over the display without starting another instance.
Installation and Activation¶
Install the plugin using the command:
dsh plugin --profile web add /path/to/dsh-opencodeproxy
Typical Usage¶
Clone the repository and install:
git clone https://github.com/infexpense/dsh-opencodeproxy.git
dsh plugin --profile web add /path/to/dsh-opencodeproxy
dsh web
For local development, point directly to the workspace path:
dsh plugin --profile web add D:\DevTime\gloal-workspace\dsh-opencodeproxy
dsh web
Behavior Details and Precautions¶
- Dependency Handling: The plugin depends on
@deepseek-ai/schemastery. Thenode_modules/@deepseek-ai/schemasteryin the source directory is a directory junction pointing to the actual package inside the profile. Deleting it will cause the plugin to fail to load whendshstarts. - External Proxy Management: Stopping a proxy started externally requires reading the admin key from
api-keys.jsonin the proxy directory. - Startup Delay: After the proxy process starts, it takes a few seconds to fetch upstream models. During this time,
/v1/modelsreturns a fallback list and is automatically updated to the live list later. - Automatic Restart: The proxy directory (default
D:\DevTime\gloal-workspace\opencode-free-proxy) and port (default6446) are configurable. Changing the configuration automatically restarts the service. - Code Changes: After modifying
lib/index.js, restartdsh web.