Skip to content

fix(openai-adapters): map reasoning-delta to reasoning_content#11089

Open
MumuTW wants to merge 2 commits intocontinuedev:mainfrom
MumuTW:fix-reasoning-delta-mapping-11069
Open

fix(openai-adapters): map reasoning-delta to reasoning_content#11089
MumuTW wants to merge 2 commits intocontinuedev:mainfrom
MumuTW:fix-reasoning-delta-mapping-11069

Conversation

@MumuTW
Copy link
Contributor

@MumuTW MumuTW commented Mar 5, 2026

Summary

  • map reasoning-delta stream parts to delta.reasoning_content instead of delta.content
  • switch the converter path to chatChunkFromDelta for reasoning chunks
  • update vercelStreamConverter test to assert reasoning_content output

Testing

  • cd packages/openai-adapters && npm test -- src/test/vercelStreamConverter.test.ts

Fixes #11069


Continue Tasks: 🔄 7 running — View all


Summary by cubic

Map "reasoning-delta" to "reasoning_content" in the Vercel stream converter so reasoning tokens go to the correct delta field. Switched reasoning chunks to use chatChunkFromDelta and updated tests. Fixes #11069.

  • Bug Fixes
    • Use delta.reasoning_content for reasoning-delta instead of delta.content.
    • Update vercelStreamConverter.test to assert reasoning_content and fix TS assertion (cast to any) to resolve TS1005 errors.

Written for commit 37794f4. Summary will update on new commits.

@MumuTW MumuTW requested a review from a team as a code owner March 5, 2026 18:37
@MumuTW MumuTW requested review from sestinj and removed request for a team March 5, 2026 18:37
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Mar 5, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@MumuTW MumuTW force-pushed the fix-reasoning-delta-mapping-11069 branch from 132933e to c41e8c3 Compare March 5, 2026 23:37
@MumuTW
Copy link
Contributor Author

MumuTW commented Mar 5, 2026

I have read the CLA Document and I hereby sign the CLA

The `as typeof X & Y` type assertion was ambiguous to the TypeScript
parser without parentheses, causing TS1005 errors. Simplify to `as any`
since this is a test assertion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Vercel stream converter maps reasoning-delta to content instead of reasoning_content

1 participant