Commit Graph
4 Commits
Author SHA1 Message Date
cat-shark e7d12b5532 fix: retry instead of stalling when DSML tool-call markup leaks
DeepSeek V4 sometimes expresses a tool call as its internal DSML markup
instead of filling `tool_calls`, and Qoder's gateway leaks the tag skeleton
rather than converting it. When no structured call arrives the turn used to
end as an empty `stop` and the agent stopped mid-task with no error.

Handle both shapes:

- Filter the delimited form (`||DSML||tool_calls` ...) on the reasoning and
  content channels, rebuilding a complete block into a structured call.
- Strip the delimiter-less form the gateway leaves behind
  (`<parameter name="command">…</parameter>`, `</invoke>`, `</tool_calls>`,
  a stray `</thinking>`) line-wise before the empty-turn guard reads the
  message, and make `hasVisibleText` ignore markup-only text. That form used
  to land in the *content* channel as a normal reply, so the guard saw
  visible text and never fired.

A turn that produces only leaked markup now fails with a retryable error
(matching pi's "ended without" pattern) instead of ending silently.
2026-09-24 17:17:18 +08:00
Cursor Agent 8a2a9b2481 perf: cut hot-path body copies, Cosy hashing, and per-request disk reads 2026-09-06 10:07:32 +00:00
Cursor AgentandSimon Shi 11249d12c4 Format reorganized provider modules
Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 17:11:43 +00:00
Cursor AgentandSimon Shi 9d88e995ee Refactor provider around fixed regions and friendly model ids
Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 17:11:18 +00:00