Skip to content

fix(ai): align chat assistant content - #41210

Merged
rekram1-node merged 2 commits into
v2from
chat-content-parity
Aug 8, 2026
Merged

fix(ai): align chat assistant content#41210
rekram1-node merged 2 commits into
v2from
chat-content-parity

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • serialize reasoning-only assistant messages with content: "" while retaining content: null for tool-call messages
  • concatenate assistant text parts without adding separators
  • finalize accumulated tool calls and emit terminal events when compatible streams end cleanly without finish_reason
  • preserve reasoning deltas that arrive after text has started instead of silently dropping them
  • align native OpenAI Chat request lowering and stream handling with the AI SDK OpenAI and OpenAI-compatible adapters

Testing

  • bun typecheck in packages/ai
  • focused OpenAI Chat regression tests: 5 passing
  • full openai-chat.test.ts: 48 passing; one unrelated existing Azure URL assertion fails because the generated URL contains a duplicate /v1

Fixes #41165

Requested by: @rekram1-node (Aiden Cline via Slack)

@rekram1-node
rekram1-node merged commit 7afe537 into v2 Aug 8, 2026
8 of 10 checks passed
@rekram1-node
rekram1-node deleted the chat-content-parity branch August 8, 2026 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant