A lightweight Rust proxy that bridges Firefox's AI sidebar to a local LM Studio instance.
Firefox's AI chatbot sidebar sends GET /?q=<prompt> requests to the configured provider URL. LM Studio expects OpenAI-compatible POST /v1/chat/completions requests. This proxy translates between the two — streaming tokens in real time with a polished, rendered UI.
This project was 100% vibe-coded — every single line of Rust, HTML, CSS, and JavaScript was written by AI through conversational prompting. No code was written by hand.
Built with:
- GitHub Copilot (agent mode)
- Claude Opus 4.6 by Anthropic
The human provided the idea, direction, and feedback. The AI wrote the code.
- Streaming — Responses appear token-by-token as the model generates them (SSE)
- Rendered Markdown — Code blocks with syntax highlighting, tables, lists, and more
- Quick follow-up questions — After each response, ask another question in-page (for example "summarize this website") using the original input and recent turns as context
- Thinking model support — Reasoning is shown in a collapsible panel during generation, then auto-collapsed once reasoning completes. Supports both the
reasoning_contentfield (LM Studio 0.4.8+) and<think>tags in older versions - Dark / Light mode — Follows the system
prefers-color-schemeautomatically - Fully offline — All frontend dependencies (marked.js, highlight.js) are vendored and embedded in the binary
- Single binary — No runtime dependencies, no config files, just run it
demo.mp4
Download the latest release for your platform from the Releases page:
| Platform | File |
|---|---|
| Linux x86_64 | lmstudio-firefox-proxy-x86_64-unknown-linux-gnu.tar.gz |
| Linux aarch64 | lmstudio-firefox-proxy-aarch64-unknown-linux-gnu.tar.gz |
| macOS x86_64 | lmstudio-firefox-proxy-x86_64-apple-darwin.tar.gz |
| macOS Apple Silicon | lmstudio-firefox-proxy-aarch64-apple-darwin.tar.gz |
| Windows x86_64 | lmstudio-firefox-proxy-x86_64-pc-windows-msvc.zip |
Requires Rust 1.85+.
cargo install --git https://github.com/blu3r4y/lmstudio-firefox-proxyOr clone and build:
git clone https://github.com/blu3r4y/lmstudio-firefox-proxy
cd lmstudio-firefox-proxy
cargo build --releaseThe binary will be at target/release/lmstudio-firefox-proxy (.exe on Windows).
# Use defaults (listen on 127.0.0.1:8000, LM Studio at localhost:1234)
lmstudio-firefox-proxy
# Specify a model explicitly
lmstudio-firefox-proxy --model "lmstudio-community/gemma-3-27B-it-qat-GGUF"
# Custom listen address and LM Studio URL
lmstudio-firefox-proxy --listen 127.0.0.1:9090 --lmstudio-url http://192.168.1.100:1234All options can also be set via environment variables:
| Flag | Env var | Default |
|---|---|---|
--listen / -l |
LISTEN_ADDR |
127.0.0.1:8000 |
--lmstudio-url |
LMSTUDIO_URL |
http://localhost:1234 |
--model / -m |
MODEL |
(empty — uses LM Studio's loaded model) |
To have the proxy start automatically when you log in, create a scheduled task using Task Scheduler. Replace the paths and arguments as needed for your setup.
Program:
C:\Program Files\PowerShell\7\pwsh.exe
Arguments:
-WindowStyle Hidden -ExecutionPolicy Bypass -Command "Start-Process -FilePath 'C:\PATH\TO\lmstudio-firefox-proxy.exe' -ArgumentList '--model qwen/qwen3.5-9b' -WindowStyle Hidden"
Tested with LM Studio 0.4.8 (latest). Older versions that use the same OpenAI-compatible API should also work — thinking models are supported regardless of whether the server sends reasoning via the reasoning_content field (new) or <think> tags (old).
- Open
about:configin Firefox - Set
browser.ml.chat.enabledtotrue - Set
browser.ml.chat.hideLocalhosttofalse - Set
browser.ml.chat.providertohttp://127.0.0.1:8000(or whichever address the proxy listens on) - Open the AI chatbot sidebar (Ctrl+Alt+X or via the sidebar menu)
You should see a "Proxy is running" landing page. Select text on any page and use the "Ask AI" context menu, or use the sidebar directly.