# Ollama Provider V2 for Vercel AI SDK

A Vercel AI SDK provider for Ollama that implements the official Ollama API with minimal dependencies, working in Node.js, browsers and edge environments.

Ollama Provider V2 lets the Vercel AI SDK call models served by Ollama, implementing Ollama's own API directly rather than wrapping an OpenAI-compatible shim. It has few dependencies and works the same way in Node.js, in browsers, and in edge runtimes.

It supports the AI SDK's text generation and streaming functions, tool calling (with the SDK's step-based control needed to let a model call a tool and then continue to an answer), embeddings, and a reasoning or thinking mode for models that support chain-of-thought output, exposed either as a top-level SDK option or as an Ollama-specific provider option. Full TypeScript types are included.

It installs from npm alongside the Vercel AI SDK package, and is maintained under the Apache-2.0 license.

Website: https://github.com/opencomp-eu/ollama-ai-provider-v2
