Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

put the local coding agents on the Models Comparison chart

[._.]/ Adam Eivy0590925bc877
diff --git a/client/src/components/models/ModelComparison.jsx b/client/src/components/models/ModelComparison.jsx
index efad4477bd..4644803ae5 100644
--- a/client/src/components/models/ModelComparison.jsx
+++ b/client/src/components/models/ModelComparison.jsx
@@ -177,6 +177,11 @@ export default function ModelComparison() {
// Keep executable endpoint IDs as well as normalized public model references.
...(catalog?.inventory || []).flatMap(provider => provider.models.flatMap(({ model }) => model.startsWith('opencode/') ? [model, model.slice('opencode/'.length)] : [model])),
]), [catalog]);
+ // Models the index has evidence for, for the coverage list far below. Same
+ // reason as `estimatedRows`: the model filter input re-renders this component
+ // on every keystroke, and `<details>` renders its children whether or not the
+ // section is open.
+ const observedModels = useMemo(() => new Set((catalog?.observations || []).map(row => row.model)), [catalog]);
useEffect(() => {
let active = true;
@@ -1581,14 +1586,21 @@ export default function ModelComparison() {
</button>
)}
<ul>
- {provider.models.map(({ model, efforts: supported }) => (
- <li key={model}>
- {model} {supported.length ? `(${supported.join(', ')})` : ''} —{' '}
- {catalog.observations.some(row => row.model === model)
- ? 'Public model reference available; endpoint equivalence unverified'
- : 'Needs research'}
- </li>
- ))}
+ {provider.models.map(({ model, efforts: supported, catalogModel }) => {
+ // `catalogModel` is the server's public-index name for this
+ // endpoint id (`qwen3-coder:30b` → `qwen3-coder-30b-a3b`). Try
+ // the raw id first: a Zen endpoint keeps its own exact pricing
+ // row, which is more specific than the model it normalizes to.
+ const reference = [model, catalogModel].find(name => name && observedModels.has(name));
+ return (
+ <li key={model}>
+ {model} {supported.length ? `(${supported.join(', ')})` : ''} —{' '}
+ {reference
+ ? `Public model reference available as ${reference}; endpoint equivalence unverified`
+ : 'Needs research'}
+ </li>
+ );
+ })}
</ul>
</div>
))}
diff --git a/client/src/components/models/ModelComparison.test.jsx b/client/src/components/models/ModelComparison.test.jsx
index d4710cd493..554cedb0a4 100644
--- a/client/src/components/models/ModelComparison.test.jsx
+++ b/client/src/components/models/ModelComparison.test.jsx
@@ -390,3 +390,20 @@ it('keeps exact Zen IDs in available coverage and plots free prices without inve
expect(screen.queryByTestId('scatter-example-free')).toBeNull();
expect(screen.getAllByText('Unknown').length).toBeGreaterThan(0);
});
+
+it('reads coverage through the normalized catalog name so a local backend id is not reported as unresearched', async () => {
+ api.getModelComparison.mockResolvedValue({
+ observations: [{ ...observation, model: 'qwen3-coder-30b-a3b' }],
+ availableModels: ['qwen3-coder-30b-a3b'],
+ inventory: [{ id: 'ollama', name: 'Ollama', models: [
+ { model: 'qwen3-coder:30b', efforts: [], catalogModel: 'qwen3-coder-30b-a3b' },
+ { model: 'mystery:7b', efforts: [], catalogModel: 'mystery-7b' },
+ ] }],
+ });
+ render(<MemoryRouter><ModelComparison /></MemoryRouter>);
+ fireEvent.click(await screen.findByText(/Configured provider coverage/));
+ // The endpoint id never equals the index name, so matching on it alone
+ // reported every Ollama pull as unresearched.
+ expect(screen.getByText(/qwen3-coder:30b/)).toHaveTextContent('Public model reference available as qwen3-coder-30b-a3b');
+ expect(screen.getByText(/mystery:7b/)).toHaveTextContent('Needs research');
+});
diff --git a/data.reference/model-comparison.json b/data.reference/model-comparison.json
index 18a02e2213..3226b7f02f 100644
--- a/data.reference/model-comparison.json
+++ b/data.reference/model-comparison.json
@@ -12366,6 +12366,256 @@
},
"quota": null,
"notes": "Sourced from Artificial Analysis (Grok 3 mini Reasoning (high))."
+ },
+ {
+ "id": "swe-bench-2026-09-16-qwen3-coder-30b-a3b-verified",
+ "provider": "Alibaba",
+ "model": "qwen3-coder-30b-a3b",
+ "effort": "unspecified",
+ "configuration": "Qwen-reported; OpenHands scaffold, 100 turns",
+ "billing": "unknown",
+ "benchmark": "SWE-bench Verified (pass@1, OpenHands)",
+ "quality": {
+ "value": 51.6,
+ "source": {
+ "url": "https://huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct/discussions/30",
+ "retrievedAt": "2026-09-16T00:00:00Z",
+ "methodology": "Resolved-instance percentage on SWE-bench Verified, single attempt (pass@1), OpenHands scaffold."
+ }
+ },
+ "costPerTask": null,
+ "inputPerMillion": null,
+ "outputPerMillion": null,
+ "reasoningPerMillion": null,
+ "responseSeconds": null,
+ "tokensPerSecond": null,
+ "quota": null,
+ "notes": "Publisher-reported agentic-coding evaluation of the released weights, not a measurement of the quantized GGUF build PortOS installs or of this machine. Scores are only comparable to another row whose scaffold, turn budget and sampling settings match — read the configuration field before ranking two models against each other. Qwen publishes the number without the OpenHands commit, serving config or tool-call parser, so it is not independently reproducible; the linked thread is an open request for those details."
+ },
+ {
+ "id": "swe-bench-2026-09-16-ornith-1.0-35b-verified",
+ "provider": "Ornith AI",
+ "model": "ornith-1.0-35b",
+ "effort": "unspecified",
+ "configuration": "Ornith-reported; OpenHands harness, temp=1.0, top_p=0.95",
+ "billing": "unknown",
+ "benchmark": "SWE-bench Verified (pass@1, OpenHands)",
+ "quality": {
+ "value": 75.6,
+ "source": {
+ "url": "https://huggingface.co/ornith-ai/Ornith-1.0-35B",
+ "retrievedAt": "2026-09-16T00:00:00Z",
+ "methodology": "Resolved-instance percentage on SWE-bench Verified, single attempt (pass@1), OpenHands scaffold."
+ }
+ },
+ "costPerTask": null,
+ "inputPerMillion": null,
+ "outputPerMillion": null,
+ "reasoningPerMillion": null,
+ "responseSeconds": null,
+ "tokensPerSecond": null,
+ "quota": null,
+ "notes": "Publisher-reported agentic-coding evaluation of the released weights, not a measurement of the quantized GGUF build PortOS installs or of this machine. Scores are only comparable to another row whose scaffold, turn budget and sampling settings match — read the configuration field before ranking two models against each other."
+ },
+ {
+ "id": "swe-bench-2026-09-16-ornith-1.0-9b-verified",
+ "provider": "Ornith AI",
+ "model": "ornith-1.0-9b",
+ "effort": "unspecified",
+ "configuration": "Ornith-reported; OpenHands harness, temp=1.0, top_p=0.95",
+ "billing": "unknown",
+ "benchmark": "SWE-bench Verified (pass@1, OpenHands)",
+ "quality": {
+ "value": 69.4,
+ "source": {
+ "url": "https://ornith.ai/ornith_1_0.html",
+ "retrievedAt": "2026-09-16T00:00:00Z",
+ "methodology": "Resolved-instance percentage on SWE-bench Verified, single attempt (pass@1), OpenHands scaffold."
+ }
+ },
+ "costPerTask": null,
+ "inputPerMillion": null,
+ "outputPerMillion": null,
+ "reasoningPerMillion": null,
+ "responseSeconds": null,
+ "tokensPerSecond": null,
+ "quota": null,
+ "notes": "Publisher-reported agentic-coding evaluation of the released weights, not a measurement of the quantized GGUF build PortOS installs or of this machine. Scores are only comparable to another row whose scaffold, turn budget and sampling settings match — read the configuration field before ranking two models against each other."
+ },
+ {
+ "id": "swe-bench-2026-09-16-qwen3.6-35b-a3b-verified",
+ "provider": "Alibaba",
+ "model": "qwen3.6-35b-a3b",
+ "effort": "unspecified",
+ "configuration": "Qwen-reported; internal agent scaffold (bash + file-edit tools), temp=1.0, top_p=0.95, 200K context",
+ "billing": "unknown",
+ "benchmark": "SWE-bench Verified (pass@1, Qwen internal scaffold)",
+ "quality": {
+ "value": 73.4,
+ "source": {
+ "url": "https://huggingface.co/Qwen/Qwen3.6-35B-A3B",
+ "retrievedAt": "2026-09-16T00:00:00Z",
+ "methodology": "Resolved-instance percentage on SWE-bench Verified, single attempt (pass@1), Qwen internal scaffold scaffold."
+ }
+ },
+ "costPerTask": null,
+ "inputPerMillion": null,
+ "outputPerMillion": null,
+ "reasoningPerMillion": null,
+ "responseSeconds": null,
+ "tokensPerSecond": null,
+ "quota": null,
+ "notes": "Publisher-reported agentic-coding evaluation of the released weights, not a measurement of the quantized GGUF build PortOS installs or of this machine. Scores are only comparable to another row whose scaffold, turn budget and sampling settings match — read the configuration field before ranking two models against each other."
+ },
+ {
+ "id": "swe-bench-2026-09-16-devstral-small-2-24b-verified",
+ "provider": "Mistral",
+ "model": "devstral-small-2-24b",
+ "effort": "unspecified",
+ "configuration": "Mistral-reported; tasks scaffolded through Cline",
+ "billing": "unknown",
+ "benchmark": "SWE-bench Verified (pass@1, Cline)",
+ "quality": {
+ "value": 68,
+ "source": {
+ "url": "https://mistral.ai/news/devstral-2-vibe-cli/",
+ "retrievedAt": "2026-09-16T00:00:00Z",
+ "methodology": "Resolved-instance percentage on SWE-bench Verified, single attempt (pass@1), Cline scaffold."
+ }
+ },
+ "costPerTask": null,
+ "inputPerMillion": null,
+ "outputPerMillion": null,
+ "reasoningPerMillion": null,
+ "responseSeconds": null,
+ "tokensPerSecond": null,
+ "quota": null,
+ "notes": "Publisher-reported agentic-coding evaluation of the released weights, not a measurement of the quantized GGUF build PortOS installs or of this machine. Scores are only comparable to another row whose scaffold, turn budget and sampling settings match — read the configuration field before ranking two models against each other."
+ },
+ {
+ "id": "swe-bench-2026-09-16-north-mini-code-1.0-verified",
+ "provider": "Cohere",
+ "model": "north-mini-code-1.0",
+ "effort": "unspecified",
+ "configuration": "Cohere release table (mixed provenance); SWE-Agent harness v1.1.0",
+ "billing": "unknown",
+ "benchmark": "SWE-bench Verified (pass@1, SWE-Agent v1.1.0)",
+ "quality": {
+ "value": 67.6,
+ "source": {
+ "url": "https://sebastianraschka.com/blog/2026/north-mini-code-agentic-coding.html",
+ "retrievedAt": "2026-09-16T00:00:00Z",
+ "methodology": "Resolved-instance percentage on SWE-bench Verified, single attempt (pass@1), SWE-Agent v1.1.0 scaffold."
+ }
+ },
+ "costPerTask": null,
+ "inputPerMillion": null,
+ "outputPerMillion": null,
+ "reasoningPerMillion": null,
+ "responseSeconds": null,
+ "tokensPerSecond": null,
+ "quota": null,
+ "notes": "Publisher-reported agentic-coding evaluation of the released weights, not a measurement of the quantized GGUF build PortOS installs or of this machine. Scores are only comparable to another row whose scaffold, turn budget and sampling settings match — read the configuration field before ranking two models against each other. Cohere's release table mixes its own runs with public reports and Artificial Analysis values and is not one uniform evaluation; Cohere separately headlines 80.2 pass@10 on an SFT checkpoint, which is a different measurement."
+ },
+ {
+ "id": "swe-bench-2026-09-16-ornith-1.0-35b-pro",
+ "provider": "Ornith AI",
+ "model": "ornith-1.0-35b",
+ "effort": "unspecified",
+ "configuration": "Ornith-reported; OpenHands harness, temp=1.0, top_p=0.95",
+ "billing": "unknown",
+ "benchmark": "SWE-bench Pro (pass@1, OpenHands)",
+ "quality": {
+ "value": 50.4,
+ "source": {
+ "url": "https://huggingface.co/ornith-ai/Ornith-1.0-35B",
+ "retrievedAt": "2026-09-16T00:00:00Z",
+ "methodology": "Resolved-instance percentage on SWE-bench Pro, single attempt (pass@1), OpenHands scaffold."
+ }
+ },
+ "costPerTask": null,
+ "inputPerMillion": null,
+ "outputPerMillion": null,
+ "reasoningPerMillion": null,
+ "responseSeconds": null,
+ "tokensPerSecond": null,
+ "quota": null,
+ "notes": "Publisher-reported agentic-coding evaluation of the released weights, not a measurement of the quantized GGUF build PortOS installs or of this machine. Scores are only comparable to another row whose scaffold, turn budget and sampling settings match — read the configuration field before ranking two models against each other."
+ },
+ {
+ "id": "swe-bench-2026-09-16-ornith-1.0-9b-pro",
+ "provider": "Ornith AI",
+ "model": "ornith-1.0-9b",
+ "effort": "unspecified",
+ "configuration": "Ornith-reported; OpenHands harness, temp=1.0, top_p=0.95",
+ "billing": "unknown",
+ "benchmark": "SWE-bench Pro (pass@1, OpenHands)",
+ "quality": {
+ "value": 42.9,
+ "source": {
+ "url": "https://ornith.ai/ornith_1_0.html",
+ "retrievedAt": "2026-09-16T00:00:00Z",
+ "methodology": "Resolved-instance percentage on SWE-bench Pro, single attempt (pass@1), OpenHands scaffold."
+ }
+ },
+ "costPerTask": null,
+ "inputPerMillion": null,
+ "outputPerMillion": null,
+ "reasoningPerMillion": null,
+ "responseSeconds": null,
+ "tokensPerSecond": null,
+ "quota": null,
+ "notes": "Publisher-reported agentic-coding evaluation of the released weights, not a measurement of the quantized GGUF build PortOS installs or of this machine. Scores are only comparable to another row whose scaffold, turn budget and sampling settings match — read the configuration field before ranking two models against each other."
+ },
+ {
+ "id": "swe-bench-2026-09-16-qwen3.6-35b-a3b-pro",
+ "provider": "Alibaba",
+ "model": "qwen3.6-35b-a3b",
+ "effort": "unspecified",
+ "configuration": "Qwen-reported; internal agent scaffold (bash + file-edit tools), temp=1.0, top_p=0.95, 200K context; corrected tasks in the public set",
+ "billing": "unknown",
+ "benchmark": "SWE-bench Pro (pass@1, Qwen internal scaffold)",
+ "quality": {
+ "value": 49.5,
+ "source": {
+ "url": "https://huggingface.co/Qwen/Qwen3.6-35B-A3B",
+ "retrievedAt": "2026-09-16T00:00:00Z",
+ "methodology": "Resolved-instance percentage on SWE-bench Pro, single attempt (pass@1), Qwen internal scaffold scaffold."
+ }
+ },
+ "costPerTask": null,
+ "inputPerMillion": null,
+ "outputPerMillion": null,
+ "reasoningPerMillion": null,
+ "responseSeconds": null,
+ "tokensPerSecond": null,
+ "quota": null,
+ "notes": "Publisher-reported agentic-coding evaluation of the released weights, not a measurement of the quantized GGUF build PortOS installs or of this machine. Scores are only comparable to another row whose scaffold, turn budget and sampling settings match — read the configuration field before ranking two models against each other."
+ },
+ {
+ "id": "swe-bench-2026-09-16-north-mini-code-1.0-pro",
+ "provider": "Cohere",
+ "model": "north-mini-code-1.0",
+ "effort": "unspecified",
+ "configuration": "Cohere release table (mixed provenance); SWE-Agent harness v1.1.0",
+ "billing": "unknown",
+ "benchmark": "SWE-bench Pro (pass@1, SWE-Agent v1.1.0)",
+ "quality": {
+ "value": 40.2,
+ "source": {
+ "url": "https://sebastianraschka.com/blog/2026/north-mini-code-agentic-coding.html",
+ "retrievedAt": "2026-09-16T00:00:00Z",
+ "methodology": "Resolved-instance percentage on SWE-bench Pro, single attempt (pass@1), SWE-Agent v1.1.0 scaffold."
+ }
+ },
+ "costPerTask": null,
+ "inputPerMillion": null,
+ "outputPerMillion": null,
+ "reasoningPerMillion": null,
+ "responseSeconds": null,
+ "tokensPerSecond": null,
+ "quota": null,
+ "notes": "Publisher-reported agentic-coding evaluation of the released weights, not a measurement of the quantized GGUF build PortOS installs or of this machine. Scores are only comparable to another row whose scaffold, turn budget and sampling settings match — read the configuration field before ranking two models against each other. Cohere's release table mixes its own runs with public reports and Artificial Analysis values and is not one uniform evaluation; Cohere separately headlines 80.2 pass@10 on an SFT checkpoint, which is a different measurement."
}
]
}
diff --git a/docs/MODEL-COMPARISON.md b/docs/MODEL-COMPARISON.md
index de2ce00cf4..e1fe1fa8b1 100644
--- a/docs/MODEL-COMPARISON.md
+++ b/docs/MODEL-COMPARISON.md
@@ -28,7 +28,7 @@ The catalog contains comprehensive public configurations across major providers
Endpoints (relative to the configured PortOS API origin):
-- `GET /api/providers/comparison` → `{ schemaVersion: 1, observations, inventory }`. Inventory contains only provider IDs/names/types, discovery capability, model IDs and supported effort labels. No credentials or endpoints.
+- `GET /api/providers/comparison` → `{ schemaVersion: 1, observations, inventory }`. Inventory contains only provider IDs/names/types, discovery capability, model IDs, supported effort labels, and each model's `catalogModel` — the public benchmark-index name the endpoint ID normalizes to, or `null`. No credentials or endpoints. `catalogModel` is derived server-side by `catalogSlugForProviderModel`, so the coverage list and the chart's default scope cannot disagree about whether a model has evidence; never re-derive it in the client.
- `POST /api/providers/comparison/discover` with `{ "providerId": "example-provider" }` → current `{ providerId, models: [{ model, efforts }] }`. Explicit discovery only; failures remain visible.
- `POST /api/providers/comparison/import` accepts `{ schemaVersion: 1, observations: [...] }`. GET's `inventory` field is not an import field. The UI also accepts this JSON as a file.
- `POST /api/providers/comparison/sync-aa` with optional `{ "apiKey": "..." }` → fetches model metadata directly from the Artificial Analysis API, normalizes observations, and imports them. The API-reported `intelligence_index_version` determines observation IDs, benchmark labels and metric methodology. Missing/invalid versions, malformed/empty pages, or a version change during pagination fail before import; new benchmark versions never overwrite older-version evidence.
@@ -74,6 +74,27 @@ Pricing-only rows appear alongside the selected benchmark as explicitly unbenchm
The September 15, 2026 snapshot adds the two NVIDIA NIM free-endpoint IDs currently shipped on the `nvidia-nim` provider and its OpenCode wrappers: `google/gemma-4-31b-it` and `poolside/laguna-xs-2.1`, from the [Gemma 4 31B IT](https://build.nvidia.com/google/gemma-4-31b-it) and [Laguna XS 2.1](https://build.nvidia.com/poolside/laguna-xs-2.1) prototype pages. Each row carries zero published input/output rates, with unknown quota, reasoning-token billing, benchmark task cost, quality and throughput. The free NIM offer is a trial endpoint subject to NVIDIA credits, rate limits, and data-use terms. Name similarity does not prove that an AA-tested or locally served revision matches NIM's serving configuration. Migration 388 appends missing shipped NIM IDs the same way 356 does for Zen.
+## Local coding agents and the install catalog
+
+The models PortOS can dispatch are not only the ones named in `data.reference/providers.json`. The shipped `ollama` and `lmstudio` provider records carry an **empty** model list — what a user can select is whatever they pulled — so the install catalog in `server/lib/localLlmCatalog.js` is the other half of scope. `scripts/prune-model-comparison-seed.js` derives both, and a coding model reaching the install picker without benchmark rows is a coverage gap, not a design choice.
+
+A local backend ID names a *build* of the weights, not the model the index benchmarked, and the difference is not decidable from the text — so a catalog entry **declares** its index name in a `benchmarkModel` field and `catalogSlugForProviderModel` looks it up instead of guessing. Both of an entry's backend IDs (and its retired aliases) resolve through the same declaration, so `ornith:35b` and `lmstudio-community/Ornith-1.0-35B-GGUF` are one model. **Omit `benchmarkModel` unless the evaluated configuration has been checked against the entry**; the model then carries no benchmark evidence, which is the honest state. Textual guessing was tried and rejected: stripping `-Reasoning` off Cisco's GGUF lands on the *different* `foundation-sec-8b`, and folding `qwen3.8:27b-mlx` onto `qwen3.8-27b` would plot a hosted API's price and throughput under a 4-bit local build.
+
+The September 16, 2026 snapshot adds ten agentic-coding rows for the catalog's coding tier. **The scaffold is part of the benchmark name**, because the chart separates series on `benchmark` alone and two harnesses disagree by more than most models do — a Cline result and an OpenHands result are not one axis:
+
+| Model | SWE-bench Verified | SWE-bench Pro | Benchmark group (scaffold) |
+| --- | ---: | ---: | --- |
+| [Ornith 1.0 35B](https://huggingface.co/ornith-ai/Ornith-1.0-35B) | 75.6 | 50.4 | OpenHands, temp=1.0, top_p=0.95 |
+| [Qwen3.6 35B-A3B](https://huggingface.co/Qwen/Qwen3.6-35B-A3B) | 73.4 | 49.5 | Qwen internal scaffold (bash + file-edit), 200K context |
+| [Ornith 1.0 9B](https://ornith.ai/ornith_1_0.html) | 69.4 | 42.9 | OpenHands, temp=1.0, top_p=0.95 |
+| [Devstral Small 2 24B](https://mistral.ai/news/devstral-2-vibe-cli/) | 68.0 | — | Cline |
+| [North Mini Code 1.0](https://sebastianraschka.com/blog/2026/north-mini-code-agentic-coding.html) | 67.6 | 40.2 | SWE-Agent v1.1.0 |
+| [Qwen3-Coder 30B](https://huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct/discussions/30) | 51.6 | — | OpenHands, 100 turns |
+
+So **Qwen3-Coder 30B and Ornith 1.0 35B compare directly** — both sit in `SWE-bench Verified (pass@1, OpenHands)` — while the Cline and SWE-Agent results stay on their own axes rather than joining a ranking they did not earn.
+
+Every row is quality only. A hosted price or throughput would describe someone else's endpoint, and none of these numbers describes the quantized GGUF build PortOS installs or this machine's hardware — a local measurement belongs in the per-model assessment, not here. Publisher self-reports are not independently reproduced: Qwen's Qwen3-Coder figure ships without the OpenHands commit, serving config or tool-call parser, and Cohere's table mixes its own runs with public reports and Artificial Analysis values. Codestral 22B and the Qwen2.5-Coder builds carry no rows because no current sourced evaluation covers them; an absent row stays absent rather than becoming an estimate. Migration 389 appends the shipped coding IDs the same way 388 does for NIM.
+
## Research: skill-specific comparisons
Research checked September 6, 2026. These are candidate adapters and metrics, not newly imported scores. The current benchmark selector already separates named/versioned evaluations; a future skill selector should narrow that list, never mix unrelated score scales.
diff --git a/scripts/migrations/389-local-coding-comparison-coverage.js b/scripts/migrations/389-local-coding-comparison-coverage.js
new file mode 100644
index 0000000000..7767fadadd
--- /dev/null
+++ b/scripts/migrations/389-local-coding-comparison-coverage.js
@@ -0,0 +1,24 @@
+/** Add the shipped agentic-coding benchmark rows without replacing an install's researched observations. */
+import { readFile } from 'node:fs/promises';
+import { join } from 'node:path';
+import { atomicWrite } from '../../server/lib/fileCore.js';
+import { modelComparisonImportSchema } from '../../server/lib/validation.js';
+
+export default {
+ async up({ rootDir }) {
+ const path = join(rootDir, 'data/model-comparison.json');
+ const raw = await readFile(path, 'utf8').catch(error => {
+ if (error.code !== 'ENOENT') throw error;
+ return null;
+ });
+ if (raw === null) return { added: 0 };
+ const current = modelComparisonImportSchema.parse(JSON.parse(raw));
+ const seed = modelComparisonImportSchema.parse(JSON.parse(await readFile(join(rootDir, 'data.reference/model-comparison.json'), 'utf8')));
+ const ids = new Set(current.observations.map(row => row.id));
+ const additions = seed.observations.filter(row => row.id.startsWith('swe-bench-2026-09-16-') && !ids.has(row.id));
+ if (!additions.length) return { added: 0 };
+ const result = modelComparisonImportSchema.parse({ ...current, observations: [...current.observations, ...additions] });
+ await atomicWrite(path, result);
+ return { added: additions.length };
+ },
+};
diff --git a/scripts/migrations/389-local-coding-comparison-coverage.test.js b/scripts/migrations/389-local-coding-comparison-coverage.test.js
new file mode 100644
index 0000000000..4fbc8a6bba
--- /dev/null
+++ b/scripts/migrations/389-local-coding-comparison-coverage.test.js
@@ -0,0 +1,37 @@
+import { afterEach, expect, it } from 'vitest';
+import { mkdtemp, mkdir, readFile, rm, writeFile } from 'node:fs/promises';
+import { tmpdir } from 'os';
+import { join } from 'path';
+import migration from './389-local-coding-comparison-coverage.js';
+
+let rootDir;
+afterEach(async () => { if (rootDir) await rm(rootDir, { recursive: true, force: true }); });
+
+it('upgrades an existing catalog without losing researched evidence and fails closed on future versions', async () => {
+ rootDir = await mkdtemp(join(tmpdir(), 'portos-coding-seed-'));
+ await mkdir(join(rootDir, 'data'));
+ await mkdir(join(rootDir, 'data.reference'));
+ const seed = JSON.parse(await readFile(new URL('../../data.reference/model-comparison.json', import.meta.url), 'utf8'));
+ await writeFile(join(rootDir, 'data.reference/model-comparison.json'), JSON.stringify(seed));
+ // No install catalog yet — a fresh install gets the seed through setup-data.
+ expect(await migration.up({ rootDir })).toEqual({ added: 0 });
+
+ // Seed CONTENT is asserted in scripts/prune-model-comparison-seed.test.js;
+ // here it only has to be the set this migration backfills.
+ const coding = seed.observations.filter(row => row.id.startsWith('swe-bench-2026-09-16-'));
+ expect(coding).toHaveLength(10);
+
+ const researched = { ...coding[0], notes: 'Example locally researched evidence' };
+ const prior = { schemaVersion: 1, observations: [seed.observations[0], researched] };
+ const path = join(rootDir, 'data/model-comparison.json');
+ await writeFile(path, JSON.stringify(prior));
+ expect(await migration.up({ rootDir })).toEqual({ added: 9 });
+ const result = JSON.parse(await readFile(path, 'utf8'));
+ expect(result.observations.slice(0, 2)).toEqual(prior.observations);
+ expect(await migration.up({ rootDir })).toEqual({ added: 0 });
+
+ const future = JSON.stringify({ ...prior, schemaVersion: 99 });
+ await writeFile(path, future);
+ await expect(migration.up({ rootDir })).rejects.toThrow();
+ expect(await readFile(path, 'utf8')).toBe(future);
+});
diff --git a/scripts/prune-model-comparison-seed.js b/scripts/prune-model-comparison-seed.js
index f4595884c0..b5db458d74 100644
--- a/scripts/prune-model-comparison-seed.js
+++ b/scripts/prune-model-comparison-seed.js
@@ -24,7 +24,7 @@
import { readFile, writeFile } from 'fs/promises';
import { fileURLToPath } from 'url';
import { dirname, join } from 'path';
-import { providerCatalogSlugs } from '../server/lib/comparisonModelScope.js';
+import { localCatalogBenchmarkModels, providerCatalogSlugs } from '../server/lib/comparisonModelScope.js';
import { filterSelectableModels } from '../server/lib/providerModels.js';
import { isDirectlyInvoked } from './lib/directInvocation.js';
@@ -45,6 +45,12 @@ export async function inScopeModels() {
models: filterSelectableModels((provider.models || []).map(model => (typeof model === 'string' ? model : model?.id))),
}));
const scope = providerCatalogSlugs(inventory);
+ // The other half of "models PortOS can dispatch": the shipped `ollama` and
+ // `lmstudio` records carry an EMPTY model list — the real list is whatever the
+ // user pulled — so providers.json alone excludes every model PortOS ships an
+ // installer for. Only DECLARED equivalences widen the keep-set, so retaining a
+ // row stays a reviewed decision rather than a side effect of a similar name.
+ for (const model of localCatalogBenchmarkModels()) scope.add(model);
// Endpoint pricing belongs to the exact serving tier, including stealth IDs
// that deliberately cannot resolve to a public benchmark model.
for (const { models } of inventory) {
diff --git a/scripts/prune-model-comparison-seed.test.js b/scripts/prune-model-comparison-seed.test.js
index f256f93135..38ffd488e7 100644
--- a/scripts/prune-model-comparison-seed.test.js
+++ b/scripts/prune-model-comparison-seed.test.js
@@ -2,6 +2,8 @@ import { describe, it, expect } from 'vitest';
import { readFile } from 'fs/promises';
import { join } from 'path';
import { inScopeModels, prunedSeed } from './prune-model-comparison-seed.js';
+import { BACKENDS, LOCAL_LLM_CATALOG, entryIdsForBackend } from '../server/lib/localLlmCatalog.js';
+import { catalogSlugForProviderModel, localCatalogBenchmarkModels } from '../server/lib/comparisonModelScope.js';
const root = join(import.meta.dirname, '..');
const readSeed = async () => JSON.parse(await readFile(join(root, 'data.reference/model-comparison.json'), 'utf8'));
@@ -30,6 +32,59 @@ describe('model comparison seed scope', () => {
}
});
+ it('scopes every benchmark name the local install catalog declares', async () => {
+ // `ollama` and `lmstudio` ship with `models: []`, so providers.json alone
+ // drops every model PortOS ships an installer for.
+ const scope = await inScopeModels();
+ const declared = localCatalogBenchmarkModels();
+ expect([...declared].filter(model => !scope.has(model))).toEqual([]);
+ for (const model of ['qwen3-coder-30b-a3b', 'ornith-1.0-35b']) expect(declared.has(model)).toBe(true);
+ });
+
+ it('declares a benchmark name only for a model the index actually carries', async () => {
+ // A declared equivalence is a claim about a real index row. A typo or a
+ // retired model would otherwise sit in the catalog looking authoritative
+ // while silently contributing nothing.
+ const known = new Set((await readSeed()).observations.map(row => row.model));
+ const dangling = [...localCatalogBenchmarkModels()].filter(model => !known.has(model));
+ expect(dangling).toEqual([]);
+ });
+
+ it('routes both backend ids of a declaring entry to the same benchmark name', async () => {
+ // Catalog-wide, not just the lane under edit: both backends install the same
+ // weights, so a split means one id silently contributes nothing.
+ const split = [];
+ for (const entry of LOCAL_LLM_CATALOG.filter(model => model.benchmarkModel)) {
+ for (const backend of BACKENDS) {
+ for (const id of entryIdsForBackend(entry, backend)) {
+ if (catalogSlugForProviderModel(id) !== entry.benchmarkModel) split.push([entry.key, id]);
+ }
+ }
+ }
+ expect(split).toEqual([]);
+ });
+
+ it('ships the coding agents the install picker asks the user to choose between, on one scaffold', async () => {
+ // The chart separates series on `benchmark` alone, so a shared axis is the
+ // only thing that makes two rows comparable.
+ const rows = (await readSeed()).observations.filter(row => row.benchmark === 'SWE-bench Verified (pass@1, OpenHands)');
+ const scored = Object.fromEntries(rows.map(row => [row.model, row.quality.value]));
+ expect(scored['qwen3-coder-30b-a3b']).toBeGreaterThan(0);
+ expect(scored['ornith-1.0-35b']).toBeGreaterThan(0);
+ });
+
+ it('never mixes two evaluation methodologies into one benchmark group', async () => {
+ // Guards the scaffold split above: a Cline result and an OpenHands result
+ // sharing a benchmark string would plot as one curve.
+ const byBenchmark = new Map();
+ for (const row of (await readSeed()).observations) {
+ if (!row.quality) continue;
+ if (!byBenchmark.has(row.benchmark)) byBenchmark.set(row.benchmark, new Set());
+ byBenchmark.get(row.benchmark).add(row.quality.source.methodology);
+ }
+ expect([...byBenchmark].filter(([, methodologies]) => methodologies.size > 1)).toEqual([]);
+ });
+
it('carries no retired generation the chart would never plot', async () => {
const models = new Set((await readSeed()).observations.map(row => row.model));
for (const retired of ['claude-2.0', 'gpt-4', 'palm-2', 'llama-2-chat-70b']) {
diff --git a/server/lib/comparisonModelScope.js b/server/lib/comparisonModelScope.js
index 3bd94d49ea..33c23d5d22 100644
--- a/server/lib/comparisonModelScope.js
+++ b/server/lib/comparisonModelScope.js
@@ -22,9 +22,48 @@
* Everything here is textual normalization plus a small alias table for the
* cases where the two namespaces genuinely disagree on a name. A provider id
* that maps to no catalog slug simply contributes nothing to the scope.
+ *
+ * A LOCAL install id is the exception: it is resolved by lookup against the
+ * `benchmarkModel` its `localLlmCatalog.js` entry declares, never by the rules
+ * below, which were written for hosted ids and read a GGUF repo name wrong.
*/
import { isConfiguredDefaultModel } from './providerModels.js';
+import { BACKENDS, LOCAL_LLM_CATALOG, entryIdsForBackend, normalizeBackendModelId } from './localLlmCatalog.js';
+
+/**
+ * Every install id the local-LLM catalog recognizes, mapped to the benchmark
+ * name that entry DECLARES. Local ids get a lookup rather than the textual
+ * normalization below because a local id names a *build* of the weights, and
+ * the difference between a build marker and model identity is not decidable
+ * from the text: stripping `-Reasoning` off Cisco's GGUF lands on a different
+ * Cisco model, and folding `qwen3.8:27b-mlx` onto `qwen3.8-27b` would plot the
+ * hosted API's price and throughput under a 4-bit local build. An entry with no
+ * `benchmarkModel` contributes nothing, which is the honest default.
+ *
+ * Keyed on the catalog's own id normalization, so a tag the user pulled under a
+ * retired alias still resolves.
+ */
+const LOCAL_INSTALL_IDS = new Map(
+ BACKENDS.flatMap(backend => LOCAL_LLM_CATALOG
+ .filter(entry => entry.benchmarkModel)
+ .flatMap(entry => entryIdsForBackend(entry, backend)
+ .map(id => [`${backend}:${normalizeBackendModelId(backend, id)}`, entry.benchmarkModel])))
+);
+
+/** The benchmark name a local install id declares, or '' if none does. */
+function catalogSlugForLocalModel(modelId) {
+ if (typeof modelId !== 'string' || !modelId) return '';
+ for (const backend of BACKENDS) {
+ const declared = LOCAL_INSTALL_IDS.get(`${backend}:${normalizeBackendModelId(backend, modelId)}`);
+ if (declared) return declared;
+ }
+ return '';
+}
+
+/** Benchmark names every catalog entry declares — the local half of seed scope. */
+export const localCatalogBenchmarkModels = () =>
+ new Set(LOCAL_LLM_CATALOG.map(entry => entry.benchmarkModel).filter(Boolean));
// Effort and mode suffixes a harness appends to a model id, plus the
// local-runtime quantization/packaging suffixes that name the same weights as
@@ -82,6 +121,10 @@ export function catalogSlugForProviderModel(modelId) {
if (typeof modelId !== 'string' || !modelId) return '';
let slug = modelId.trim().toLowerCase();
if (isConfiguredDefaultModel(slug) || NOT_A_MODEL.test(slug)) return '';
+ // A declared local equivalence wins: it is reviewed, and the rules below were
+ // written for hosted ids and mis-strip a GGUF repo name.
+ const declared = catalogSlugForLocalModel(modelId);
+ if (declared) return declared;
slug = slug.replace(/\[[^\]]*\]$/, ''); // context-window marker, e.g. [1m]
const prefix = PREFIXES.find(candidate => slug.startsWith(candidate));
diff --git a/server/lib/comparisonModelScope.test.js b/server/lib/comparisonModelScope.test.js
index 3e3a5d9df6..4ef64e08fa 100644
--- a/server/lib/comparisonModelScope.test.js
+++ b/server/lib/comparisonModelScope.test.js
@@ -22,6 +22,34 @@ describe('catalogSlugForProviderModel', () => {
expect(catalogSlugForProviderModel('gpt-oss-120b-mxfp4')).toBe('gpt-oss-120b');
});
+ it('resolves a local install id from the catalog entry that declares one, on either backend', () => {
+ // An Ollama tag and its LM Studio GGUF repo are one model with two
+ // spellings PortOS owns, so both reach the declared benchmark name.
+ for (const id of ['ornith:35b', 'lmstudio-community/Ornith-1.0-35B-GGUF', 'ORNITH:35B']) {
+ expect(catalogSlugForProviderModel(id)).toBe('ornith-1.0-35b');
+ }
+ expect(catalogSlugForProviderModel('qwen3-coder:30b')).toBe('qwen3-coder-30b-a3b');
+ expect(catalogSlugForProviderModel('unsloth/Devstral-Small-2-24B-Instruct-2512-GGUF')).toBe('devstral-small-2-24b');
+ });
+
+ it('gives a local build no benchmark identity unless its entry declares one', () => {
+ // These are the mappings a textual rule would invent. `-Reasoning` is model
+ // identity, not an effort suffix, so stripping it lands on a DIFFERENT Cisco
+ // model; and a 4-bit MLX build is not the hosted endpoint whose price and
+ // throughput `qwen3.8-27b` carries. Silence is the correct answer.
+ expect(catalogSlugForProviderModel('hf.co/fdtn-ai/Foundation-Sec-8B-Reasoning-Q8_0-GGUF:Q8_0')).not.toBe('foundation-sec-8b');
+ expect(catalogSlugForProviderModel('qwen3.8:27b-mlx')).not.toBe('qwen3.8-27b');
+ expect(catalogSlugForProviderModel('qwen2.5-coder:32b')).not.toBe('qwen2.5-coder-32b');
+ });
+
+ it('leaves a name the index really spells that way alone', () => {
+ // `-it` is Google's own name for the model, and a trailing build date is
+ // part of the slug rather than a version to dot.
+ expect(catalogSlugForProviderModel('google/gemma-4-31b-it')).toBe('gemma-4-31b-it');
+ expect(catalogSlugForProviderModel('qwen3-235b-a22b-2507')).toBe('qwen3-235b-a22b-2507');
+ expect(catalogSlugForProviderModel('deepseek-r1-0528')).toBe('deepseek-r1-0528');
+ });
+
it('reads a dashed trailing version as the catalog dotted version', () => {
expect(catalogSlugForProviderModel('claude-sonnet-4-6')).toBe('claude-sonnet-4.6');
expect(catalogSlugForProviderModel('claude-opus-4-6-thinking')).toBe('claude-opus-4.6');
diff --git a/server/lib/localLlmCatalog.js b/server/lib/localLlmCatalog.js
index 95338c9288..2f22de0433 100644
--- a/server/lib/localLlmCatalog.js
+++ b/server/lib/localLlmCatalog.js
@@ -46,7 +46,7 @@ export const LOCAL_LLM_CATEGORIES = [
// Each entry: { key, name, category, recommendedFor?, featured?, params, size,
// family, description, note?, repository?, gated?, capabilities, context?, format?,
// appleSiliconOnly?, ollama?, lmstudio?, ollamaImport?, ollamaAliases?,
-// lmstudioAliases? }
+// lmstudioAliases?, benchmarkModel? }
//
// `category` is the one primary lane that groups a model in the unfiltered
// picker. `recommendedFor` is its intentionally broader set of use-case lanes:
@@ -61,6 +61,16 @@ export const LOCAL_LLM_CATEGORIES = [
// backend (the user can still free-text install one).
// `ollamaAliases` / `lmstudioAliases` preserve recognized ids retired by an
// upstream publisher without making them available as fresh install targets.
+// `benchmarkModel` is this entry's name in the public benchmark index behind
+// Models > Comparison, and it is the ONLY thing that puts a locally installed
+// model on that chart. Set it only where the evaluated configuration has been
+// checked against the entry — never because the names look alike. The textual
+// normalization in `comparisonModelScope.js` deliberately cannot derive it:
+// `ornith:35b` and `Ornith-1.0-35B-GGUF` are one model with two spellings PortOS
+// owns, and guessing from the id alone folds `Foundation-Sec-8B-Reasoning` onto
+// the different `foundation-sec-8b` and a 4-bit local build onto the hosted
+// API's price and throughput rows. Omit it when no equivalence is established;
+// the model simply carries no benchmark evidence, which is the honest state.
// `context` is the model's native context window in tokens — set it only when
// it's a documented spec for that build (the install-card badge shows it; live
// Hugging Face results read the true value from GGUF metadata instead).
@@ -643,6 +653,7 @@ export const LOCAL_LLM_CATALOG = [
// ── Coding / agentic tier ──
{
key: 'qwen3-coder-30b',
+ benchmarkModel: 'qwen3-coder-30b-a3b',
name: 'Qwen3-Coder 30B',
category: 'coding',
recommendedFor: ['coding', 'general'],
@@ -704,6 +715,7 @@ export const LOCAL_LLM_CATALOG = [
},
{
key: 'ornith-9b',
+ benchmarkModel: 'ornith-1.0-9b',
name: 'Ornith 1.0 9B',
category: 'coding',
recommendedFor: ['coding'],
@@ -718,6 +730,7 @@ export const LOCAL_LLM_CATALOG = [
},
{
key: 'devstral-small-2-24b',
+ benchmarkModel: 'devstral-small-2-24b',
name: 'Devstral Small 2 24B',
category: 'coding',
recommendedFor: ['coding', 'vision'],
@@ -731,6 +744,7 @@ export const LOCAL_LLM_CATALOG = [
},
{
key: 'north-mini-code-1.0',
+ benchmarkModel: 'north-mini-code-1.0',
name: 'North Mini Code 1.0 30B-A3B',
category: 'coding',
recommendedFor: ['coding', 'reasoning'],
@@ -744,6 +758,7 @@ export const LOCAL_LLM_CATALOG = [
},
{
key: 'ornith-35b',
+ benchmarkModel: 'ornith-1.0-35b',
name: 'Ornith 1.0 35B',
category: 'coding',
recommendedFor: ['coding'],
@@ -758,6 +773,7 @@ export const LOCAL_LLM_CATALOG = [
},
{
key: 'qwen3.6-35b-a3b',
+ benchmarkModel: 'qwen3.6-35b-a3b',
name: 'Qwen3.6 35B-A3B',
category: 'coding',
recommendedFor: ['coding', 'vision'],
@@ -1016,10 +1032,25 @@ const normalizeLmStudioId = (id) => String(id || '')
.toLowerCase()
.replace(/[-.]gguf$/i, '');
-const normalizeFor = (backend, id) =>
+/**
+ * Reduce an install id to the stem this backend compares by. Exported because
+ * matching "is this pulled model that catalog entry?" must use the SAME
+ * normalization the catalog itself does; a second, looser copy is how a 7b
+ * build gets mistaken for a 20b entry.
+ */
+export const normalizeBackendModelId = (backend, id) =>
backend === 'ollama' ? normalizeOllamaId(id) : normalizeLmStudioId(id);
-const entryIdsForBackend = (entry, backend) => [
+const normalizeFor = normalizeBackendModelId;
+
+/**
+ * Every install id one catalog entry is recognized by on `backend` — the
+ * current one plus the aliases a publisher retired. Callers that need to know
+ * "which ids name this model" (scope mapping, installed-state matching) must
+ * use this rather than reading `entry[backend]`, or an install that pulled the
+ * model under its old id goes unrecognized.
+ */
+export const entryIdsForBackend = (entry, backend) => [
entry[backend],
...(Array.isArray(entry[`${backend}Aliases`]) ? entry[`${backend}Aliases`] : [])
].filter(Boolean);
diff --git a/server/routes/modelComparison.js b/server/routes/modelComparison.js
index f13a74f5e8..b0379ef10f 100644
--- a/server/routes/modelComparison.js
+++ b/server/routes/modelComparison.js
@@ -5,7 +5,17 @@ import { getModelComparison, importModelComparison } from '../services/modelComp
import { hasArtificialAnalysisKey, syncArtificialAnalysisCatalog } from '../services/artificialAnalysis.js';
import { canRefreshModels } from '../lib/aiToolkit/internal/modelFetchers.js';
import { effortLevelsForProvider, filterSelectableModels } from '../lib/providerModels.js';
-import { providerCatalogSlugs } from '../lib/comparisonModelScope.js';
+import { catalogSlugForProviderModel } from '../lib/comparisonModelScope.js';
+
+// The endpoint id plus the benchmark-index name it normalizes to. Both travel,
+// because the page needs them for different things: the executable id labels
+// the row, and the slug is what a catalog observation is keyed by. Deriving the
+// slug client-side would be a second copy of the normalization rules, which is
+// how the coverage list came to report "Needs research" for models the chart
+// was already plotting.
+const inventoryModel = (provider, model) => ({
+ model, efforts: effortLevelsForProvider(provider, model) || [], catalogModel: catalogSlugForProviderModel(model) || null,
+});
export function createModelComparisonRoutes(providerService) {
const router = Router();
@@ -15,14 +25,13 @@ export function createModelComparisonRoutes(providerService) {
]);
const inventory = providers.filter(p => p.enabled !== false).map(p => ({
id: p.id, name: p.name, type: p.type, canDiscover: canRefreshModels(p),
- models: filterSelectableModels(p.models).filter(m => typeof m === 'string' && m).map(model => ({
- model, efforts: effortLevelsForProvider(p, model) || [],
- })),
+ models: filterSelectableModels(p.models).filter(m => typeof m === 'string' && m).map(model => inventoryModel(p, model)),
}));
// Benchmark rows the user can act on: the chart defaults to the models their
// own providers can dispatch, with the rest of the index one click away.
res.json({
- ...catalog, inventory, availableModels: [...providerCatalogSlugs(inventory)].sort(),
+ // Read back off the inventory rather than re-normalizing every id.
+ ...catalog, inventory, availableModels: [...new Set(inventory.flatMap(p => p.models.map(m => m.catalogModel).filter(Boolean)))].sort(),
// Presence only, never the key — the page skips its key prompt when set.
artificialAnalysisKeyConfigured,
});
@@ -35,9 +44,8 @@ export function createModelComparisonRoutes(providerService) {
if (!provider || !canRefreshModels(provider)) throw new ServerError('Provider is unavailable for model discovery', { status: 400 });
const catalog = await providerService.fetchProviderModelCatalog(provider.id);
if (!catalog) throw new ServerError('Provider model discovery returned no catalog', { status: 502 });
- res.json({ providerId: provider.id, models: filterSelectableModels(catalog.models).map(model => ({
- model, efforts: effortLevelsForProvider({ ...provider, models: catalog.models }, model) || [],
- })) });
+ const discovered = { ...provider, models: catalog.models };
+ res.json({ providerId: provider.id, models: filterSelectableModels(catalog.models).map(model => inventoryModel(discovered, model)) });
}));
router.post('/import', asyncHandler(async (req, res) => {
res.json(await importModelComparison(validateRequest(modelComparisonImportSchema, req.body)));
diff --git a/server/routes/modelComparison.test.js b/server/routes/modelComparison.test.js
index 3a7342944d..690650d1fe 100644
--- a/server/routes/modelComparison.test.js
+++ b/server/routes/modelComparison.test.js
@@ -41,14 +41,27 @@ it('loads seeded public evidence without discovery or exposing credentials, and
const result = await request(app).get('/comparison');
expect(result.status).toBe(200);
expect(result.body.observations.length).toBeGreaterThan(0);
- expect(result.body.inventory).toEqual([{ id: 'example-api', name: 'Example API', type: 'api', canDiscover: true, models: [{ model: 'example-model', efforts: [] }] }]);
+ expect(result.body.inventory).toEqual([{ id: 'example-api', name: 'Example API', type: 'api', canDiscover: true, models: [{ model: 'example-model', efforts: [], catalogModel: 'example-model' }] }]);
expect(providerService.fetchProviderModelCatalog).not.toHaveBeenCalled();
const discovery = await request(app).post('/comparison/discover').send({ providerId: 'example-api' });
expect(discovery.status).toBe(200);
- expect(discovery.body.models).toEqual([{ model: 'new-example-model', efforts: [] }]);
+ expect(discovery.body.models).toEqual([{ model: 'new-example-model', efforts: [], catalogModel: 'new-example-model' }]);
expect((await request(app).post('/comparison/discover').send({ providerId: 'disabled' })).status).toBe(400);
});
+it('normalizes a local backend id onto its benchmarked model so the page can match it to an observation', async () => {
+ providerService.getAllProviders.mockResolvedValue({
+ providers: [{ id: 'ollama', name: 'Ollama', type: 'api', enabled: true, models: ['qwen3-coder:30b', 'ornith:35b', 'auto'] }],
+ });
+ const { body } = await request(app).get('/comparison');
+ expect(body.inventory[0].models).toEqual([
+ { model: 'qwen3-coder:30b', efforts: [], catalogModel: 'qwen3-coder-30b-a3b' },
+ { model: 'ornith:35b', efforts: [], catalogModel: 'ornith-1.0-35b' },
+ { model: 'auto', efforts: [], catalogModel: null },
+ ]);
+ expect(body.availableModels).toEqual(['ornith-1.0-35b', 'qwen3-coder-30b-a3b']);
+});
+
it('imports sourced observations durably, retains unrelated and newer metrics, and serializes concurrent imports', async () => {
const input = { schemaVersion: 1, observations: [{ ...observation, id: 'example-new', model: 'example-new-model' }] };
expect((await request(app).post('/comparison/import').send(input)).status).toBe(200);