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-04 18:06:26 +01:00
2026-02-01 22:25:07 +01:00
2026-03-08 00:55:52 +01:00
2026-03-02 23:00:15 +01:00

pi logo

Discord Build status

pi.dev domain graciously donated by

Exy mascot
exe.dev

Pi Monorepo

Looking for the pi coding agent? See packages/coding-agent for installation and usage.

Tools for building AI agents and managing LLM deployments.

Packages

Package Description
@mariozechner/pi-ai Unified multi-provider LLM API (OpenAI, Anthropic, Google, etc.)
@mariozechner/pi-agent-core Agent runtime with tool calling and state management
@mariozechner/pi-coding-agent Interactive coding agent CLI
@mariozechner/pi-mom Slack bot that delegates messages to the pi coding agent
@mariozechner/pi-tui Terminal UI library with differential rendering
@mariozechner/pi-web-ui Web components for AI chat interfaces
@mariozechner/pi-pods CLI for managing vLLM deployments on GPU pods

Contributing

See CONTRIBUTING.md for contribution guidelines and AGENTS.md for project-specific rules (for both humans and agents).

Development

npm install          # Install all dependencies
npm run build        # Build all packages
npm run check        # Lint, format, and type check
./test.sh            # Run tests (skips LLM-dependent tests without API keys)
./pi-test.sh         # Run pi from sources (must be run from repo root)

Note: npm run check requires npm run build to be run first. The web-ui package uses tsc which needs compiled .d.ts files from dependencies.

License

MIT

Description
sproutclaw - AI powered suite
Readme MIT 71 MiB
Languages
TypeScript 93.4%
JavaScript 5.7%
CSS 0.4%
Shell 0.3%
C 0.1%