In DSH’s llm-pi-ai model, if the context window is not declared, the system defaults to 262,144 tokens. When an actual request exceeds this value, even if the server returns a successful response, it may be misjudged as a context overflow, causing tool calls to fail or preventing the compression feature from being submitted. The dsh-model-context-catalog plugin solves this problem by maintaining accurate route-level contextWindow.
What Is This¶
This is a plugin for DeepSeek Harness (DSH) model inference, maintained by HOWILLMAKEIT. It maintains accurate route-level contextWindow for llm-pi-ai models and provides a native Web settings page for management.
Core Features¶
- Maintains the model context window catalog
- Automatically corrects llm-pi-ai metadata
- Provides a native Web settings page
- Writes the correct contextWindow based on the exact provider/model route
Installation and Enablement¶
Run the following command to install:
dsh plugin --profile web add dsh-model-context-catalog
After installation, refresh the DSH Web page; if the Host has not yet loaded the plugin, restart the DSH Host.
Typical Usage¶
- Open Settings → Context Window.
- Click Add Model.
- Select a route from the configured llm-pi-ai models.
- Enter the context window actually supported by the deployment. Optionally add a note.
- Save and confirm that the status becomes Active.
The model selector displays the provider and model information as-is, including plan suffixes such as (Agent Plan). When the same model is deployed through different providers or gateways, configure them separately.
Applicable Scenarios and Notes¶
- Applicable scenario: Developers trying to resolve context overflow misjudgments in long conversations.
- Configuration basis: The context window must be based on the documentation or console of the corresponding service provider. A configuration that is too small will continue to cause false positives; a configuration that is too large may mask real overflows.
- Behavior boundaries:
- Processes only configured models and does not synthesize nonexistent routes.
- Maintains only contextWindow and does not write unverified maxTokens.
- Updates only the context window for the target model, while preserving name, endpoint, protocol, credential references, and other fields.
- Provider default values are displayed only as defaults and do not masquerade as the model’s actual capacity.
- Old catalog entries for deleted routes are displayed only when editing themselves, making it easy to clean them up.
Summary¶
This plugin resolves context overflow misjudgment issues by correcting metadata. After installation and configuration, it ensures that llm-pi-ai models run according to their actual capacity. Related links: Plugin Catalog GitHub