Browser support
Built-in AI lands engine by engine. Where it isn’t there yet, every package is a feature-detected no-op so your code doesn’t crash; render whatever fallback UI you want.
| Package | Chrome | Edge | Safari | Firefox |
|---|---|---|---|---|
@web-ai-sdk/prompt | 148+ · stable | 138+ · Canary/Dev · partial · flag | no-op fallback | no-op fallback |
@web-ai-sdk/summarizer | 138+ · stable | 138+ · stable · partial | no-op fallback | no-op fallback |
@web-ai-sdk/translator | 138+ · stable | 143+ · Canary/Dev · flag | no-op fallback | no-op fallback |
@web-ai-sdk/detector | 138+ · stable | 147+ · Canary/Dev · flag | no-op fallback | no-op fallback |
@web-ai-sdk/webmcp | 146+ · flag · OT 149+ | 147+ · flag | no-op fallback | no-op fallback |
Versions reflect when the underlying platform API became available. Wrapper exports stay stable across all browsers. “OT” means origin trial.
Edge specifics
Of the five APIs, only the Summarizer ships in Edge stable (enabled by default since Edge 138, per the Edge Writing Assistance APIs docs). The Prompt API is a developer preview in Edge Canary/Dev 138+, and Translator (Edge 143+) and Language Detector (Edge 147+) are Canary/Dev-only as well, each behind its own edge://flags/ toggle. WebMCP landed in Edge 147 behind a flag.
Prompt and Summarizer route through Phi-4-mini (or Phi-Silica on Copilot+ PCs) with a stricter safety pipeline than Chrome’s Gemini Nano; Translator and Language Detector run dedicated on-device models.
- Partial means the JS API is present but the on-device model frequently refuses output. Summarizer often returns “low quality output blocked”; prompt may emit C0 control-character placeholders instead of text. The library handles both cases (strips C0/C1, normalizes streaming shape, wraps refusals in typed errors), but the model itself is the bottleneck.
- Flag names differ: search “Phi mini” on
edge://flags/for Prompt/Writing Assistance, “translation api” for Translator, “language detection” for Language Detector. - Hardware check:
edge://on-device-internalsrequires “High” device performance class and all supplementary safety models (“GENERALIZED_SAFETY”, “TEXT_SAFETY”, “LANGUAGE_DETECTION”) in “Ready” state.
Tested on macOS; Windows behavior may differ.
Enabling on Chrome
| Surface | Flag |
|---|---|
| WebMCP | chrome://flags/#enable-webmcp-testing (Chrome 146+); origin trial opens in Chrome 149 |
| Prompt API | Stable in Chrome 148+ (no flag); Chrome 138–147 needs chrome://flags/#prompt-api-for-gemini-nano |
| Summarizer, Translator, Detector | Stable in Chrome 138+ |
After enabling a flag, restart Chrome and wait for the on-device model to download (chrome://on-device-internals).