Skip to content

feat: Migrate to Vercel AI SDK for unified multi-provider support #182

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

maxschulmeister
Copy link

This PR implements a major architectural improvement by migrating from provider-specific SDKs to the Vercel AI SDK, providing a unified interface for all supported AI providers while significantly improving developer experience.

  • Unified Model Interface: Replaced all separate provider-specific model implementations.
  • Simplified API: Streamlined model configuration - users can now specify models by string name (e.g., "gpt-4o") instead of enum values (ModelOptions.OPENAI_GPT_4O)
  • Consistent Error Handling: Centralized error handling across all providers with better context and logging
  • Easier Provider Addition: New providers can be added by simply installing the corresponding AI SDK package
  • Added support for OpenRouter
  • Consistent Parameter Handling: Unified LLM parameters across all providers (temperature, maxTokens, etc.)
  • Better Type Safety: Improved TypeScript types with proper AI SDK integration
  • Enhanced Test Suite: Added files flag to run tests on a limited number of files for faster development iteration and more cost efficiency

I hope you like my propoal, keep up the good work! 🚀

@maxschulmeister maxschulmeister marked this pull request as draft May 29, 2025 21:58
– validate credentials only for built in providers
– modelProvider now accepts enum or an ai-sdk provider
– update README
@maxschulmeister maxschulmeister marked this pull request as ready for review May 30, 2025 08:23
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.

1 participant