Introduction¶
In the DeepSeek Harness (DSH) ecosystem, connecting to custom gateways (such as vLLM, LM Studio, or self-hosted OpenAI proxies) typically requires a dedicated adapter. dsh-llm-openai-completions is an OpenAI Completions-compatible adapter for custom gateways. It fills the gap beyond llm-deepseek and llm-pi-ai, specifically handling protocol differences in non-standard gateways, especially compatibility issues related to role definitions and thinking modes.
Core Features¶
The plugin mainly addresses the following issues:
- Role definition compatibility: Forces the use of
role: "system", avoiding errors from custom gateways when they receive the non-standarddeveloperrole (Unexpected message role400). - Thinking-mode driven behavior: Thinking behavior is driven by
compat.thinkingFormatin the model configuration, supporting multiple formats such as Qwen3.6 (enable_thinking), Qwen Chat Template, and Qwen3.8 (reasoning_effort). - Response-side parsing: On the receiving side, separates Qwen3-style thinking content (vLLM renders it inside
content) into independent reasoning blocks, preventing thinking text from being mixed into the main response body. - Vision input support: Supports receiving user-uploaded images (single or multiple) and serializing them into an OpenAI-compatible multi-part
contentarray (image_url).
Installation and Enablement¶
Installation¶
Install the plugin using the DSH command line (npm registry recommended):
dsh plugin --profile web add dsh-llm-openai-completions -w
After installation, restart dsh web to activate the plugin:
dsh web
Configuration and Enablement¶
Enable the plugin in ~/.dsh/profiles/web/cordis.patch.yml and specify the list of providers for which the plugin should take over proxy handling:
llm-openai-completions:
enabled: true
providers:
- local-35b
Typical Usage¶
In the llm-pi-ai configuration, specify api: openai-completions and configure the baseURL and model parameters. The plugin takes over the streaming behavior for that provider based on the configuration.
llm-pi-ai:
providers:
local-35b:
api: openai-completions
baseURL: http://192.168.100.242:8200/v1
models:
- id: Qwen3.6-35B-A3B
reasoningEfforts: { off: null, high: 'high' }
compat:
thinkingFormat: qwen # 使用 enable_thinking,不使用 reasoning_effort
Notes¶
- Project maintenance has ended: According to an announcement dated 2026-10-01, this project has been discontinued and removed. The reason is that
dsh-thinking-levelsno longer requires this plugin. - Version status: The version on npm remains
0.1.0. Althoughpackage.jsonshows0.2.0, the0.2.0branch with vision/image input support was never published and will not be published. - Dependencies: Vision input support depends on
ctx.attachments(attachment storage) provided by the host to read image bytes and perform Base64 encoding. Text-only models are not affected.