sgomez/ollama-ai-provider

This is a pretty essential package for using an Ollama instance as an AI model provider with Vercel’s AI SDK. It’s pretty lightweight.

However, now that Ollama also has OpenAI-compatible endpoints, you can actually get pretty far with just using the first-party Open AI provider with a custom URL provided that actually points to an Ollama instance.

I had some issues with this around streaming tool-call support in Ollama when trying to work this into an AG-UI flow. However, since then Ollama has announced proper streaming tool call support so this may not be an issue anymore.

6/17/2025