Preface¶
When maintaining model lists for relay stations, custom gateways, or third-party channels, you often need to look up documentation one by one and fill in parameters manually. The API values corresponding to thinking levels are especially prone to misconfiguration. The DSH Model Metadata Fill plugin is designed to match locally configured models under llm-pi-ai in Settings → Models against models.dev model data, and populate or override four configuration items: context window, maximum output tokens, input types, and thinking level.
Plugin Introduction¶
dsh-model-meta-fill is a model metadata fill plugin for DeepSeek Harness (DSH), maintained by yuhhhong. It uses the models.dev model catalog (models.json) and service catalog (api.json) to automatically populate or override four metadata fields for local models, while providing relationship management, custom parameters, and diff preview capabilities.
Core Features¶
Dual-Catalog Association¶
The plugin fetches both models.dev/models.json and models.dev/api.json, establishing associations only through exact canonical_model_id matches. When searching local models, you only interact with deduplicated model entities, so you won’t be distracted by duplicate entries of the same model across multiple hosting platforms. Service-level parameters such as thinking control are read from the associated service records only when needed.
Conservative Matching¶
When matching local models, the plugin checks in the following order: full ID, name normalization (unifying case, whitespace, underscores, hyphens, and Unicode NFKC), gateway path suffix, and display name. Version numbers, dates, and identity-distinguishing fragments such as pro, mini, and thinking are preserved to avoid cross-version or cross-variant mismatches. Model IDs with a colon suffix are never auto-truncated; they are listed as candidates only after a full match fails and must be explicitly confirmed by the user. When multiple model entities are matched simultaneously, the user is prompted to choose — the first match is not selected by default.
Auto-Inferred Provenance and Manual Relationship Maintenance¶
When refreshing the catalog, the plugin extracts the developer prefix from the model entity ID and infers the default service provenance using either an exact match or the longest full-word left-side prefix (prefix) against the provider ID. Channels that cannot be attributed to a developer by name (none, such as third-party hosting or differently-named channels) are never auto-selected.
When automatic rules do not apply, you can maintain two types of manual mappings in Relationship Management:
- Model mapping: local provider + original model ID → model entity ID
- Provenance mapping: model entity ID → provider ID + service model ID (shared across all local models that match the same entity)
The two types of mappings are saved and removed independently. Catalog refreshes preserve manual mappings.
Custom Parameters Take Priority¶
Custom parameters are matched by exact original model ID, case-sensitive and path-prefix-sensitive. Models with the same ID across different providers share the same set of parameters. Once a match is found, the four saved parameters are used directly as the source, bypassing both the model entity and provenance mapping. This allows models not yet indexed in the catalog to be filled in, and the same relationship to be reused across multiple providers.
When adding a new entry, you can copy a template from an existing local model’s current mapping result, including any saved manual model mapping and provenance mapping. Alternatively, you can enter the original model ID directly and fill in the fields manually. Leave context window, max output tokens, and input types blank if not applicable. When no thinking level is provided in the template, the toggle defaults to off.
Populate-Missing vs. Override Separation¶
The provider card offers two independent entry points:
- Auto-Fill only populates undeclared missing fields, preserving existing valid local configurations (including explicitly declared text-only
["text"]and explicitly disabled thinkingfalse) - Override-Fill replaces existing fields with the explicitly valid values from the selected source; fields missing from the source retain their local values
Both entry points open a Fill Preview first, listing per-model, per-field the current value, the fill value, the specific data source, and any skip or warning reasons.
Clear Field Boundaries¶
Input types are judged as missing based on what the local model actually has saved as its declaration, not on the UI’s default checkbox state. Only text and image supported by DSH are written; PDF and audio/video are ignored, and empty arrays are never written.
Thinking level only maps to explicitly listed effort enums in service records (off / minimal / low / medium / high / xhigh / max, where none maps to off while retaining the API value none), or writes false when the service explicitly declares reasoning: false. Records that only provide a boolean toggle, token budget, or default with no corresponding mapping are displayed with their raw description in the UI along with the reason, and no level is fabricated.
Local Cache Fault Tolerance¶
The remote catalog is cached in local storage. On startup, if no cache exists or the cache is older than 7 days, it is automatically refreshed. You can also refresh manually at any time. If a refresh fails, the existing complete cache remains usable.
Installation & Enabling¶
Method 1: Install from npm in DSH’s Web profile
dsh plugin --profile web add dsh-model-meta-fill
Method 2: Install directly from GitHub
dsh plugin --profile web add github:yuhhhong/dsh-model-meta-fill
Method 3: In DSH’s plugin page, click Add Plugin and enter the npm package name: dsh-model-meta-fill
After installation, restart DSH and refresh the page. Open Settings → Models. Provider cards with an explicitly configured model list will display Auto-Fill and Override-Fill buttons, and a Model Metadata Fill status bar with a Relationship Management entry will appear at the bottom of the page.
To uninstall:
dsh plugin --profile web remove dsh-model-meta-fill
The current plugin version is 0.2.0, supporting DSH version range >=0.2.2-rc.2 <0.3.0.
Typical Usage¶
Catalog Cache & Refresh¶
In the Model Metadata Fill section at the bottom of the model settings page, you can view the cache status, last update time, and the count of each type of saved relationship. Click Refresh Catalog to update from models.dev.
Preview & Confirm Fill¶
On a provider card with an explicitly configured model list, click Auto-Fill or Override-Fill to open the Fill Preview. The window displays per model: match status, provenance status, pending field changes shown as “current value → fill value”, data source (models.json:
- When multiple candidates or a colon-suffix candidate is encountered, you can select a model entity directly from the “Select for this session only” dropdown on that row to update only the current preview without saving the relationship
- To handle unmatched models, stale relationships, or adjust service provenance, click “Specify / Manage Relationship” on that row to go directly to the corresponding mapping form
- After verifying the diff is correct, click Confirm Fill to write the configuration; clicking Close makes no changes to any model configuration
Relationship Management¶
Click Relationship Management at the bottom of the model settings page to view saved relationships across the Model Mapping, Provenance Mapping, and Custom Parameters tabs.
- The local model, model entity, and service record selectors in the forms all support searching and selecting within the same input field
- On a saved model mapping row, you can click Add Provenance Mapping or Edit Provenance Mapping to assign a service record to that model entity
- In Custom Parameters, you can add, edit, and remove entire parameter sets
Use Cases & Notes¶
Suitable for use when manually maintaining model lists for relay stations, custom gateways, or third-party channels, where accurate configuration of context window, max output tokens, input types, and thinking level is required.
The plugin runs with the current DSH process privileges. Before installing, it is recommended to review the source code and license (MIT License, Copyright (c) 2026 yuhong).
Scope & Limitations¶
- Only processes the explicitly configured and non-empty
modelslist underllm-pi-ai; no override configurations are created for built-in auto catalogs, the DeepSeek direct-connection adapter, or account catalogs - Only maps explicitly convertible effort enums; records with only a boolean toggle or token budget are not used to derive a level, and no protocol-compatible parameters or provider budget configurations are modified
- models.dev data reflects upstream model and service descriptions and cannot verify whether a specific relay station or gateway actually supports the corresponding capability during live API calls
- The plugin does not perform periodic background polling during runtime; if DSH has been running for an extended period without a restart, you can manually click Refresh Catalog in the bottom status bar
Conclusion¶
dsh-model-meta-fill transforms model metadata maintenance from manual lookup to diff confirmation, thanks to its diff preview and relationship management features. After installation, go to Settings → Models and you will find Auto-Fill and Override-Fill entry points on provider cards.
- Plugin directory: https://www.skillhub.cn/plugins/yuhhhong/dsh-model-meta-fill
- GitHub repository: https://github.com/yuhhhong/dsh-model-meta-fill