Many diverse model voices, split and recombined into one judged answer (Fusion-style panel + judge) — across your own provider keys or any model in opencode.
Project description
OpenPrism
Many diverse model voices, split and recombined into one judged answer.
OpenPrism sends your prompt to a panel of different models in parallel, then a judge model reconciles their answers, an explicit consensus / contradiction / gaps / blind-spots pass, then a single response better than any individual model produced. It's the OpenRouter "Fusion" pattern as a small, self-hostable tool.
Works with: Claude Code · opencode · Cursor · Windsurf · Gemini CLI · Codex — anything that speaks MCP. It runs on models you already have: any model configured in opencode (75+ providers, recommended — zero extra keys), or your own OpenAI-compatible provider keys.
Why it works
- Diversity beats raw strength. Independent models from different houses catch different things; a judge that reconciles them outperforms any single model on open-ended problems.
- Parallel panel. Wall-clock ≈ the slowest panelist, not the sum — so a 4th model is nearly free in latency.
- Use it deliberately. A call costs ~slowest-model + judge. Point it at hard questions (research, architecture, ambiguous trade-offs), not routine work.
- Diversity is measured in model families, and never silently faked. OpenPrism
picks default panels by family (Anthropic / OpenAI / Google / Qwen / GLM / Kimi /
MiniMax / …), so two models from the same maker don't count as two voices. Each
run is graded:
full(all panelists answered, ≥OPENPRISM_MIN_FAMILIESdistinct families),degraded(a panelist failed but the family floor still holds), orstop(fewer than the floor answered — effectively a single-family monoculture). The grade always prints; it's never silently passed off as confident, andOPENPRISM_STRICT=1refuses astopoutright.
How it works
┌──────────── panel (parallel) ────────────┐
prompt ───▶ │ model A model B model C model D │ ──▶ judge ──▶ answer
└───────────────────────────────────────────┘ (reconcile +
(different providers / houses) synthesize)
Two backends decide where panel calls go (set with OPENPRISM_BACKEND):
| Backend | Models from | Use |
|---|---|---|
opencode (default, recommended) |
every provider/model authed in opencode — discovered live, nothing hardcoded, no keys in OpenPrism | easiest; just opencode auth login your providers |
direct |
your own OpenAI-compatible provider keys (.env / providers.json) |
when you don't run opencode |
Two modes:
- research (default) — Fusion-style synthesis. This is where the lift is proven.
- code — code is verifiable, so blending prose is wrong: each model gives a candidate, the judge does best-of-N selection + repair and emits a Verify by: command. (v1 doesn't auto-run tests yet.)
Install
Pick whichever fits — all cross-platform (Linux / macOS / Windows / WSL).
A. Claude Code marketplace (easiest):
/plugin marketplace add ba1lly/OpenPrism
/plugin install openprism@openprism
B. Any MCP host via uvx (needs uv; no clone, no venv).
Generate the config for your host with the built-in wizard:
uvx --from git+https://github.com/ba1lly/OpenPrism openprism init --host opencode
# ...or --host cursor | windsurf | gemini | codex | claude-code
It prints (or --writes) the exact MCP config block, with the server launching
via uvx --from git+… — works straight from GitHub, nothing to maintain. (After a
PyPI release this shortens to uvx openprism …; pass --pypi to emit that form.)
C. From source (for development):
git clone https://github.com/ba1lly/OpenPrism && cd OpenPrism
./install.sh # Linux / macOS / WSL (Windows: ./install.ps1)
The installer creates a venv, installs OpenPrism, seeds .env, and prints host
config. Use openprism init --host <h> --local to point a host at this checkout.
Then add a provider key to .env (direct backend) or set
OPENPRISM_BACKEND=opencode to use opencode's providers with no keys here.
Judge options
OPENPRISM_JUDGE_BACKEND |
OPENPRISM_JUDGE_MODEL |
Notes |
|---|---|---|
claude-code (default) |
alias, e.g. opus |
claude -p headless via a Claude Max plan |
anthropic-api |
opus or a model id |
metered Anthropic API key |
opencode |
provider/model ref |
routes the judge through opencode too |
Usage (CLI)
openprism "Best architecture for X, and the trade-offs?" # research
openprism "Implement a token-bucket rate limiter" --mode code
openprism "..." --panel "google/gemini-2.5-flash,anthropic/claude-haiku-4-5"
openprism --bakeoff modelA modelB "a hard prompt" # which model wins?
openprism --list # presets + known models
openprism doctor # check your setup
With OPENPRISM_BACKEND=opencode, panels are provider/model refs; with no
--panel, OpenPrism auto-picks a diverse default across your connected providers.
Use as a plugin
OpenPrism is one MCP server with four tools — research, code, bakeoff,
models — so every host calls the same core. openprism init --host <host>
generates the right config for each:
| Host | Config file | Tools surface as |
|---|---|---|
| Claude Code | marketplace, or .mcp.json |
mcp__openprism__research, …; commands /openprism* |
| opencode | ~/.config/opencode/opencode.json |
openprism_research, …; commands /openprism* |
| Cursor | ~/.cursor/mcp.json |
openprism MCP tools |
| Windsurf | ~/.codeium/windsurf/mcp_config.json |
openprism MCP tools |
| Gemini CLI | ~/.gemini/settings.json |
openprism MCP tools |
| Codex | ~/.codex/config.toml |
openprism MCP tools |
openprism init --host cursor # print the block
openprism init --host opencode --write # merge it into the config file (makes a .bak)
For opencode, also copy the command files for slash commands:
cp integrations/opencode/commands/*.md ~/.config/opencode/commands/
Use /openprism-models (or the models tool) to see which provider/model refs
are connected.
Panelist tools (opencode backend)
Like Fusion, panelists can use live web tools. On the opencode backend the
panel runs with OPENPRISM_PANEL_TOOLS:
| Value | Panelists get |
|---|---|
research (default, research mode) |
webfetch + websearch + read-only; all mutation tools denied (write/edit/apply_patch/bash/task/todowrite) |
none |
pure completions (model knowledge only) — used for code/bakeoff |
all |
every opencode tool incl. bash/edit/write — opt-in, runs on your machine |
The direct backend is plain completions and ignores tools.
Adding models & providers
opencode backend (recommended) — you don't add anything to OpenPrism. Add the provider in opencode and it appears automatically:
opencode auth login # pick a provider, paste its key / OAuth
Then in any host run /openprism-models (or the models tool) to see every
provider/model ref now available, and use them:
openprism "…" --panel "anthropic/claude-opus-4-7,google/gemini-3-pro,openai/gpt-5.2"
No --panel? OpenPrism auto-picks a diverse default across your connected providers.
direct backend — add providers to OpenPrism. The default provider is set in
.env (ALIBABA_API_KEY + ALIBABA_BASE_URL). Add more OpenAI-compatible
providers in providers.json (copy providers.json.example):
{ "openrouter": { "base_url": "https://openrouter.ai/api/v1",
"api_key": "env:OPENROUTER_API_KEY",
"models": ["anthropic/claude-opus-4", "google/gemini-2.5-pro"] } }
Reference them as provider/model in --panel.
Judge model is independent of the panel — set OPENPRISM_JUDGE_BACKEND +
OPENPRISM_JUDGE_MODEL (see the judge table).
Health check & uninstall
openprism doctor # checks backend, opencode server, judge, keys — prints no secrets
./uninstall.sh # or ./uninstall.ps1 — removes venv/build; leaves your .env
Configuration
All via env vars (.env in the repo root — see .env.example):
OPENPRISM_BACKEND, OPENPRISM_JUDGE_BACKEND, OPENPRISM_JUDGE_MODEL,
ANTHROPIC_API_KEY (for the anthropic-api judge), OPENPRISM_DEFAULT_PROVIDER
(which direct provider a bare model id uses), OPENPRISM_PANEL_TOOLS
(research/none/all), OPENPRISM_MIN_FAMILIES (diversity floor, default 2),
OPENPRISM_STRICT (refuse below the floor), OPENPRISM_MAX_PANEL (size cap),
OPENPRISM_PANEL_TIMEOUT, OPENPRISM_MAX_TOKENS, and the opencode-backend
OPENPRISM_OPENCODE_* settings. Extra direct-backend providers go in
providers.json (see providers.json.example).
Security notes
- OpenPrism never logs provider keys. The opencode backend queries only the
keyless
/providerendpoint (never/config/providers, which would return keys), and the judge always runs tool-less. Still, bind the opencode server to localhost and setOPENCODE_SERVER_PASSWORDif you expose it. See SECURITY.md. - Keep
.envandproviders.jsonout of git (already in.gitignore).
Roadmap
- Publish to PyPI so the launch shortens from
uvx --from git+… openprism-mcptouvx --from openprism openprism-mcp(and the CLI touvx openprism …). codemode: optional sandboxed test execution (--verify "<cmd>").- Panelist tools on the
directbackend (a tool-call loop, so non-opencode panels can browse too). - Smarter default-panel selection (capability-aware, not just provider-diverse).
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openprism-0.1.0.tar.gz.
File metadata
- Download URL: openprism-0.1.0.tar.gz
- Upload date:
- Size: 34.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9514fc182cdd384c04e7f6bcdf798a9a7b330afddecc3daaf8430da46e1bfef5
|
|
| MD5 |
ef57814f4c9505088fedcc16f6087338
|
|
| BLAKE2b-256 |
421482347bf1e7112d813b65892d3b5ee72b955cd6f9cb8405c06ea60f4e0a2c
|
Provenance
The following attestation bundles were made for openprism-0.1.0.tar.gz:
Publisher:
release.yml on ba1lly/OpenPrism
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openprism-0.1.0.tar.gz -
Subject digest:
9514fc182cdd384c04e7f6bcdf798a9a7b330afddecc3daaf8430da46e1bfef5 - Sigstore transparency entry: 1824173341
- Sigstore integration time:
-
Permalink:
ba1lly/OpenPrism@b647a2290d41a2fa02f7f8d7dc7e37dda8e92848 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ba1lly
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b647a2290d41a2fa02f7f8d7dc7e37dda8e92848 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file openprism-0.1.0-py3-none-any.whl.
File metadata
- Download URL: openprism-0.1.0-py3-none-any.whl
- Upload date:
- Size: 33.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5c2ba1a99d773315ab20223f437440f5c614d4fc9fbef29af3b027790cedb7c
|
|
| MD5 |
0a9744ea7d1257f61fc50b30827123d1
|
|
| BLAKE2b-256 |
5f885735cd707ac82040744b9f1f2700411e6586e1c9d7c4585b2d524d67c96d
|
Provenance
The following attestation bundles were made for openprism-0.1.0-py3-none-any.whl:
Publisher:
release.yml on ba1lly/OpenPrism
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openprism-0.1.0-py3-none-any.whl -
Subject digest:
b5c2ba1a99d773315ab20223f437440f5c614d4fc9fbef29af3b027790cedb7c - Sigstore transparency entry: 1824173553
- Sigstore integration time:
-
Permalink:
ba1lly/OpenPrism@b647a2290d41a2fa02f7f8d7dc7e37dda8e92848 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ba1lly
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b647a2290d41a2fa02f7f8d7dc7e37dda8e92848 -
Trigger Event:
workflow_dispatch
-
Statement type: