Skip to content

fix(ai): parse compatible reasoning deltas#37558

Open
opencode-agent[bot] wants to merge 1 commit into
v2from
fix-reasoning-delta
Open

fix(ai): parse compatible reasoning deltas#37558
opencode-agent[bot] wants to merge 1 commit into
v2from
fix-reasoning-delta

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • parse streamed reasoning_content, reasoning, reasoning_text, and structured reasoning_details
  • merge incremental structured detail chunks by identity so text and signatures replay as one valid detail
  • preserve the selected scalar field and structured details when replaying assistant history
  • retain encrypted reasoning details on matching tool calls for continuation
  • accept the known interleaved field names while tolerating provider-specific strings
  • add recorded reasoning and signed-continuation cassettes for two compatible gateways

Testing

  • bun test test/provider/openai-chat.test.ts test/provider/openai-chat-reasoning.recorded.test.ts (packages/ai)
  • bun typecheck (packages/ai)
  • bun test test/config/provider-v1.test.ts (packages/core)
  • bun typecheck (packages/core)
  • live cassette recording followed by offline replay for both gateway fixtures

Fixes #37553

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

@opencode-agent
opencode-agent Bot force-pushed the fix-reasoning-delta branch from dccc474 to e82f68f Compare July 18, 2026 03:26
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