Replies: 3 comments 1 reply
|
I read the branch ( The question first: which plugin, doing what? The title says plugins can break the wire protocol, but nothing in the diff or the post says how a plugin gets an unbalanced What the patch gets right. Synthesizing a Where I would push back: the fabricated call. This branch: lastMsg.tool_calls.push({
id: msg.tool_call_id,
type: 'function',
function: { name: 'tool', arguments: '{}' },
})invents an assistant action that never happened, and gives it a fake tool name. #4671 just established on this repo that the name is load-bearing — Your own One thing worth a test, because I read it rather than ran it. In the orphan path you call One thing that is fine, in case a reviewer flags it. One interaction to test together. #4671 is an inbound bug that produces tool calls with an empty Interest disclosure: I maintain a third-party DSH plugin, so "plugins can break the wire protocol" is a claim I have a stake in understanding precisely — which is most of why I want the repro. We do not modify DSH's own adapter or apiproxy and could not fix either; the above is a read of your diff against the same source, not a claim of authority over it. |
|
I reviewed the two changed paths and think the safest framing is three repair layers, because the serializer alone cannot establish execution truth:
At adapter time, a pending call with no result generally lacks enough execution evidence to say merely “interrupted”; conservative unknown-outcome wording is safer. For an orphan result, synthesizing A few regression cases seem essential: empty IDs, duplicate IDs, multiple parallel calls preserving declaration order, orphan before/after pending flush, malformed arguments breaking only I incorporated the patch review into a revised source-backed recovery guide and linear transcript validator: https://sandbaseai.github.io/deepseek-harness-handbook/insufficient-tool-messages.html Disclosure: I maintain the independent community handbook linked above. |
|
Thanks both — this is exactly the kind of review I needed. Update to the branch is in; the headline change is that I dropped the fabricated call. @weijiafu14 — you're right that the serialize-time net is the fail-soft layer, not the repair. On the diff itself:
@denial123789 — I agree with the three-layer framing, and the two higher layers (producer admission, agent-loop closure) are where the real repair belongs. What I changed on the containment layer:
Cross-adapter note: this fix lives in llm-deepseek's serializer; llm-pi-ai has its own adapter path, so the identical poisoned fixtures would need the same treatment there if you want it applied consistently. On the repro — it's simpler than a specific misbehaving plugin: restart the harness mid-call (any plugin that calls a tool), and the assistant tool_calls sit in the session log with no matching result. That's the durable poison; the net now also closes the tail-of-window case, not just a mid-history one. |
Uh oh!
There was an error while loading. Please reload this page.
Implemented a fix in my branch: https://github.com/erkinalp/deepseek-harness
All reactions