dsh-plugin-reasoning-effort-sync: Auto sync model reasoning level

The DeepSeek Harness (DSH) reasoning effort selector is driven by per-model reasoning metadata. For the official dsh-llm-pi-ai, this metadata is provided out of the box. However, for self-hosted or relay gateways, where the route name may be unknown to the catalog, the models key replaces the catalog rather than extending it, and entries lacking reasoningEfforts are reported as non-reasoning models. This plugin reads these levels from the gateway’s GET {baseURL}/models endpoint and writes them to the configuration file.

Core Features

The plugin addresses the issues above by:

  1. Synchronizing Levels: Syncs the reasoning effort levels of DeepSeek Harness model routes with gateway metadata, eliminating the need to manually write reasoningEfforts blocks for every model.
  2. Fallback Mechanism: Falls back to the models.dev dataset for models not described by the gateway.
  3. Configuration Support: Supports configuring routes and modelsDev options, allowing for whitelist control or custom fallback behavior.
  4. Write Validation: Writes validated reasoningEfforts to the configuration file.

Installation & Enablement

Ensure DeepSeek Harness 0.2.0-rc.2 is installed before proceeding.

  1. Navigate to the DeepSeek Harness Plugins page.
  2. Install the plugin via registry name, absolute path, Git URL, or tarball.
  3. Enable the plugin package after installation.

Configuration & Usage

The plugin registers an entry in the configuration file with the following default settings:

- id: reasoning-effort-sync
  name: dsh-plugin-reasoning-effort-sync
  config:
    enabled: true
    syncOnLoad: true
    intervalMinutes: 0        # 0 disables periodic sync
    requestTimeoutMs: 10000
    dryRun: false
    routes: {}                # Empty indicates processing all routes declared in pi-ai lines
    modelsDev:                # Fallback data source, only for models not described by the gateway
      enabled: true
      url: https://models.dev/api.json
      ttlHours: 12
      timeoutMs: 30000
      minShare: 0.5           # Consensus ratio required for a dominant claim

Route Configuration (routes)

  • Empty Object {}: Processes all routes declared in llm-pi-ai lines.
  • Non-empty Object: Acts as a whitelist, processing only the routes named in the list. Setting enabled: false for a route in the list excludes it.

Model Fallback Configuration (modelsDev)

When the gateway’s /models endpoint does not provide reasoning effort levels, the plugin queries models.dev.

  • url: Dataset address (defaults to the full dataset from models.dev).
  • ttlHours: Duration to cache the dataset in memory.
  • timeoutMs: Timeout for fetching the dataset.
  • minShare: Determines whether to accept the claim for a model. A value of 1 requires consensus, while 0.5 accepts majority agreement.

Testing Configuration

Using dryRun: true calculates and logs results without writing to the actual configuration, useful for verifying if the levels returned by the gateway are correct.

Notes

  • Version Requirement: Requires DeepSeek Harness 0.2.0-rc.2.
  • Scope: Only processes routes declared in the configuration file.
  • Model Management: Does not add or remove models; it only annotates existing model entries.
  • Default Values: Does not write default effort values.
羽毛球分组比赛记分
小程序二维码

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

Xiaoye