DSH Connect Qoder: Accessing Qoder Models and Account Management

DeepSeek Harness (DSH) supports a rich ecosystem of model integrations via its plugin mechanism. Since Tongyi Lingma (Qoder) does not officially provide OpenAI-compatible endpoints, this plugin enables model access for DSH by directly connecting to Qoder’s cosy gateway. Additionally, it introduces features such as an account pool, daily check-ins, credit reading, and model management.

Core Features

Dual-Provider Parallel Access

The plugin supports both the China and International versions of the provider, registered as qoder and qoder-global respectively.
* China Version: Uses gateway.qoder.com.cn.
* International Version: Uses api1.qoder.sh.
Models from regions with configured PATs will appear in the DSH model selector. Models from both regions can coexist, allowing for independent selection in different sessions.

Account Pool & PAT Management

  • Multi-Account Pool: Supports multiple PATs. The plugin automatically deduplicates and merges credentials from settings, environment variables, and the local vault.
  • Auto-Switching: When enabled, the plugin automatically selects an account based on real-time availability, credit expiration, and balance rules. It also auto-switches and retries upon request failure.
  • Import/Export: Supports exporting and importing account pool configurations by region.

Model Management & Credits

  • Model Management: Refreshes the upstream model catalog, allowing individual enablement or disabling of models. The model list displays credit multipliers, context limits, and thinking intensity.
  • Availability Testing: Each model row provides a test button to verify availability by sending a real request (this consumes a small amount of credits).
  • Credit Reading: Read-only display of remaining credits and credit pack expiration dates for each account; supports one-click daily check-in.
  • Security Isolation: Uses a secure loopback shim; PATs interact with pi-ai only locally and are not sent outside the gateway.

Installation & Activation

Install from the release package (Recommended):

# Desktop profile
dsh plugin --profile desktop add @dmh2002/dsh-connect-qoder

# Web profile
dsh plugin --profile web add @dmh2002/dsh-connect-qoder

After installation, restart the DSH process for the corresponding profile to load the plugin.

Configuration

Create PAT

Create a Personal Access Token (starting with pt-…) in your Qoder account settings.

Add Credentials

The plugin settings card provides an entry point for adding PATs, taking precedence over environment variables.
* China Version: Setting regions.cn.pat, Environment Variable QODERCN_PERSONAL_ACCESS_TOKEN.
* International Version: Setting regions.global.pat, Environment Variable QODER_PERSONAL_ACCESS_TOKEN.

After adding the PAT, click “Refresh from Qoder” on the model management page to list available models.

How It Works

The plugin integrates internally within DSH via PiAiAdapter. The architecture is as follows:

DSH PiAiAdapter
  -> Secure loopback shim (local random port + in-process secret)
  -> QoderUpstreamClient (minimal client for cosy protocol)
  -> China Version https://gateway.qoder.com.cn/algo/api/v2/...
  -> International Version https://api1.qoder.sh/algo/api/v2/...
  -> Qoder SSE (OpenAI-shaped deltas)
  -> DSH executes tools locally and returns results

The PAT is used only once to obtain a jobToken; subsequent requests carry the cosy bearer and machine fingerprint. The PAT does not enter pi-ai and is not written to the Qoder desktop login files.

Notes

  • Security: PATs are stored only in local plugin configuration and are not transmitted externally.
  • International Version Limitations: The International version requires support from the device risk control components of the local Qoder client.
  • Test Consumption: Model availability tests send real requests, consuming a small amount of upstream quota.
  • Error Handling: The plugin accurately categorizes errors such as invalid credentials, content moderation rejections, and exhausted quotas.
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye