Skip to content

[Refactor] Roll out stream helpers to Anthropic Vertex spec - #1094

Merged
edelauna merged 2 commits into
mainfrom
refactor/large-provider-stream-test-utils-06q4nypl2c73c
Aug 1, 2026
Merged

[Refactor] Roll out stream helpers to Anthropic Vertex spec#1094
edelauna merged 2 commits into
mainfrom
refactor/large-provider-stream-test-utils-06q4nypl2c73c

Conversation

@zoomote

@zoomote zoomote Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Created by Roomote. Follow up by mentioning @roomote, in the web UI, or in Discord.

What changed

  • Migrated anthropic-vertex.spec.ts to the shared stream helpers.
  • Replaced array-driven for (const chunk of mockStream) yield chunk iterators, direct-yield stream mocks, and default streaming mocks with asyncStreamFrom.
  • Replaced all pure collect loops and consume/drain loops with collectStream, including the rejection-drain assertion.
  • Removed the now-unused ApiStreamChunk import after the migration.
  • Left the existing ESLint suppressions count unchanged after verification.

Why this change was made

This is the more ambitious continuation of the approved test-utils rollout: one of the largest remaining provider-spec stream-mock files, cleared in a single focused PR.

Impact

No user-facing behavior change. The 44-test Anthropic Vertex spec now uses the shared stream-helper idiom, targeted tests passed, src lint/typecheck passed, and the full Zoo-Code test suite passed.

Related PRs

@zoomote

zoomote Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

1 issue outstanding. See task

  • src/api/providers/__tests__/anthropic-vertex.spec.ts:9ApiStreamChunk is still imported but no longer used anywhere in the file after the collectStream migration (all typed chunks: ApiStreamChunk[] declarations were removed). Lint/typecheck don't catch it since unused-var checks are off, but the sibling OpenAI spec migration ([Refactor] Roll out stream helpers to OpenAI spec #1093) dropped the equivalent import. Remove the import to keep the migration complete.

Reviewed 5a7f681

@codecov

codecov Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@zoomote

zoomote Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the outstanding review finding in anthropic-vertex.spec.ts by removing the unused ApiStreamChunk import.

  • Commit: 0cbe77fbda650d578593b819db90a7a520431814
  • Validation: targeted Anthropic Vertex spec, check-types, and lint passed before push; PR metadata refreshed.
  • Thread state: no inline review thread existed for this finding; the fix is reflected in the updated PR body.

@edelauna
edelauna marked this pull request as ready for review August 1, 2026 20:13
@github-actions github-actions Bot added the awaiting-review PR changes are ready and waiting for maintainer re-review label Aug 1, 2026
@edelauna
edelauna enabled auto-merge August 1, 2026 20:13
@github-actions github-actions Bot removed the awaiting-review PR changes are ready and waiting for maintainer re-review label Aug 1, 2026
@edelauna
edelauna added this pull request to the merge queue Aug 1, 2026
Merged via the queue into main with commit 4497c6f Aug 1, 2026
23 checks passed
@edelauna
edelauna deleted the refactor/large-provider-stream-test-utils-06q4nypl2c73c branch August 1, 2026 20:30
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.

2 participants