Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@daniel-lxs
Copy link
Member

@daniel-lxs daniel-lxs commented Jan 29, 2026

Summary

Migrate the Groq provider from OpenAI SDK to the AI SDK using @ai-sdk/groq.

Changes

  • Replace openai SDK with @ai-sdk/groq package
  • Extend BaseAiSdkProvider instead of BaseOpenAiCompatibleProvider
  • Implement Groq-specific cache metrics handling via providerMetadata
  • Update tests to use AI SDK mocking patterns

Linear Issue

Part of EXT-644: Migrate OpenAI-compatible providers to AI SDK
Closes EXT-691

Test Plan

  • All existing tests migrated and passing
  • Type checking passes
  • Lint passes

Important

Migrate Groq provider to AI SDK using @ai-sdk/groq, update GroqHandler class, and adjust tests and dependencies accordingly.

  • Behavior:
    • Migrate Groq provider from OpenAI SDK to AI SDK using @ai-sdk/groq.
    • Extend BaseProvider instead of BaseOpenAiCompatibleProvider in groq.ts.
    • Implement Groq-specific cache metrics handling via providerMetadata in groq.ts.
  • Tests:
    • Update tests in groq.spec.ts to use AI SDK mocking patterns.
  • Dependencies:
    • Add @ai-sdk/groq to dependencies in package.json.

This description was created by Ellipsis for f5b6409. You can customize this summary. It will automatically update as commits are pushed.

@daniel-lxs daniel-lxs requested review from cte, jr and mrubens as code owners January 29, 2026 22:37
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. Enhancement New feature or request labels Jan 29, 2026
@roomote
Copy link
Contributor

roomote bot commented Jan 29, 2026

Rooviewer Clock   See task on Roo Cloud

Re-reviewed the changes since commit 1991930. The previously flagged issue remains unresolved.

  • Missing totalCost calculation in processUsageMetrics() - the old implementation calculated costs using calculateApiCostOpenAI(), but this was removed in the migration
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

- Replace openai SDK with @ai-sdk/groq package
- Extend BaseAiSdkProvider instead of BaseOpenAiCompatibleProvider
- Implement Groq-specific cache metrics via providerMetadata
- Update tests to use AI SDK mocking patterns

Part of EXT-644
@daniel-lxs daniel-lxs force-pushed the feature/ext-691-migrate-groq-provider-to-ai-sdk branch from 1991930 to f5b6409 Compare January 29, 2026 23:00
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 30, 2026
@mrubens mrubens merged commit e771a49 into main Jan 30, 2026
10 checks passed
@mrubens mrubens deleted the feature/ext-691-migrate-groq-provider-to-ai-sdk branch January 30, 2026 14:45
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jan 30, 2026
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants