dsh-model-health-probe: DSH Model Health Check Probe

Introduction

DeepSeek Harness (DSH) adopts a plugin-based architecture. When errors occur in model configurations (such as baseURL paths or protocol types), system errors often consist of nothing more than simple HTTP status codes, making it difficult to pinpoint the specific configuration layer causing the issue. This plugin adds a “Model Health Check” tab to the DSH session view, providing immediate diagnostic capabilities for specific models and protocols by manually sending raw HTTP test requests.

Core Features

  1. Four-Row Selector: Click to select row by row within the panel following the order: Provider (grouped by baseURL) → API Type → Model → Route. The candidates for each row are derived from the previous row’s selection. Options are dynamically generated entirely from the local settings.yaml’s llm-pi-ai.providers.
  2. Raw HTTP Testing: Manually sends actual HTTP requests without going through the host’s ctx.llm.stream or applying the route’s compat / headers / retryPolicy. It tests basic connectivity directly.
  3. Three-Protocol Support: Supports openai-completions, openai-responses, and anthropic-messages protocols. No intelligent corrections are made; requests are sent exactly as configured.
  4. One-Screen Diagnosis: Displays request latency, TTFT (Time To First Byte), HTTP status, token usage, response content, and a three-layer diagnostic chain (API Request / Model Response / Strict Validation).
  5. Plain Language Errors: All errors are translated into Chinese conclusions and suggestions for next steps. For example, HTTP_404 will prompt the user to check if the baseURL includes /v1.
  6. Default Model Settings: The panel pre-selects the host’s default model upon opening. Users can set the currently selected route + model as the default with one click, ensuring it is automatically pre-selected next time.
  7. Auto Retry: Provides a finite retry session initiated explicitly by the user, stopping upon success. Supports two success determination modes: “Strict” (content match) and “Connectivity” (response structure only), along with four stop conditions.

Installation

This plugin is distributed as a local tgz package and must be installed using the full path.

# 1) Pack (Inside the plugin directory)
cd D:\Company\dsh-plugin\dsh-model-health-probe
npm pack

# 2) Install to web profile
dsh plugin --profile web add D:\Company\dsh-plugin\dsh-model-health-probe\dsh-model-health-probe-<version>.tgz

After successful installation, the DSH host process must be restarted to see the new tab in the session view. For subsequent updates, simply refresh the page.

Usage Instructions

Target Selection

  1. Provider: Grouped by normalized baseURL (only trailing slashes are removed; /v1 is not added or deleted). Note that https://api.example.com and https://api.example.com/v1 are two different groups.
  2. API Type: Multiple protocols may be mounted under the same baseURL; listed with duplicates removed based on declaration.
  3. Model: The union of model IDs within that group.
  4. Route: Only appears when the selected model is declared by multiple routes (routeKeys.length > 1). Otherwise, this row is hidden, and the target is locked automatically.

Streaming vs. Non-Streaming

  • Streaming Enabled: Allows measuring TTFT. openai series protocols automatically include stream_options.include_usage.
  • Streaming Disabled: Waits for the complete response body at once, facilitating the inspection of the full JSON structure.

Strict Validation

Each test generates conclusions across three layers:
- API Request Layer: Checks domain resolution, TCP/TLS, and HTTP status.
- Model Response Layer: Checks response body structure, text extraction, and stream termination markers.
- Strict Validation Layer: Checks if the model’s returned content is exactly equal to the default value OK.

Judgment Rules:
- Strict validation failure → Judged as Slow (never Failed).
- Timeout / Non-2xx / Missing stream termination marker → Failed.
- All three layers pass but latency exceeds slowMs (default 15000ms) → Slow.

Auto Retry

Configure interval, max count, and max duration (all in minutes) in the panel. You can leave after starting and return to check the results.
- Strict Mode: Considered successful only if content matches and no timeout occurs.
- Connectivity Mode: Considered successful if HTTP 2xx and the response body parses successfully.
- Fatal Errors Do Not Short-Circuit: 401/403/404/400 will not end the session prematurely, allowing for continued retries after fixing the issue.

Notes

  1. Not a Monitoring Tool: This is a manual probe. It does not poll, monitor, alert, persist to disk, or record historical trends.
  2. Singleton Execution: Only one auto-retry session is allowed at a time. Duplicate starts will return 409 RETRY_IN_FLIGHT.
  3. Security: Zero key leakage; no plaintext keys appear in records, logs, or responses. The llm-pi-ai configuration is read-only throughout.
  4. Configuration Dependency: The plugin relies on the host environment’s settings.yaml and credential service (.credentials.yaml).

Ecosystem Background

DSH (DeepSeek Harness) is a plugin-based platform within the DeepSeek ecosystem, with the core design philosophy of “Everything as a Plugin”. This plugin is maintained by community developers and follows the MIT License.

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

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

Xiaoye