@built-in-ai/web-llm
Installation
Setup @built-in-ai/web-llm for AI SDK v6
Package Installation
npm i @built-in-ai/web-llmVersion Compatibility
| @built-in-ai/web-llm | AI SDK | Notes |
|---|---|---|
| v1.0.0 and above | v6.x | Current stable for AI SDK v6 |
| v0.3.2 and below | v5.x | Use 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");
}