Introduction¶
The DeepSeek Harness (DSH) ecosystem follows the “Everything is a plugin” philosophy. When using DSH, configuring an OpenAI-compatible host (including official APIs, relay gateways, or local inference services) usually requires manually maintaining model lists, pricing policies, and inference parameters.
The Model Catalog plugin removes this repetitive work. It probes the endpoints of the target host, automatically fetches model information, pricing, and capabilities, normalizes them, and finally generates a ready-to-load configuration file.
Plugin Positioning¶
- Name: model-catalog
- Author: JohnXu22786
- Category: Model Inference
- License: MIT
- Core Value: Automatic discovery, normalized configuration, interactive generation
Installation and Enabling¶
In DSH, install the plugin using the following command:
dsh plugin --profile demo add github:JohnXu22786/model-catalog
To remove it, use:
dsh plugin --profile demo remove model-catalog
Core Features¶
The plugin includes the following core capabilities:
- Host type auto-detection: Automatically identifies different host types, including standard-compatible, enriched metadata, quota billing, capability-flag proxy, Ollama, or vLLM.
- Normalized model records: Output model records include ID, context window, maximum output, pricing family (including cache read/write/internal inference prices, denominated in USD/1M), capability flags, and source provenance.
- Pricing source chain: Populates pricing information by priority: host endpoint > user override > external price mirror > built-in default table.
- Built-in default table: Built-in default facts and pricing fallback tables for official APIs (such as DeepSeek).
- Capability probe validation: Optionally sends a minimal request to probe capabilities missing from host metadata (such as tool calling, structured output, streaming).
- Caching and concurrency safety: Classification, probing, and mirror results are cached; file locks and atomic writes prevent concurrent processes from corrupting the cache.
- Interactive configuration generation: Uses the
pickcommand to list models and prices, then generates a dsh configuration snippet after user selection. - Self-contained: Includes manifest, entry factory, and tool interfaces, and can be loaded directly by Harness.
Workflow¶
The plugin workflow consists of the following steps:
- Host detection: Probes endpoints and determines the host type based on different responses such as
/models,/v1/models,/api/pricing,/model/info. - Fetch: Parses the model list, pricing, and parameters according to the type.
- Normalization: Performs unit conversion (e.g., USD/Token to USD/1M), source chain completion, and alias resolution.
- Capability probing: (Optional) Probes missing capabilities and caches them.
- Output: Generates the full catalog, dsh configuration snippet, and human-readable report.
Usage Examples¶
Before using it, Node.js >= 21 is required (no runtime dependencies; TypeScript is required only for building).
- Install dependencies and build:
npm install
npm run build
- Discover official API:
export DEEPSEEK_API_KEY=sk-xxx
node dist/src/main.js discover --base-url https://api.deepseek.com
- Discover local Ollama:
node dist/src/main.js discover --base-url http://127.0.0.1:11434 --probe always
- Discover gateway (environment variable required):
node dist/src/main.js discover --base-url https://gateway.example.com --api-key-env GATEWAY_KEY
- Interactive model selection:
node dist/src/main.js pick --base-url https://api.deepseek.com
Technical Details¶
- Output files: After running, three files are generated in the
out/directory:catalog.json: Full catalog (schema: model-catalog/v1).dsh-models.json: dsh configuration snippet (schema: dsh/models/v1).report.md: Human-readable report.
- Host types: The plugin supports types such as
bare(standard-compatible),augmented(enriched metadata),quota(quota billing),flag(capability flags),ollama, andvllm. - Pricing units: All pricing is normalized to USD per million tokens (USD/1M).
- Error handling: If all endpoint probes fail, the plugin reports an error. You can manually specify the host type with
--kind.
Conclusion¶
The Model Catalog plugin simplifies the model configuration process in DSH environments through automation and standardization.
- GitHub repository: https://github.com/JohnXu22786/model-catalog
- Directory page: https://www.skillhub.cn/plugins/JohnXu22786/model-catalog