fix(tests): update provider tests for abortSignal second argument#463
fix(tests): update provider tests for abortSignal second argument#463easonLiangWorldedtech wants to merge 2 commits into
Conversation
…ix signal property name
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (29)
📝 WalkthroughWalkthroughThis PR adds cancellation support for streaming API requests by threading an ChangesAbortSignal Propagation Through API Providers
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
src/api/index.tsESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. src/api/providers/__tests__/base-openai-compatible-provider.spec.tsESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox. src/api/providers/__tests__/fireworks.spec.tsESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Fixes 31 failing provider tests caused by abortSignal changes in PR #434.
Root Cause
Providers now pass
{ signal: metadata?.abortSignal }as a second argument tochat.completions.create(), but test expectations only checked for one argument.Changes
{ signal: undefined }as second argument to all provider test mocksopenai-compatible.ts: changedabortSignal:tosignal:(AI SDK expectssignal)Test Results
31 failures → 0 failures (5956 passed, 35 skipped)
Summary by CodeRabbit
New Features
Tests