Mike's current integrations with Anthropic, OpenAI and Google Gemini are hand-rolled, using similarly named but ultimately unrelated functions for text generation and streaming.
Consider a refactor to Vercel's AI SDK, which normalises interaction with an LLM across all providers and models, and even offers a provider registry. This would simplify the codebase, replacing the selective function calls in lib/llm/index.ts with AI SDK's equivalent, and would allow easier addition of other providers.
Mike's current integrations with Anthropic, OpenAI and Google Gemini are hand-rolled, using similarly named but ultimately unrelated functions for text generation and streaming.
Consider a refactor to Vercel's AI SDK, which normalises interaction with an LLM across all providers and models, and even offers a provider registry. This would simplify the codebase, replacing the selective function calls in
lib/llm/index.tswith AI SDK's equivalent, and would allow easier addition of other providers.