dsh-connect-trae-plus: Local Trae Model Integration and Hardening Branch

Foreword

DeepSeek Harness (DSH) follows the philosophy that “everything is a plugin,” making the integration of local models into the workflow a common requirement. When the upstream plugin dsh-connect-trae encounters issues with the local Trae environment (such as not being installed, not logged in, or port unavailability), a failure in the loopback shim binding causes the Harness startup to fail. This manifests as a fatal load failure, effectively blocking the entire workflow.

dsh-connect-trae-plus is a hardened fork of the upstream v2.0.4, maintained by HaydenSmith1121. It retains the protocol, credential handling, and region-splitting logic on the Trae side, fixing only the startup stability issues. This plugin connects a locally logged-in Trae model (supporting both domestic and international versions) to DSH and provides a read-only usage overview and model management interface.

Core Features

This plugin provides dual-supplier parallel access within DSH, optimized for region isolation:

  1. Dual-Supplier Parallel Access: The domestic version is registered as trae, and the international version as trae-global. The two suppliers run independently without interfering with each other and can be used simultaneously in different sessions.
  2. Plugin Card Tab Switching: The settings card supports independent management for the domestic/international versions. Each Tab has independent account selection, directory, checkmark status, and context budget; switching does not affect the runtime state of the other side.
  3. Rate Multiplier in Model Names: Model names display credit multipliers according to the Trae menu format (e.g., GLM-5.2 · x0.79), updating automatically after refreshing the directory.
  4. DSH Local Tool Loop: It retrieves structured tool_calls via Trae’s llm_utils_chat. DSH locally executes tools such as bash, read, and write, and then returns the results to the model.
  5. Secure Loopback Shim: Each region uses an independent random port and in-process secret, ensuring that the real Trae Token is not handed directly to pi-ai.
  6. Read-Only Usage & Model Management: The domestic version allows viewing Work Credits and General Credits, while the international version allows viewing subscription status. These queries are read-only and do not consume quota.

Model Coverage

The plugin currently provides models from the Trae SOLO channel, such as DeepSeek-V4-Flash-Official, GLM-5.3, and Qwen3.8-Max.

The following 4 models currently come from the TraeCode (Trae IDE) channel and have not yet been opened to the SOLO channel; therefore, this plugin does not support them at this time:

  • deepseek-v4.1-flash
  • glm-5.3-flash
  • kimi-k2.8-preview
  • qwen3.8-flash

Installation and Activation

It is recommended to install the plugin using the DSH plugin command. After installing, updating, or uninstalling the bundle, you must restart the corresponding DSH process.

dsh plugin --profile desktop add dsh-connect-trae

Use Cases and Notes

  • Scenarios: When you need to use local Trae models for tool calling within DSH, or need to monitor the credit/subscription status of a Trae account.
  • Permissions & Isolation: The plugin runs with the permissions of the current DSH process. Tokens are not written to DSH settings but are stored in a local encrypted directory.
  • Windows Limitations: Windows does not have sqlite3 installed by default; Raw Chat capability detection will fail and safely fall back. Raw Chat is disabled by default and does not affect the main workflow.
  • Branch Maintenance: This is a hardened branch. If you do not need fault-tolerant hardening, you can use the upstream package; if the upstream adopts equivalent fixes, this branch should be retired.

Conclusion

dsh-connect-trae-plus solves the issue where the upstream plugin prevents the Harness from starting when the environment is abnormal, while maintaining compatibility with the official Trae protocol. Through dual-region parallel management and secure isolation mechanisms, it provides stable infrastructure for local model integration.

羽毛球分组比赛记分
小程序二维码

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

Xiaoye