Files
sproutclaw/packages
Geraldo Dutra Neto 23109b113d fix: send assistant content as string in openai-completions provider (#2008)
The OpenAI Chat Completions API standard format for assistant message
content is a plain string. Sending it as an array of
{type:"text", text:"..."} objects causes some models (notably DeepSeek
V3.2 via NVIDIA NIM) to mirror the content-block structure literally
in their output. This produces recursive nesting where each turn wraps
the previous content blocks deeper:

  [{'type':'text','text':'[{\'type\':\'text\',\'text\':...}]'}]

The fix unifies the assistant content serialization to always use a
joined string — the same approach already used for the github-copilot
provider — for all openai-completions backends.

Affected models observed: deepseek-ai/deepseek-v3.2 (nvidia provider).
Models like GLM-5, GPT-4, Claude were unaffected as they tolerate
array content, but sending a standard string is safer for all.

Co-authored-by: geraldoaax <geraldoaax@users.noreply.github.com>
2026-03-10 16:04:11 +01:00
..
2026-03-08 00:55:52 +01:00