Skip to content

test: add e2e regression test for issue #190 (streamObject flush error)#373

Merged
robert-j-y merged 3 commits intomainfrom
devin/1769563160-issue-190-sparse-toolcalls-regression
Jan 28, 2026
Merged

test: add e2e regression test for issue #190 (streamObject flush error)#373
robert-j-y merged 3 commits intomainfrom
devin/1769563160-issue-190-sparse-toolcalls-regression

Conversation

@robert-j-y
Copy link
Contributor

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

Description

Adds an e2e regression test for GitHub issue #190, which reported a TypeError: Cannot read properties of undefined (reading 'sent') when using streamObject with certain models.

Test approach: Uses streamObject with jsonSchema to match the exact reproduction case from the issue. The test verifies:

  • Stream completes without TypeError
  • Returns valid structured output matching the schema
  • Works with both simple and nested schemas

Updates since last revision

  • Removed speculative root cause analysis from test comments
  • Test header now only includes known facts: issue link, reported date, affected/working versions

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)
  • [N/A] 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.

Human Review Checklist

  • Verify the test uses the same code pattern from the issue report (streamObject + jsonSchema)
  • Note: This is an e2e test that requires API keys; it verifies user-facing behavior works correctly

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

devin-ai-integration bot and others added 2 commits January 28, 2026 01:21
Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai>
- Remove sparse array unit test from src/chat/index.test.ts
- Add e2e test using streamObject + jsonSchema (matches issue exactly)
- Test verifies streamObject works without TypeError in flush function

Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai>
@robert-j-y robert-j-y changed the title test: add regression test for issue #190 (sparse tool call indices) test: add e2e regression test for issue #190 (streamObject flush error) Jan 28, 2026
Keep only known facts from the issue report

Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai>
@robert-j-y robert-j-y merged commit 9952a79 into main Jan 28, 2026
2 checks passed
@robert-j-y robert-j-y deleted the devin/1769563160-issue-190-sparse-toolcalls-regression branch January 28, 2026 02:23
kesavan-byte pushed a commit to osm-API/ai-sdk-provider that referenced this pull request Feb 13, 2026
…ect flush error) (OpenRouterTeam#373)

* test: add regression test for issue OpenRouterTeam#190 (sparse tool call indices)

Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai>

* test: replace unit test with e2e regression test for issue OpenRouterTeam#190

- Remove sparse array unit test from src/chat/index.test.ts
- Add e2e test using streamObject + jsonSchema (matches issue exactly)
- Test verifies streamObject works without TypeError in flush function

Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai>

* test: remove speculative root cause from issue OpenRouterTeam#190 test comments

Keep only known facts from the issue report

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