自定义模型补全
DSH Custom Provider Enhancer is an out-of-the-box DeepSeek Harness (DSH) / Cordis plugin designed for Custom Model Providers (e.g. OneAPI, NewAPI, OpenRouter, vLLM, Ollama, and OpenAI-compatible API gateways).
これは DeepSeek Harness(DSH)プラグインです。当サイトは GitHub README、インストール情報、メンテナンス状況、公開セキュリティシグナルをまとめています。
上流で中国語 README が提供されていないため、リポジトリのオリジナルコンテンツを表示しています。
DSH Custom Provider Enhancer
English | 简体中文
DSH Custom Provider Enhancer is an out-of-the-box DeepSeek Harness (DSH) / Cordis plugin designed for Custom Model Providers (e.g. OneAPI, NewAPI, OpenRouter, vLLM, Ollama, and OpenAI-compatible API gateways).
When discovering or saving models in the Web GUI, it automatically queries a 3000+ model database to populate Context Window (contextWindow), Max Output Tokens (maxTokens), Multimodal Vision (input: [text, image]), and Deep Thinking / Reasoning (reasoningEfforts).
📋 Table of Contents
- Overview
- Compatibility
- Key Features
- Installation & Uninstallation
- Quick Start
- Configuration
- Permissions & Data Security
- Troubleshooting & Rollback
- Development & Testing
- License
🎯 Overview
What problem does it solve?
When users connect custom third-party gateways (e.g. OneAPI, NewAPI, vLLM, Ollama) to DeepSeek Harness, the standard GET /models discovery endpoint only returns raw model IDs (such as gemini-3.7-flash, deepseek-v4-pro, or mimo-v2.5). It omits critical runtime parameters:
- ❌ Missing context limits causes inaccurate token pressure metering or context overflows.
- ❌ Missing multimodal flags (
input: ['text', 'image']) disables image uploads in the conversation interface. - ❌ Missing reasoning levels (
reasoningEfforts) hides the thinking intensity slider in chat.
How does this plugin solve it?
- Auto Discovery & Specification Enrichment: Intercepts
llm.discoverModelsand automatically fills correct context size and max output tokens. - Vision & Thinking Auto-Injection: Intercepts
llm.resolveModelInfoandsettings.mutateto automatically attach vision input and thinking levels both in runtime and insettings.yaml. - Zero Official Interference: Only affects custom third-party providers; native DeepSeek channels remain untouched.
🧭 Compatibility
| Environment | Supported Versions | Status |
|---|---|---|
| DeepSeek Harness (DSH) | 0.1.0-rc.1 ~ mainline | ✅ Verified (Runtime Compatible) |
| Cordis Framework | ^3.0.0 | ✅ Verified |
| Node.js | `^20.0.0 | |
| OS | Linux, macOS, Windows | ✅ Cross-Platform |
✨ Key Features
- ⚡ Zero-Config Automation: Works right out of the box when adding custom providers in Web Settings.
- 📏 Accurate Capacities: Automatic 1M context for Gemini 3.7 Flash, 1000K for DeepSeek V4 Pro, 128K for GPT-4o, 256K for MiMo 2.5, etc.
- 👁️ Automatic Vision Activation: Unlocks image uploads and visual reasoning in Web chat for multimodal models (Gemini, Claude, GPT-4o, MiMo, Qwen-VL, etc.).
- 🧠 Thinking Intensity Tiers: Injects reasoning effort gears (
off,low,medium,high,max) for reasoning models. - 💾 Dual-Layer Persistence: Automatically writes clean parameters into
settings.yamlon save, and patches legacy placeholder models in memory. - 🛡️ Fault-Tolerant & Offline Fallback: Built-in 30+ core model definitions, local caching, timeout circuit-breaking, and fuzzy matching for dated model snapshots (
-20241120).
📦 Installation & Uninstallation
Installation
dsh plugin --profile web add https://github.com/cinob/dsh-plugin-custom-provider-enhancer.git
Uninstallation
dsh plugin --profile web remove dsh-plugin-custom-provider-enhancer
⚡ Quick Start
- Start DSH Web GUI (
http://127.0.0.1:3080). - Go to Settings ➔ Models ➔ Add Provider.
- Fill in your Base URL and API Key, then click Fetch available models.
- Check desired models and click Adopt, then click Save.
- All specifications (
contextWindow,maxTokens,input,reasoningEfforts) are automatically configured and saved!
⚙️ Configuration
Optional configuration in your cordis.yml or cordis.patch.yml:
plugins:
custom-provider-enhancer:
# Remote metadata catalog URL
metadataUrl: https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json
# Request timeout in milliseconds (default: 5000ms)
timeoutMs: 5000
# In-memory cache TTL in milliseconds (default: 1 hour)
cacheTtlMs: 3600000
# Fallback context window when model is unknown (default: 128000)
defaultContextWindow: 128000
# Fallback max output tokens (default: 4096)
defaultMaxTokens: 4096
🔒 Permissions & Data Security
- Network Access: Only requests the user-specified custom endpoint
GET /modelsand public model specification database (github.com/BerriAI/litellm). - Zero Credential Leaks: API Keys are passed through standard authorization headers only during user-initiated discovery; keys are never logged, forwarded, or stored by this plugin.
- Local Sandbox Safe: Strictly operates in-process through Cordis service hooks (
ctx.llm,ctx.settings); creates no subprocesses or arbitrary file modifications.
🛠️ Troubleshooting & Rollback
- Duplicate Entry ID Error:
Ensure you do not manually add
- insert: id: custom-provider-enhancerintocordis.patch.ymlif the package is already registered as a bundle inpackage.json. - Changes not reflecting: Ensure you click Save in Web Settings. If models were added prior to installing the plugin, opening Settings and clicking Save will auto-enrich them.
- Rollback:
Remove
dsh-plugin-custom-provider-enhancerusingdsh plugin --profile web remove dsh-plugin-custom-provider-enhancerand restart DSH.
💻 Development & Testing
# Clone repository
git clone https://github.com/cinob/dsh-plugin-custom-provider-enhancer.git
cd dsh-plugin-custom-provider-enhancer
# Install dependencies
pnpm install
# Run automated tests
pnpm test
# Build distribution bundle
pnpm build
📄 License
セキュリティとインストールエビデンス
このスコアは公開リポジトリメタデータと当サイトに登録されたインストールエビデンスのみに基づくもので、コードセキュリティ監査とは異なります。
公開プラグインカタログから取得し、公開 GitHub リポジトリにリンクしています。
リポジトリは MIT ライセンスを宣言しています。
過去180日以内にコードの更新があります。
再現可能な正確なインストールメタデータはまだ登録されていません。リポジトリの説明に従って手動で確認してください。
確認したパッケージメタデータにインストールライフサイクルスクリプトは宣言されていません。