-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat: migrate DeepSeek to @ai-sdk/deepseek + fix AI SDK tool streaming #11079
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🤖 Roo Code Review
SummaryStatus: ✅ Approved This PR successfully migrates the DeepSeek provider from the OpenAI SDK to the dedicated Key Changes Reviewed:
No Issues FoundThe implementation is clean, well-tested, and follows established patterns in the codebase. TODO
|
- Migrate DeepSeek provider from OpenAI SDK to @ai-sdk/deepseek - Add native reasoning support for deepseek-reasoner model - Extract cache metrics from providerMetadata.deepseek - Fix tool streaming for all AI SDK providers (DeepSeek, Moonshot) - Add handleToolCallEvent() helper in Task.ts for DRY event handling - Add top-level handlers for tool_call_start/delta/end events - Fix duplicate tool rendering by ignoring redundant tool-call events - Update all tests to use AI SDK mocks (29/29 passing) Closes EXT-644
fd1fc0f to
908677b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! This PR cleanly migrates DeepSeek to the dedicated @ai-sdk/deepseek package with native reasoning support and fixes the duplicate tool rendering issue in AI SDK providers. All 71 tests pass.
Summary
Migrates DeepSeek provider from OpenAI SDK to the dedicated
@ai-sdk/deepseekpackage, achieving full feature parity with significant improvements. Also fixes tool streaming for all AI SDK providers.Changes
DeepSeek Provider Migration
@ai-sdk/deepseekdeepseek-reasonermodelproviderMetadata.deepseekTool Streaming Fixes (affects DeepSeek + Moonshot)
handleToolCallEvent()helper in Task.ts (DRY)tool_call_start/delta/endeventstool-calleventsFiles Modified
src/api/providers/deepseek.ts- New AI SDK implementationsrc/api/providers/__tests__/deepseek.spec.ts- Updated testssrc/core/task/Task.ts- Tool streaming event handlerssrc/api/transform/ai-sdk.ts- Fixed duplicationsrc/package.json- Added @ai-sdk/deepseek dependencyTesting
Related Issues
Closes EXT-644
Important
Migrates DeepSeek to
@ai-sdk/deepseekand fixes tool streaming for AI SDK providers, enhancing functionality and compatibility.@ai-sdk/deepseekindeepseek.ts.deepseek-reasonermodel.providerMetadata.deepseek.baseURL.deepseek.spec.tspassing.handleToolCallEvent()inTask.tsfor tool streaming events.tool_call_start/delta/endevents.tool-callevents to prevent duplicate tool rendering.package.jsonto include@ai-sdk/deepseekdependency.ai-sdk.tsto process tool streaming events correctly.This description was created by
for 908677b. You can customize this summary. It will automatically update as commits are pushed.