dsh-bailian-model-catalog: Completing Model Catalog and Input Modalities for Alibaba Bailian Token Plan Routing

Introduction

DeepSeek Harness (DSH) determines whether a model can accept images solely based on the input modality declared in the model’s definition. When using the Alibaba Bailian Token Plan route (https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1), even if the model explicitly supports vision on the Bailian side, the plugin will treat it as text-only if the model is missing from the DSH catalog or lacks an input modality declaration. This causes the host to reject image requests with the message “The current model does not support images.”

dsh-bailian-model-catalog is a DSH plugin designed to supplement the model catalog and input modalities for the Alibaba Bailian Token Plan route, so that models with vision understanding capabilities can correctly declare [text, image] and pass image requests.

Core Features

  1. Fill in the pi-ai catalog: Adds models that are present in the official capability table but missing from the DSH catalog into the shipped catalog object for qwen-token-plan-cn; for models that already exist, supplements their missing input modalities.
  2. Overlay metadata at read time: The adapter has already materialized the route into a snapshot by the apply() phase, so the plugin can no longer rewrite catalog data. Therefore, the plugin overlays metadata such as input, contextWindow, maxTokens, compat, and reasoning per route name at read time (ModelsImpl.getModels), and restores them upon unload.
  3. Allow catalog borrowing: You can configure the plugin to let your custom route name (e.g., aliyun) borrow this model catalog.

Installation & Enablement

Install from npm:

dsh plugin --profile <your-profile> add dsh-bailian-model-catalog

Install from GitHub (usable directly before it’s listed in the plugin marketplace):

dsh plugin --profile <profile> add github:liudengxing/dsh-bailian-model-catalog

Use the link: prefix for local development; changes take effect immediately after code edits:

dsh plugin --profile <profile> add "link:/absolute/path/to/dsh-bailian-model-catalog"

After installation, the adapter re-reads the configuration on the next request. The plugin overlays metadata at read time, so it takes effect without a restart.

Typical Usage

Case A: Route name is qwen-token-plan-cn

Zero configuration — just install and go.

Case B: Route name is custom (e.g., aliyun)

You need to specify api at the route level (otherwise the adapter cannot infer the protocol and will report needs an api), and let the plugin borrow the catalog for this route:

- id: llm-pi-ai
  name: "@deepseek-ai/dsh-llm-pi-ai"
  config:
    providers:
      aliyun:
        displayName: Alibaba Bailian · Token Plan
        apiKeyEnv: ALIYUN_API_KEY
        api: openai-completions
        baseURL: https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1
        models:
          - id: deepseek-v4.1-flash-1017
          - id: qwen4-max

- id: bailian-catalog
  config:
    routes:
      aliyun: qwen-token-plan-cn

Full Configuration Options

Field Default Description
routes { qwen-token-plan-cn: qwen-token-plan-cn } Route name → which shipped catalog to borrow (the provider name in pi-ai)
exclude [] Model IDs that the plugin should not touch

Covered Models

The plugin supplements input modalities or catalog entries for the following models (based on official documentation capabilities):

  • Vision understanding (text, image): qwen4-max, qwen4-max-preview, qwen3.8-max, qwen3.8-flash, qwen3.7-plus, qwen3.6-flash, deepseek-v4.1-flash, deepseek-v4.1-flash-1017
  • Text-only: qwen3.7-max, glm-5.3, glm-5.2, deepseek-v4-pro, deepseek-v4-pro-0813, deepseek-v4-flash-0731, auto, decision-model-preview

Use Cases & Notes

  • Ideal for developers using the Alibaba Bailian Token Plan route who need multimodal models to pass image requests.
  • The plugin runs with the current DSH process permissions. It is recommended to read the source code and license (MIT) before installing.
  • The plugin depends on the internal shape of ModelsImpl.getModels. If DSH’s internal interface changes, the plugin will degrade to “catalog write-only” mode, and you’ll need to wait for the profile to re-parse the configuration before seeing any effect.
  • Models from different families only receive input modality supplements; they do not inherit maxTokens/compat from other models, to avoid cross-vendor request parameter errors.
  • Models already present in the catalog are not modified. qwen4-max-preview was deprecated on 2026-11-25, but the official documentation states that the original ID can still be called normally and is routed to qwen4-max. It is therefore still declared as a vision model to prevent users already using that ID from being downgraded to text-only.

Summary

dsh-bailian-model-catalog supplements the model catalog and input modalities for the Alibaba Bailian Token Plan route by overlaying metadata at read time, enabling vision-capable models to correctly accept images. It does not register provider routes, nor does it take over the adapter. It does only two things: writes entries into the pi-ai catalog and overlays metadata at read time.

  • Catalog page: https://www.skillhub.cn/plugins/liudengxing/dsh-bailian-model-catalog
  • GitHub: https://github.com/liudengxing/dsh-bailian-model-catalog
羽毛球分组比赛记分
小程序二维码

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

Xiaoye