Introduction¶
The core design philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When integrating with Alibaba Cloud Bailian, the built-in pi-ai adapter cannot correctly recognize the dashscope.aliyuncs.com endpoint, causing incorrect dialect configuration, missing reasoning capability settings, and an inability to retrieve metadata such as context window information. The dsh-bailian-models plugin aims to solve this problem by providing DSH with an out-of-the-box Bailian model catalog and automatic adaptation mechanism.
Plugin Positioning¶
The plugin is maintained by developer CroissanTTs and is a model inference plugin for DeepSeek Harness. It mainly includes two functional components: first, it provides preset routing for 36 mainstream text models; second, it provides an automatic adapter for detecting and completing existing Bailian route configurations.
Core Features¶
1. Model Catalog Presets¶
The plugin includes a built-in catalog of 36 major text models. Each model entry contains the following metadata:
* Context window size
* Maximum output token count
* Reasoning effort control parameters (such as enable_thinking, reasoning_effort, and thinking_budget)
2. Automatic Adapter¶
The plugin monitors the llm-pi-ai configuration section. If it detects that an existing route’s baseURL points to a Bailian endpoint (such as dashscope.aliyuncs.com or dashscope-intl), the adapter automatically fills in the following missing fields:
* Dialect compatibility (such as thinkingFormat: qwen, supportsStore, etc.)
* Context window and maximum output limits
* Reasoning effort levels (reasoningEfforts)
* Route-level thinking budget mapping (thinkingBudgets)
Note: The automatic adapter only fills in missing values; manually configured values will not be overwritten. All automatically filled fields are written to the user-level configuration and remain in place after the plugin is uninstalled.
3. Support for Four Inference Modes¶
The plugin supports four inference mode classifications for Bailian models:
* Effort levels (Type A): Controlled via reasoning_effort.
* Budgets (Type B): Controlled via thinking_budget.
* Toggle (Type C): Controlled only by the enable_thinking switch.
* Always-thinking (Type D): The model is always in thinking mode and does not provide level selection.
4. Fixing pi-ai Adapter Issues¶
The plugin fixes compatibility issues that occur when the built-in pi-ai adapter handles the dashscope.aliyuncs.com endpoint.
Installation and Enabling¶
Installation Command¶
Run the following command in the terminal to install the plugin:
dsh plugin --profile web add dsh-bailian-models
Configure Environment Variables¶
After installation, the plugin references environment variable names but does not store keys. Ensure that the following environment variable is set:
export DASHSCOPE_API_KEY=sk-...
Using Models¶
After installation is complete, Bailian models will appear in the DSH model selector, and reasoning effort levels will work properly.
Advanced Configuration¶
Users can manually edit the bailian route on the DSH settings page (Models page) to use different environment variable names or regional endpoints.
Notes¶
- Key Safety: The plugin never stores API keys; it only references environment variable names.
- Configuration Precedence: The automatic adapter fills in values only when configuration is missing; manually configured values take priority.
- Type D Model Limitation: For Type D (Always-thinking) models, the plugin does not provide level selection. If a toggle command is sent without selecting a level, a 400 error may be received.
- Source Code Review: It is recommended to review the plugin source code and license (MIT) before use.
Summary¶
dsh-bailian-models provides DSH users who use Alibaba Cloud Bailian with a complete model catalog and automatic configuration capability, resolving compatibility pain points with the native adapter on DashScope endpoints. For more details, refer to the project homepage or the Skill Hub catalog.