Introduction¶
When using DeepSeek Harness or developing agents, it is often necessary to switch service providers or connect to relay stations. Upon obtaining a陌生的 API endpoint and Key, one often lacks knowledge regarding its usability, network connectivity, or response speed. Simple curl commands or log checks are often insufficient to pinpoint whether the issue lies with the network, Key permissions, or the model itself.
Plugin Overview¶
lfy-bot/dsh-api-probe is a plugin designed specifically for DeepSeek Harness to verify API Key and model availability prior to configuration. It provides comprehensive, step-by-step diagnostic messages in Chinese to help users confirm service status before integration.
Core Features¶
This plugin primarily includes the following capabilities:
- Verify API Key and Model Availability: Confirms whether the Key is valid and if the model is callable.
- Network Diagnostics: Detects DNS resolution, TCP port connectivity, and TLS handshake status.
- Speed Testing: Measures Time to First Token (TTFT), output speed, and success rate.
- 37 Provider Presets: Covers various interface types including OpenAI-compatible, native Anthropic, and native Gemini.
- Dynamic Model List Retrieval: Does not hardcode model names; instead, it fetches them from the interface’s own
/modelsendpoint. - Local Execution, No Key Persistence: Requests are executed locally. The Key is used only for the current request and is not written to disk or sent to third parties.
Installation and Activation¶
Please ensure your DeepSeek Harness version is >= 0.2.0-rc.2 before installation.
- Place the
dsh-api-probecode at a local absolute path. - Execute the installation command in the terminal:
dsh plugin --profile desktop add link:"/absolute/path/to/dsh-api-probe"
- After installation, fully close and reopen DeepSeek Harness. The “API Health Check” option will appear in the left sidebar.
Typical Usage¶
- Click “API Health Check” in the left sidebar of the Harness.
- Enter the service provider address and API Key, then click “Start Detection”.
- If a proxy is required, expand “Advanced Settings” and enter
http://127.0.0.1:7890in the “Proxy Address” field. - After the speed test concludes, review the three metrics: Time to First Token, output speed, and success rate.
Use Cases and Notes¶
Use Cases:
* Health checks before connecting to new API service providers or relay stations.
* Troubleshooting issues such as network unreachability, connection timeouts, or invalid Keys.
* Comparing response speed and stability across different service providers.
Notes:
* Security: The plugin runs locally; Keys are not written to files and are used solely for the current test.
* Diagnostic Text: Diagnostic reports are in Chinese, while the rest of the interface is bilingual (Chinese/English).
* Streaming Limitations: Does not support resuming transmission after an SSE stream is interrupted mid-way, nor does it support changing parameters during streaming.
* HTTP Version: Currently uses HTTP/1.1 and does not support HTTP/2; this does not affect speed test results.
* Preset Reliability: The base URLs in the presets serve as a starting point. Vendors may change domains at any time; it is recommended to verify them regularly using check_providers.mjs.
Conclusion¶
dsh-api-probe provides full-chain diagnostic capabilities from the network layer to the application layer, making API integration more transparent and controllable. Through this tool, users can quickly identify service provider availability and performance metrics, avoiding failures caused by blind configuration.
Project URL: https://github.com/LFY-bot/dsh-api-probe