dsh-mercury-diffusion: Real-time Playback of the Mercury Diffusion Denoising Process in DSH Chat Bubbles

Preface

When integrating diffusion-based language models like Inception Mercury into DeepSeek Harness (dsh), the default experience remains token-by-token incremental streaming output. When diffusing: true is set, the Mercury API returns genuine denoising intermediate frames that gradually converge from noise into the finished text. Without separate handling at the UI layer, these frames are either invisible or can only be imagined retrospectively—“how did the model come up with this?”

dsh-mercury-diffusion is a community-maintained client plugin that replays the denoising frames returned by Mercury inside the answer bubble at a readable pace, while ensuring that dsh conversation logs and model context only record the final converged text. The following sections describe what it does, how to install it, and usage considerations.

What Is This

dsh-mercury-diffusion (npm package name matches the plugin name, current version 0.2.1, MIT) is published by maintainer TonyWu2333 and categorized as a client plugin. In one sentence: it is a plugin for DeepSeek Harness that integrates with Inception Mercury, live-streaming the diffusion denoising flow—from noise to finished text—inside the answer bubble of the Web chat interface.

The plugin does not register its own model provider and does not provide a standalone settings page. Instead, it adds a diffusion rendering layer under the Inception route you have already configured in dsh’s “Models” page.

Core Features

The following capabilities are drawn from the project README and package declarations, and can be cross-referenced with the GitHub repository.

Real Frames, Not Decorative Animation

Each frame represents a denoising state returned by the Mercury API when diffusing: true is set, played in the browser at a pace of roughly one frame every 180 ms or more. After convergence, the final state is retained for approximately 400 ms before switching to standard Markdown rendering.

Coexists with Existing Routes

The plugin operates on your existing Custom model API routes. Intermediate frames travel through a side channel (SSE on /api/mercury-diffusion/frames), while what gets written to the conversation log and enters the model context remains the converged text-delta, preserving dsh’s “model-visible ⟺ recorded” convention.

Zero-Cost Capability Detection

When entering a conversation, the plugin sends a probe request with messages: [] and diffusing set to an invalid type. If the server rejects it during validation with a 400 error at loc: ["body","diffusing"], the plugin determines that this provider::model supports diffusion. The probe is rejected before any token generation, consuming no billable tokens. Results are cached in-process by provider::model; unknown entries are retained for only 60 seconds.

Fallback to Original Adapter on Failure

For attachments, auxiliary calls, sessions with no active viewer, routes without credentials, or gateways that reject the diffusing field, requests fall back to dsh’s original LLM adapter without interrupting the conversation. When a user aborts a turn, the plugin does not resend on an already-aborted signal.

One-Click Toggle per Model

For models that support diffusion, a floating button appears on the right side of the interface. The toggle state is written to dsh user settings under the key diffusion.<provider>::<model> and persists across restarts. The diffusing flag is only requested when someone is actively watching in the browser (the button component holds the frame subscription). Title generation, compression, headless, and ACP runs continue to use normal incremental streaming.

Assistant Message Rendering

Since dsh does not provide an extension point that wraps only the assistant’s body content, the plugin registers conversation.chat.node[assistant-step] at a higher priority. This means assistant messages from all models pass through this renderer (the normal path is ported from dsh ui-chat’s AssistantNodeView). Disabling or uninstalling the plugin immediately restores native rendering.

Environment Requirements

Item Requirement
dsh >=0.2.1-rc.2 and <0.3.0
Node ^22.19 or >=24
Package manager pnpm must be on PATH (dsh plugin uses it to manage profile plugins)
Platform Web client (dsh.dsh.client.platform: web)

Installation and Activation

1. Install the Plugin

On a machine where dsh is already installed, run the commands from the official documentation:

dsh plugin --profile web add dsh-mercury-diffusion
dsh web

The above commands add the plugin to the web profile and launch the Web interface. The plugin runs with the permissions of the current dsh process. Before installation, you are advised to review the source code and license.

2. Add an Inception Route

Open Settings → Models → Add model provider → Custom model API and fill in:

Field Value
Provider ID inception
Display name Inception
Base URL https://api.inceptionlabs.ai/v1 (must include /v1)
API protocol OpenAI Chat Completions
API key Your Inception API key
Models Add model → mercury-3 (or mercury-2.5, mercury-2)

Then click Create provider.

Note: Do not use the built-in DeepSeek card to point to Inception. That adapter uses a different protocol, and requests will return 404.

If you prefer editing configuration files, you can add the inception provider to ~/.dsh/profiles/web/cordis.patch.yml following the README example. The API key should be referenced via an environment variable (e.g., apiKeyEnv: INCEPTION_API_KEY). Never commit plaintext keys to the repository.

3. Turn On the Diffusion Toggle

Select a Mercury model from the model selector next to the send button, and start a new conversation. After the floating button appears on the right, turn diffusion on, then send a message to see the denoising process inside the bubble.

Typical Usage and Data Flow

With the above configuration, a normal Q&A flow can be summarized as follows:

  1. Select a configured mercury-3 (or same-series) model and confirm the diffusion toggle is on.
  2. Send the user message. If the model is determined to support diffusion and the session has an active viewer, the bridge layer adds diffusing: true to the original request and removes reasoningEffort and temperature (which are incompatible with Inception). max_completion_tokens, stop, and tools are forwarded.
  3. The browser receives SSE via the frame channel. An empty block first appears in the bubble, intermediate frames play at a steady pace, and finally align with the final assistant text in the conversation.

The bridge only takes effect for “faithful resend” requests: scenarios involving images/files, or animations already occupied by other bubbles in multi-step turns, will follow the original path.

Use Cases and Notes

Who it’s for: Developers or early adopters who are already using Inception Mercury in dsh Web and want to visually observe the diffusion denoising process rather than just seeing the final Markdown output.

Protocols and gateways: When connecting directly to Inception, use the bare model id (mercury-3). When going through an aggregation gateway, typically use a prefixed form (e.g., inception/mercury-3). Refer to the gateway’s documentation for details.

Security and trust: The plugin replaces the global assistant message rendering node and intercepts qualifying LLM streams to replay Mercury frames. You should read the repository code and THIRD_PARTY_NOTICES.md before installation. The community plugin directory skillhub.cn is not officially affiliated with DeepSeek or 幻方 (High-Flyer). The DSH ecosystem follows the philosophy of “everything is a plugin,” and whether to use this plugin is at your own discretion.

Reasoning preview differences: Compared to the native ui-chat, settings like “still preview reasoning after completion” are not visible to this plugin. Reasoning preview is only shown during generation.

Closing

dsh-mercury-diffusion brings Inception Mercury’s genuine denoising frames into dsh’s answer bubbles, adding the visualization layer unique to diffusion models without significantly altering the semantics of conversation logs. If you have already connected Mercury in your web profile, you can follow the steps in this article to install the plugin and try it with the per-model toggle enabled.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye