test: add regression test for issue #237 (reasoning line breaks)#372
Merged
robert-j-y merged 5 commits intomainfrom Jan 28, 2026
Merged
test: add regression test for issue #237 (reasoning line breaks)#372robert-j-y merged 5 commits intomainfrom
robert-j-y merged 5 commits intomainfrom
Conversation
Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai>
- Test now checks for exact issue pattern: non-whitespace before ** - Skipped test documents upstream issue (not in ai-sdk-provider) - Added passing tests to verify reasoning-delta streaming works correctly Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai>
- Uses exact prompt: 'Think before answering. When does 2+2 not equal 4? Not counting final fields' - Uses exact code pattern from issue (provider, model, stream, prompt) - Logs reasoning output for manual inspection - Skipped test checks for exact issue pattern (non-whitespace before **) Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai>
Keep only known facts - remove speculation about upstream vs ai-sdk-provider Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai>
Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai>
kesavan-byte
pushed a commit
to osm-API/ai-sdk-provider
that referenced
this pull request
Feb 13, 2026
…e breaks) (OpenRouterTeam#372) * test: add regression test for issue OpenRouterTeam#237 (reasoning line breaks) Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai> * fix: rewrite test to accurately match issue OpenRouterTeam#237 pattern - Test now checks for exact issue pattern: non-whitespace before ** - Skipped test documents upstream issue (not in ai-sdk-provider) - Added passing tests to verify reasoning-delta streaming works correctly Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai> * fix: use exact code and prompt from issue OpenRouterTeam#237 - Uses exact prompt: 'Think before answering. When does 2+2 not equal 4? Not counting final fields' - Uses exact code pattern from issue (provider, model, stream, prompt) - Logs reasoning output for manual inspection - Skipped test checks for exact issue pattern (non-whitespace before **) Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai> * fix: remove root cause analysis from test comments Keep only known facts - remove speculation about upstream vs ai-sdk-provider Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai> * refactor: clean up redundant comments in test file Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a regression test for issue #237 ("Missing line breaks between reasoning sections in
reasoning-deltastream") to thee2e/issues/directory.Issue Summary: When streaming reasoning content with
openai/gpt-5.1, section titles (like**Exploring mathematical concepts**) don't have line breaks before them (e.g.,intriguing!**Discussing arithmetic**).Test Coverage:
it.skip): Checks for the issue pattern (/[^\s\n]\*\*/g) - will FAIL if issue is present, PASS when fixed. Unskip to verify fix.reasoning-deltachunks are received. Logs output for manual inspection.Human Review Checklist
reasoning-deltastream #237:"Think before answering. When does 2+2 not equal 4? Not counting final fields"/[^\s\n]\*\*/g) accurately captures the issue (non-whitespace before**)openai/gpt-5.1) - may be flaky if model is unavailableChecklist
pnpm stylecheckandpnpm typecheckpnpm testand all tests passChangeset
pnpm changesetto create a changeset fileLink to Devin run: https://app.devin.ai/sessions/c875a7bb2d8343268e871fed740c23c2
Requested by: Robert Yeakel (@robert-j-y)