Repository navigation
Bug: vLLM self-hosted deployments stream thinking as delta.reasoning β adapter drops it (fix available) #199
Replies: 3 comments
|
We hit the exact same bug in production against vLLM 0.27.1 (NVIDIA-Nemotron-3.5-Lightning-30B-A3B, Since issues and external PRs are closed here, we published an upstream-ready fix on our fork (found this discussion afterwards β bundling the signal here instead of opening a duplicate): It is a superset of @DiGuStudent's vLLM context for maintainers: the field rename is tracked upstream in vllm-project/vllm#27755 β every self-hosted vLLM >= 0.27 deployment behind this adapter is affected. The bundled pi-ai path already tolerates all three aliases, so this closes an internal consistency gap between the two adapters. Happy to reshape either branch into whatever form the maintainers can take in. |
|
Measured datapoint that adds a working alternative for exactly this deployment shape: We fault-injected the real pi-ai 0.84.1 openai-completions client/accumulator (only the wire bytes synthetic) with deltas carrying thinking as Practical consequence: while Your fix proposal for |
Uh oh!
There was an error while loading. Please reload this page.
Summary
Self-hosted DeepSeek deployments on vLLM stream thinking-mode CoT as
delta.reasoninginstead of the officialdelta.reasoning_content.dsh-llm-deepseekreads only the official field, so against such gateways every reasoning delta is silently dropped.Observed consequences (measured against a vLLM 0.25.2 deployment serving deepseek-v4-flash)
outputTokenscomes fromcompletion_tokens(which includes reasoning tokens), while the decode window only spans visible text.Wire capture
vs. the official API, which sends
delta.reasoning_content.Root cause
packages/llm/llm-deepseek/src/translate.ts:const reasoning = delta?.reasoning_contentβ the alias is never consulted.Fix available
Two-line fallback plus the
WireDeltafield declaration:Branch with unit tests (alias accepted, official field preferred when both arrive), README note, and an Agent Note per repo policy: https://github.com/DiGuStudent/deepseek-harness/tree/fix/vllm-reasoning-field
Verified end-to-end against the vLLM endpoint after the patch: reasoning blocks are recorded, TTFT reflects the real first token, and the decode window spans the full generation.
I know external PRs are not accepted at the moment β filing this as a bug report per CONTRIBUTING.md; happy to open a PR with this branch whenever that changes, or adjust the approach if you'd rather handle the alias elsewhere.
All reactions