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, and reasoning_text from OpenAI-compatible Chat providers
  • preserve the selected scalar reasoning field when replaying assistant history
  • accept the known interleaved field names while tolerating provider-specific strings
  • add recorded scalar-reasoning cassettes for OpenRouter and Vercel AI Gateway

Structured reasoning_details continuation support is intentionally excluded and will be handled separately.

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 e82f68f to de9f0d1 Compare July 18, 2026 11:29
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