diff --git a/test/local-model-harness-facts.test.ts b/test/local-model-harness-facts.test.ts index ae476753..cd38a78e 100644 --- a/test/local-model-harness-facts.test.ts +++ b/test/local-model-harness-facts.test.ts @@ -29,6 +29,7 @@ import { } from '../src/local-model/harness-facts.js'; import { stockInstallCommand } from '../src/cli-install-runner.js'; import { getCli, registryFilePath, reloadCliRegistry } from '../src/config/cli-registry/registry.js'; +import { getLocalModelCatalog } from '../src/config/local-model-catalog.js'; import type { CliEntry } from '../src/config/cli-registry/types.js'; import type { LocalModelCatalog } from '../src/types.js'; @@ -106,6 +107,15 @@ describe('cliAcceptsCustomModelId (the launch path’s model id test, on the sto } }); + it('accepts every model id of the stock catalogue for every harness the catalogue offers', () => { + const catalog = getLocalModelCatalog(); + for (const harness of catalog.harnesses.filter((row) => !row.gated)) { + for (const model of catalog.models) { + expect(cliAcceptsCustomModelId(stockEntry(harness.cli), model.id), `${harness.cli} ${model.id}`).toBe(true); + } + } + }); + it('refuses a colon for a CLI whose `--model` pattern has none, and accepts the same CLI without it', () => { const omp = stockEntry('omp'); expect(cliAcceptsCustomModelId(omp, 'qwen3.5:9b')).toBe(false);