DeepSeek Harness Dynamic Output Quota Plugin: dsh-adaptive-max-tokens

`dsh-adaptive-max-tokens` is a plugin for DeepSeek Harness (DSH) that addresses the issue of fixed reserved output tokens conflicting with input text in long-context conversations, which can cause the service to reject requests. The plugin dynamically calculates `maxTokens`, flexibly adjusts the available output space based on context capacity and input estimation, and automatically restores the reserved quota once compression takes effect. It supports error identification and retry, calibration after interrupted chat resumption, and routing compatibility, and must be installed and used with DSH version `0.1.6-alpha.1` or `0.1.7-rc.2`. Note that the plugin adjusts the budget based on estimation only; it does not increase the model’s actual capacity and cannot guarantee absolutely no overflow.

Read More