dsh-plugin-local-prompt-bridge: Precise Token Accounting and Context Overflow Compression Retry

The community DSH plugin local-prompt-bridge, without modifying the @deepseek-ai package, rewrites context overflow 400 errors into CONTEXT_WINDOW_EXCEEDED to trigger the official compaction-basic; after configuring routes, it performs /tokenize-based accurate pre-estimation against the local OpenAI-compatible service, proactively compacting and retrying when the threshold is exceeded. Based on the README, this article describes the pnpm installation of the web profile, bundles registration, and cordis.patch.yml configuration, and provides self-testing and usage notes.

Read More