Skip to content

test: add regression test for issue #237 (reasoning line breaks)#372

Merged
robert-j-y merged 5 commits intomainfrom
devin/1769563156-issue-237-regression-test
Jan 28, 2026
Merged

test: add regression test for issue #237 (reasoning line breaks)#372
robert-j-y merged 5 commits intomainfrom
devin/1769563156-issue-237-regression-test

Conversation

@robert-j-y
Copy link
Contributor

@robert-j-y robert-j-y commented Jan 28, 2026

Description

Adds a regression test for issue #237 ("Missing line breaks between reasoning sections in reasoning-delta stream") to the e2e/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:

  • Skipped test (it.skip): Checks for the issue pattern (/[^\s\n]\*\*/g) - will FAIL if issue is present, PASS when fixed. Unskip to verify fix.
  • Passing test: Verifies reasoning-delta chunks are received. Logs output for manual inspection.

Human Review Checklist

  • Verify the test uses the exact prompt from issue Missing line breaks between reasoning sections in reasoning-delta stream #237: "Think before answering. When does 2+2 not equal 4? Not counting final fields"
  • Verify the skipped test pattern (/[^\s\n]\*\*/g) accurately captures the issue (non-whitespace before **)
  • Note: Test depends on external API (openai/gpt-5.1) - may be flaky if model is unavailable

Checklist

  • I have run pnpm stylecheck and pnpm typecheck
  • I have run pnpm test and all tests pass
  • I have added tests for my changes (if applicable)
  • I have updated documentation (if applicable)

Changeset

  • I have run pnpm changeset to create a changeset file

Note: Empty changeset used since this is a test-only change that doesn't need a release.


Link to Devin run: https://app.devin.ai/sessions/c875a7bb2d8343268e871fed740c23c2
Requested by: Robert Yeakel (@robert-j-y)

devin-ai-integration bot and others added 5 commits January 28, 2026 01:21
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>
@robert-j-y robert-j-y merged commit ef3693d into main Jan 28, 2026
2 checks passed
@robert-j-y robert-j-y deleted the devin/1769563156-issue-237-regression-test branch January 28, 2026 02:15
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments