Menu

1 / 9

Running LLMs inside a Chrome extension: WebLLM, transformers.js and the MV3 traps

DEV Community: javascript·Dannick Kwengang·4 days ago
#FlzlSEwX
#devtojavascript#devto#dev#model#worker
Reading 0:00
15s threshold

I build AWFlow, a Chrome extension that runs automation workflows in your browser. One of its node types is "summarize, classify or extract this text with AI". I wanted that step to work without an API key and without sending the page anywhere , which meant running the model inside the extension itself.

This post covers what that took: three runtimes, two Web Workers, one CSP surprise, and a fallback path for machines without WebGPU. If you want the gentler tour of what WebLLM and Chrome's built-in AI are, read Run AI nodes directly in Chrome with WebLLM and Chrome AI API first. This one is about the plumbing.

Why run the model in the extension

Look at what most "AI automation" steps actually do: summarize a page, tag a sentiment, pull five fields out of some HTML. You don't need a frontier model in a data center for that.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.