@built-in-ai
@built-in-ai/web-llm

Installation

Setup @built-in-ai/web-llm for AI SDK v6

Package Installation

npm i @built-in-ai/web-llm

Version Compatibility

@built-in-ai/web-llmAI SDKNotes
v1.0.0 and abovev6.xCurrent stable for AI SDK v6
v0.3.2 and belowv5.xUse for AI SDK v5

For AI SDK v5, please refer to the v5 documentation.

Verifying Installation

After installation, you can verify browser support:

import { doesBrowserSupportWebLLM } from "@built-in-ai/web-llm";

if (doesBrowserSupportWebLLM()) {
  console.log("Browser supports WebLLM!");
} else {
  console.log("WebLLM not available, use server fallback");
}

On this page