AI Agent Hub
Back to plugins
dsh-llm-openai-completions preview

dsh-llm-openai-completions

Model Inference Updated 2026.08.31

Run the following command in DeepSeek Harness:

dsh plugin install drscrewdriver/dsh-llm-openai-completions

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install drscrewdriver/dsh-llm-openai-completions in your DeepSeek Harness terminal to install this plugin; the full source is available at https://github.com/drscrewdriver/dsh-llm-openai-completions .

About this plugin

DeepSeek Harness ships with pi-ai, whose compatibility layer assumes every non-standard baseURL supports the developer role. When a self-hosted proxy such as vLLM or LM Studio actually rejects that role, the request dies with a 400 before any inference happens. Compounding the problem, Qwen3-style models render thinking tokens directly into the content body on vLLM, making it impossible for the frontend to separate reasoning from the answer. dsh-llm-openai-completions acts as a fourth adapter class that takes over the wire behaviour of those providers with a zero-guessing policy: system is always sent as role "system", the thinking field is forwarded strictly according to each model's compat.thinkingFormat (enable_thinking, chat_template_kwargs, or reasoning_effort), and the receive path splits thinking text back out of content into a dedicated reasoning block.

Since v0.2.0 the adapter also closes the vision loop. When a model declares image input capability in its llm-pi-ai entry, user-uploaded single or multiple images are serialised as base64 data URIs inside an OpenAI-compatible multi-part content array, preserving source order alongside interleaved text parts. Models without vision capability are rejected loudly with UNSUPPORTED_CONTENT—nothing is silently dropped.

All configuration stays in the existing Settings → Models llm-pi-ai section. The plugin wraps the stream of the providers you list rather than re-registering them, so it coexists cleanly with the built-in llm-deepseek and llm-pi-ai adapters. It is built for developers and teams who run Qwen or other self-hosted models behind vLLM, LM Studio, or a custom OpenAI proxy and need correct thinking passthrough plus multi-image vision input without forking pi-ai.

Screenshots

Use Cases

  • Running Qwen behind vLLM or LM Studio without the developer-role 400 error
  • Forwarding enable_thinking or reasoning_effort through a self-hosted OpenAI proxy per compat.thinkingFormat
  • Feeding single or multiple images to vision models in source order while non-vision models reject loudly

Best For

  • Developers running Qwen or other open models behind vLLM, LM Studio, or a custom OpenAI proxy
  • LLM application teams that need clean reasoning-body separation without forking pi-ai
  • DeepSeek Harness users who prefer a plugin-level adapter over modifying the built-in pi-ai codebase