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¶
- 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’sllm-pi-ai.providers. - Raw HTTP Testing: Manually sends actual HTTP requests without going through the host’s
ctx.llm.streamor applying the route’scompat/headers/retryPolicy. It tests basic connectivity directly. - Three-Protocol Support: Supports
openai-completions,openai-responses, andanthropic-messagesprotocols. No intelligent corrections are made; requests are sent exactly as configured. - 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).
- Plain Language Errors: All errors are translated into Chinese conclusions and suggestions for next steps. For example,
HTTP_404will prompt the user to check if the baseURL includes/v1. - 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.
- 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¶
- Provider: Grouped by normalized baseURL (only trailing slashes are removed;
/v1is not added or deleted). Note thathttps://api.example.comandhttps://api.example.com/v1are two different groups. - API Type: Multiple protocols may be mounted under the same baseURL; listed with duplicates removed based on declaration.
- Model: The union of model IDs within that group.
- 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.
openaiseries protocols automatically includestream_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¶
- Not a Monitoring Tool: This is a manual probe. It does not poll, monitor, alert, persist to disk, or record historical trends.
- Singleton Execution: Only one auto-retry session is allowed at a time. Duplicate starts will return
409 RETRY_IN_FLIGHT. - Security: Zero key leakage; no plaintext keys appear in records, logs, or responses. The
llm-pi-aiconfiguration is read-only throughout. - Configuration Dependency: The plugin relies on the host environment’s
settings.yamland 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.