{"_id":"@alexanderollman/llm-fusion","name":"@alexanderollman/llm-fusion","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@alexanderollman/llm-fusion","version":"0.1.0","description":"LLM Fusion — multi-model synthesis with adaptive, learned per-subject model strengths. CLI + OpenAI-compatible server + web UI + /fuse skill.","type":"module","bin":{"fuse":"dist/fuse.js","fuse-run":"dist/fuse-run.js"},"engines":{"node":">=22"},"dependencies":{"@anthropic-ai/sdk":"^0.70.0","@clack/prompts":"^1.5.1","@google/genai":"^1.30.0","@hono/node-server":"^1.13.0","chalk":"^5.3.0","commander":"^12.1.0","hono":"^4.6.0","openai":"^6.10.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Alexander-Ollman/llm-fusion.git"},"keywords":["llm","fusion","multi-model","ensemble","ai","anthropic","openai","gemini","claude-code"],"license":"MIT","gitHead":"e79b795dcf7b717bb86a4424cdb0c1258e848334","_id":"@alexanderollman/llm-fusion@0.1.0","bugs":{"url":"https://github.com/Alexander-Ollman/llm-fusion/issues"},"homepage":"https://github.com/Alexander-Ollman/llm-fusion#readme","_nodeVersion":"25.8.0","_npmVersion":"11.11.0","dist":{"integrity":"sha512-39IFDCuLNPfBcSP0XUT0vrkjBT2YE6oDlMO7mt6OiThWKagirMw+9ghC6DkB2Sp386OLKR4lCvxrZ6e6fi0MDg==","shasum":"d3d4abd9bcf6e4237815cfd44b22c6537b704d2d","tarball":"https://registry.npmjs.org/@alexanderollman/llm-fusion/-/llm-fusion-0.1.0.tgz","fileCount":10,"unpackedSize":289587,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD1CNnWMroJRp/MhS40WuXaEK5sDLDOn6ePZgWfQ46iuQIhAJJ5Q3gF0/DqRLXXe7WO47iQUEt/b5ISkw/JFpuKju8T"}]},"_npmUser":{"name":"alexanderollman","email":"alex@era.world"},"directories":{},"maintainers":[{"name":"alexanderollman","email":"alex@era.world"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/llm-fusion_0.1.0_1781727335382_0.7620580959189438"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-17T20:15:35.205Z","0.1.0":"2026-06-17T20:15:35.539Z","modified":"2026-06-17T20:15:35.758Z"},"maintainers":[{"name":"alexanderollman","email":"alex@era.world"}],"description":"LLM Fusion — multi-model synthesis with adaptive, learned per-subject model strengths. CLI + OpenAI-compatible server + web UI + /fuse skill.","homepage":"https://github.com/Alexander-Ollman/llm-fusion#readme","keywords":["llm","fusion","multi-model","ensemble","ai","anthropic","openai","gemini","claude-code"],"repository":{"type":"git","url":"git+https://github.com/Alexander-Ollman/llm-fusion.git"},"bugs":{"url":"https://github.com/Alexander-Ollman/llm-fusion/issues"},"license":"MIT","readme":"# Era Fusion\n\nMulti-model **fusion** with adaptive, learned model strengths — a graphical chat UI, a CLI, an OpenAI-compatible endpoint, and a `/fuse` skill for agentic coding tools (Claude Code / OpenCode).\n\nInspired by [OpenRouter's \"Fusion beats Frontier\"](https://openrouter.ai/blog/announcements/fusion-beats-frontier/) and the [`fusion-fable`](https://github.com/duolahypercho/fusion-fable) skill, with one big addition: **it learns which model is the de-facto subject-matter expert over time** and weights the synthesis accordingly.\n\n## How it works\n\n```\nrequest\n  │\n  ├─▶ adjudicate ──────────  subject (category) + dynamic depth (light · standard · deep)\n  │\n  ├─▶ select panel ────────  N distinct models, chosen by learned per-subject strength\n  │                          (ε-greedy exploration keeps trying under-used models)\n  │\n  ├─▶ dispatch in parallel  each model answers the SAME prompt independently\n  │                          (depth scales tools: none → web search → agentic loop\n  │                           with web search + web fetch + sandboxed code execution)\n  │\n  ├─▶ judge (2 phase) ─────  A) structured comparison: consensus · contradictions ·\n  │                             gaps · unique insights · per-model INFLUENCE score,\n  │                             informed by learned subject expertise as a soft prior\n  │                          B) streamed final answer, grounded in the analysis\n  │\n  └─▶ learn ───────────────  influence scores accumulate into per-model, per-subject\n                             expertise (SME) → feeds future panel selection + judging.\n                             Optional 👍/👎 feedback refines it further.\n```\n\nDiversity is **harvested, not manufactured**: the same prompt to different models yields different reasoning paths, tool calls, and sources. No synthetic personas (those can be *derived* later from the learned SME profile).\n\n## Packages\n\n| Package | What it is |\n|---|---|\n| `@era-fusion/core` | The engine: provider abstraction (Anthropic / OpenAI / Google SDKs), adjudicator, panel dispatch, two-phase judge, SQLite adaptive store (`node:sqlite`, no native deps). |\n| `@era-fusion/server` | Hono server: OpenAI-compatible `/v1/chat/completions`, rich SSE `/api/fuse`, feedback + strengths API, serves the web UI. |\n| `@era-fusion/cli` | `fuse` — run fusions, `serve`, `setup` (guided key + skill wizard), `stats`, `usage`, `feedback`, `doctor`, `config`, `models`. Pipe-friendly. |\n| `@era-fusion/web` | React chat UI: live panel view, streamed synthesis, analysis panel, feedback, and a learned-strengths dashboard. |\n| `skills/fuse` | The `/fuse` skill for Claude Code / OpenCode (service-first, CLI fallback). |\n\n## Setup\n\n```bash\ngit clone <this repo> && cd era-fusion\n./scripts/install.sh          # installs deps, builds, puts `fuse`/`fuse-run` on PATH,\n                              # installs the /fuse skill into Claude Code + OpenCode\nfuse setup                    # guided TUI: paste provider keys + pick defaults\nfuse doctor                   # verify environment\n```\n\n`fuse setup` is the quickest path: a terminal wizard that, **per provider (Anthropic / OpenAI / Google), lets you choose an auth mode** —\n\n- **API key** — the provider's official SDK with a key (masked entry, written to `~/.era-fusion/.env`, mode `0600`).\n- **Subscription login** — call the provider's CLI (`claude` / `codex` / `gemini`) as a subprocess using your logged-in Pro/Max plan, **no API key**. The wizard installs/updates the CLI via `npm i -g` as needed and prints the login command to run (`claude /login` · `codex login` · `gemini`). Both modes feed the full engine (panel selection, two-phase judge, adaptive learning).\n- **Skip** — leave that provider unconfigured.\n\nIt then lets you pick the default judge / panel size / web-search and installs the `/fuse` skill. Prefer env vars or the dashboard? `export ANTHROPIC_API_KEY=…` (at least one; OpenAI / Google optional) or `fuse serve` → Setup tab work too. Re-run `fuse setup` anytime to change a provider's mode or add a key; `fuse setup --skill-only` just (re)installs the skill.\n\n> **Subscription-mode limitations:** CLI panelists report no token usage, so cost metrics show **$0/unmetered** for them. If you set a subscription provider as the judge, its structured JSON output is best-effort (CLIs are less reliable at strict JSON) — keep the judge on an api/Anthropic model when possible.\n\nWorks out-of-the-box with just an Anthropic key (Opus 4.8 + Sonnet 4.6, judged by Opus 4.8). Add OpenAI / Google keys for true cross-provider fusion. Edit `~/.era-fusion/config.json` to change models, panel size, judge, or the auto-panel.\n\n## Distribution (npm package)\n\nShips as a single bundled **public npm package** — `@alexanderollman/llm-fusion` — exposing the `fuse` and `fuse-run` bins with the web UI and `/fuse` skill included (no native deps; Node ≥ 22). `npm i -g @alexanderollman/llm-fusion` (or `npx`), then `fuse setup` to wire the skill into your harnesses. era-code lazily provisions it on demand. Build from source with `npm run pack:release` (output in `./release`). See [`docs/PUBLISHING.md`](docs/PUBLISHING.md) for publishing + the era-code integration recipe, and [`docs/ENGINEER_ONBOARDING.md`](docs/ENGINEER_ONBOARDING.md) for first-time setup + connecting provider keys.\n\n## Usage\n\n### CLI\n```bash\nfuse \"What's the best way to design an idempotent webhook consumer?\"\necho \"summarize this\" | fuse --quiet            # pipe-friendly, answer-only on stdout\nfuse --panel claude-opus-4-8,gpt-5.5,gemini-3-pro \"compare these approaches\"\nfuse --depth deep \"research the current state of X\"   # force agentic deep panelists\nfuse stats coding                                # learned per-subject strengths\nfuse feedback <run-id> up                        # teach it which answers were good\n```\n\n### Web UI\n```bash\nfuse serve            # → http://localhost:8787  (chat · strengths · usage · setup)\n# dev: npm run dev:server  &&  npm run dev:web   (Vite proxies /api + /v1)\n```\n\n### As a model in Claude Code / OpenCode / Cursor (OpenAI-compatible)\nPoint any OpenAI-compatible client at the server and use the model id `fusion`:\n```\nbase URL:  http://localhost:8787/v1\nmodel:     fusion\n```\nEvery request fans out to the panel and returns one synthesized answer; non-standard body fields `panel`, `judge`, `panel_size`, `web_search` are honored. Each call feeds the adaptive store.\n\n### As a skill in Claude Code / OpenCode\n```\n/fuse <your request>\n```\nor just say \"run this through fusion\". The skill uses the `fuse` engine when any provider is configured — **api** (key set) or **subscription** (provider CLI on PATH via your Pro/Max plan) — with full learning, and falls back to orchestrating local model CLIs (`codex`, `gemini`, `claude`) directly when the engine isn't installed.\n\n## Adaptive learning\n\nEvery run, the judge assigns each panelist an **influence** score (how much it drove the final answer). Those accumulate per `(model, subject)` into a quantitative expertise profile, viewable with `fuse stats` or the web dashboard. Selection uses it to field the strongest panel for each subject; the judge uses it as a soft prior. Optional 👍/👎 feedback nudges scores further. Data lives in `~/.era-fusion/fusion.db`.\n\n## Roadmap\n- **Multi-scope decomposition** — split a request into sub-scopes, each with its own cross-model panel, then meta-aggregate (data model already structured for it).\n- **Derived personas** — promote consistently dominant models into named subject experts.\n- Per-model cost/latency budgeting and richer dashboards.\n\n## License\nMIT\n","readmeFilename":"README.md","_rev":"1-a58511814771abf0f07e575f818d07ac"}