@built-in-ai/core
Installation
Setup @built-in-ai/core for AI SDK v6
Package Installation
npm i @built-in-ai/coreVersion Compatibility
| @built-in-ai/core | AI SDK | Notes |
|---|---|---|
| v3.0.0 and above | v6.x | Current stable for AI SDK v6 |
| v2.1.0 and below | v5.x | Use for AI SDK v5 |
For AI SDK v5, please refer to the v5 documentation.
Chrome Setup
- Use Chrome version 128 or higher
- Navigate to
chrome://flags/ - Search for "Prompt API for Gemini Nano with Multimodal Input"
- Set it to Enabled
- Go to
chrome://components - Click Check for Update on Optimization Guide On Device Model
- Restart Chrome
Edge Setup
- Use Edge Dev/Canary version 138.0.3309.2 or higher
- Navigate to
edge://flags/#prompt-api-for-phi-mini - Set it to Enabled
- Restart Edge
For more information, check out Chrome's official guide.
Verifying Installation
After installation, you can verify browser support:
import { doesBrowserSupportBuiltInAI } from "@built-in-ai/core";
if (doesBrowserSupportBuiltInAI()) {
console.log("Browser supports built-in AI!");
} else {
console.log("Built-in AI not available, use server fallback");
}