Skip to content

Repository files navigation

Prisma — active model combiner for robust, precise AI responses

Prisma runs multiple AI models in parallel — cloud (OpenRouter) or fully local (Ollama / LM Studio / vLLM) — and synthesizes their answers into one stronger response. It also does image consensus (side-by-side generation from multiple image models) with image-to-image. Your keys stay in your browser; local mode never leaves your machine.

License: MIT Local-first


💡 What it is

A web app that runs multiple AI models (ChatGPT, Claude, Gemini, Llama, DeepSeek, etc.) at the same time, in parallel, then combines their answers using a "synthesizer" model you choose. Instead of asking a single model, you ask several and get one consolidated, more robust answer.

🎯 Goal

Improve the quality and reliability of AI responses. Different models have different strengths — some reason better, others code better, others write better. Prisma takes the best of each and reduces hallucinations by cross-checking the answers.

📋 How to use

  1. 👉 Paste your OpenRouter API Key (free — link to create one is inside the app)
  2. 👉 Select 1 to N models to run in parallel
  3. 👉 Pick the Synthesizer model (the one that consolidates the final answer)
  4. 👉 Type your question and get the individual answers + the synthesis

✨ Features

✅ Multiple models in parallel (any model from OpenRouter) ✅ Automatic synthesis of the final answer by a model of your choice ✅ Optional web search ✅ Attach files (up to 8) for context ✅ Catalog of 350+ models, filters by modality (text/image/audio) and search ✅ Model logos, tooltips, and UI color-coded by mode (Quality / Budget / Fast / Custom / Image) ✅ Key stored in the browser (localStorage) — no need to paste it every time

🖼 Image Mode (image consensus)

Beyond text synthesis, Prisma generates images: pick the Image mode, choose 1 to N image models (Gemini 3 Pro Image (Nano Banana Pro), GPT-5 Image, Gemini 2.5 Flash Image (Nano Banana), or any other from OpenRouter) and type a prompt. The app calls each model in parallel and shows a grid with the side-by-side versions — you click the best one and download it. It also works with a reference image (image-to-image): attach a file and it becomes the base for generation. Image-to-image is fully functional via the OpenRouter input_references parameter — the attached image is sent as a reference and the model edits it.

🖥 Local mode (multiple runtimes)

Besides cloud models, Prisma runs any local model through Local mode. It auto-detects the runtime and supports Ollama (http://localhost:11434), LM Studio (http://localhost:1234/v1), vLLM (http://localhost:8000/v1), GPT4All (http://localhost:4891/v1), Jan (http://localhost:1337/v1), and any OpenAI-compatible endpoint. Pick a preset or paste your URL — Prisma shows the detected runtime and lists your installed models. Nothing leaves your machine.

How it works (and why a local server is required): Local runtimes (Ollama, LM Studio, etc.) listen on localhost. A browser tab cannot call them directly (CORS / mixed-content blocks it). Prisma ships a tiny Node proxy (server.js) that runs on the same machine as the app and forwards requests to the local runtime. The browser only ever talks to the proxy — same origin, no CORS.

  • App (browser) → GET /api/local/api/tags (relative path)
  • server.js → forwards to http://localhost:11434/api/tags (your Ollama)
  • Ollama replies with the model list → shown in the app

Default ports (most users never change these):

Runtime Default URL
Ollama http://localhost:11434
LM Studio http://localhost:1234/v1
vLLM http://localhost:8000/v1
GPT4All http://localhost:4891/v1
Jan http://localhost:1337/v1

Do users have to type the address? No. The Local mode comes pre-filled with the Ollama default. If you run Ollama on its default port, just click Local and it works. For another runtime, click its preset (it fills the URL automatically). You only edit the field manually if you run a runtime on a non-default port or on another machine on your network. The "Custom" preset just focuses the field so you can type your own URL.

Important: Local mode only works when server.js is running on the user's own computer (e.g. npm starthttp://localhost:3000). A static deploy (Vercel) cannot reach your local runtime — that is by design (true local execution).

🛠 Tech stack

Frontend: React 18 + TypeScript + Vite 5 ✅ Proxy/BFF: Node.js with Hono (@hono/node-server) — scrapes model logos/descriptions from OpenRouter (OpenRouter blocks CORS, so the proxy handles it) ✅ 100% client-side: runs in the browser; your key stays only in your browser, nothing is sent to other servers ✅ No data backend — everything is local

🚀 How to run (locally)

Open your system terminal and type:

git clone https://github.com/bezerra72/prisma.git
cd prisma
npm install
npm start          # serves the app + local proxy at http://localhost:3000

Open http://localhost:3000 in your browser. Cloud and Local modes both work.

Local mode: to use Ollama/LM Studio/vLLM, they must be installed and running on your machine (e.g. ollama serve). npm start already includes the proxy that connects the app to your local runtime. Without server.js running, Local mode will not work.

Dev only (hot reload): npm run dev opens at http://localhost:5173, but requires server.js in a separate terminal (npm start) for Local mode.

🔑 The OpenRouter key is free at https://openrouter.ai/keys


🚀 Deploy

Static deploy (Vercel / any static host):

  1. Build the app:
    npm install
    npm run build      # outputs to dist/
  2. Deploy the dist/ folder. On Vercel: import the repo, set build command npm run build and output directory dist. vercel.json is already configured.
  3. Open the deployed URL. Cloud modes (Quality/Budget/Fast/Custom/Image) work out of the box with your OpenRouter key.

⚠️ Local mode on a static deploy: A static host cannot reach the user's local runtime (Ollama/LM Studio). Local mode only works when server.js runs on the same machine as the user:

npm start           # serves the built app + /api/local proxy at http://localhost:3000

For local-model usage, run npm start and open http://localhost:3000 (not the Vercel URL).

Development:

npm run dev         # Vite dev server at http://localhost:5173
# keep server.js running in another terminal for Local mode:
npm start

📸 Screenshots

Quality mode Fast mode Local mode (Ollama)
Quality Fast Local

Quality and Fast show parallel model selection + synthesizer; Local shows Ollama detected and ready to use.


🔷 About the name

Prisma is the Portuguese translation of Prism (the optical prism that splits light into colors). In the app, the 5-color fan stands for the multiple AI models running in parallel — each color is a model, and the synthesis combines the best of all into one answer.

About

Prisma — multi-model AI synthesizer (cloud OpenRouter + local Ollama/LM Studio/vLLM). Image consensus + image-to-image.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages