vercel/modelfusion
ModelFusion is a TypeScript library that provides a vendor-neutral abstraction layer for integrating AI models (text, images, speech) into JavaScript/TypeScript applications.

ModelFusion unifies the API for common AI operations such as text streaming, structured object generation, and tool usage across multiple providers including OpenAI, Anthropic, Ollama, and Hugging Face. It supports multi-modal models for text generation, image generation, vision, text-to-speech, speech-to-text, and embeddings. The library includes production features like observability hooks, logging, and automatic retries, and is now being integrated into the Vercel AI SDK.