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

  1. Start/Stop Proxy Service: Control the proxy process via a toggle in the Settings page.
  2. Start with DSH: If the toggle in the Settings page is enabled, the proxy service is automatically started when dsh starts.
  3. Auto Refresh Model List: After a successful start, automatically requests the proxy to refresh upstream models once.
  4. Manual Refresh Model List: Manually triggers the proxy refresh operation and displays the current models.
  5. Connectivity Test: Tests /health and /v1/models in sequence, showing latency and model count.
  6. 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. The node_modules/@deepseek-ai/schemastery in 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 when dsh starts.
  • External Proxy Management: Stopping a proxy started externally requires reading the admin key from api-keys.json in the proxy directory.
  • Startup Delay: After the proxy process starts, it takes a few seconds to fetch upstream models. During this time, /v1/models returns 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 (default 6446) are configurable. Changing the configuration automatically restarts the service.
  • Code Changes: After modifying lib/index.js, restart dsh web.