Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit 0d2db24

Browse files
committed
feat: refactor OpenRouter provider to use Vercel AI SDK
- Replace direct OpenAI SDK usage with @openrouter/ai-sdk-provider - Add 'ai' package for streamText() and generateText() functions - Extract reusable AI SDK conversion utilities to src/api/transform/ai-sdk.ts: - convertToAiSdkMessages(): Anthropic messages to CoreMessage format - convertToolsForAiSdk(): OpenAI tools to AI SDK tool format - processAiSdkStreamPart(): AI SDK stream events to ApiStreamChunk - Update tests to mock AI SDK functions instead of OpenAI client - Add comprehensive tests for the new ai-sdk.ts utility module This follows Vercel's AI SDK provider pattern for standardized LLM integration and enables easier migration of other providers in the future.
1 parent 7a38b99 commit 0d2db24

3 files changed

Lines changed: 357 additions & 1093 deletions

File tree

0 commit comments

Comments
 (0)