qwen-code/packages/core
顾盼 8a0489625b
fix(core): use empty string instead of null for reasoning-only assistant content (#3499)
When a model (e.g. Ollama qwen3.5:9b) returns a response with
reasoning/thinking content but an empty text body, the assistant message
was constructed with `content: null`. Some OpenAI-compatible providers
(e.g. Ollama) reject such requests with HTTP 400 when reasoning_content
is also present.

Fix: in processContent(), when assistantTextContent is empty but
reasoningParts is non-empty, use '' instead of null. Tool-call-only
messages (no reasoning) retain `content: null` to stay spec-compliant.

Adds three regression tests covering:
- reasoning-only → content is ''
- tool-call-only → content is null (OpenAI spec)
- reasoning + text → content is the actual text

Fixes #3421
2026-04-22 05:28:34 +08:00
..
scripts Fix: Improve ripgrep binary detection and cross-platform compatibility (#1060) 2025-11-18 19:38:30 +08:00
src fix(core): use empty string instead of null for reasoning-only assistant content (#3499) 2026-04-22 05:28:34 +08:00
vendor feat test tool permissions 2026-03-10 16:30:22 +08:00
index.ts fix: Remove remaining ClearcutLogger export from packages/core/index.ts 2026-02-01 14:52:14 +08:00
package.json chore(release): bump version to 0.14.5 (#3298) 2026-04-15 22:43:29 +08:00
test-setup.ts feat(memory): managed auto-memory and auto-dream system (#3087) 2026-04-16 20:05:45 +08:00
tsconfig.json fix: upgrade @lydell/node-pty to 1.2.0-beta.10 to fix PTY FD leak 2026-04-01 07:55:56 +08:00
vitest.config.ts Sync upstream Gemini-CLI v0.8.2 (#838) 2025-10-23 09:27:04 +08:00