@browser-ai/core
Installation
Setup @browser-ai/core for AI SDK v6
Package Installation
npm i @browser-ai/coreVersion Compatibility
| @browser-ai/core | AI SDK | Notes |
|---|---|---|
| v2.0.0 and above | v6.x | Current stable for AI SDK v6 |
| v1.0.0 | 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
- Set the following flags to
Enabled:chrome://flags/#optimization-guide-on-device-modelchrome://flags/#prompt-api-for-gemini-nano-multimodal-input
- Click
Relaunchor 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 { doesBrowserSupportBrowserAI } from "@browser-ai/core";
if (doesBrowserSupportBrowserAI()) {
console.log("Browser supports browser AI!");
} else {
console.log("Browser AI not available, use server fallback");
}