From c4798e5b4dc4335bb34d7a12fad52518fb9648f8 Mon Sep 17 00:00:00 2001 From: Dizzle <112548150+maxmad64bis@users.noreply.github.com> Date: Sun, 11 Oct 2026 05:39:27 +0200 Subject: [PATCH] test(plugin-v2): lock relay of catalog filter defaults and name star sentinel (#16163) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks @maxmad64bis. Wave 27 boarded this pull request cleanly on release/v3.8.52 at f8d11c93268bd00e9a99192c5becf6816dfa91f3. The focused unit tests for the files it touches passed on that combined tree (116 passed in the second run, plus the auto-combo weight tests and the skills characterization tests). Changelog integrity passed. The only file-size finding is executeTargetAttempt.ts, already over its frozen ceiling on the release tip and unchanged by this diff. ⚠️ base-red inherited: #15306 --- @omniroute/opencode-plugin-v2/tests/options.test.ts | 12 ++++++++++++ .../16163-plugin-relay-defaults-doc-star.md | 1 + docs/guides/OPENCODE-V2-PLUGIN.md | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 changelog.d/maintenance/16163-plugin-relay-defaults-doc-star.md diff --git a/@omniroute/opencode-plugin-v2/tests/options.test.ts b/@omniroute/opencode-plugin-v2/tests/options.test.ts index 1e595853ea..d330d2fe4f 100644 --- a/@omniroute/opencode-plugin-v2/tests/options.test.ts +++ b/@omniroute/opencode-plugin-v2/tests/options.test.ts @@ -6,6 +6,7 @@ import { PLUGIN_ID, providerIdFor, resolveTimeouts, + toResolvedOptions, } from "../src/options.js"; describe("parsePluginOptions", () => { @@ -286,3 +287,14 @@ describe("providerId is bounded because it reaches a filesystem path", () => { } }); }); + +describe("resolved relay defaults", () => { + it("relays the four catalog filter defaults from parse to resolved options", () => { + const parsed = parsePluginOptions({ baseURL: "https://gw.example.com" }); + const resolved = toResolvedOptions(parsed); + assert.equal(resolved.usableOnly, parsed.usableOnly); + assert.equal(resolved.freeOnly, parsed.freeOnly); + assert.equal(resolved.toolsOnly, parsed.toolsOnly); + assert.equal(resolved.visionOnly, parsed.visionOnly); + }); +}); diff --git a/changelog.d/maintenance/16163-plugin-relay-defaults-doc-star.md b/changelog.d/maintenance/16163-plugin-relay-defaults-doc-star.md new file mode 100644 index 0000000000..15db62c39a --- /dev/null +++ b/changelog.d/maintenance/16163-plugin-relay-defaults-doc-star.md @@ -0,0 +1 @@ +- **test(plugin-v2):** the plugin keeps the four catalog filter defaults when relaying parsed options, and the guide names `*` as the full-catalog escape hatch ([#16163](https://github.com/diegosouzapw/OmniRoute/pull/16163)) — thanks @maxmad64bis diff --git a/docs/guides/OPENCODE-V2-PLUGIN.md b/docs/guides/OPENCODE-V2-PLUGIN.md index 23a7f9b8f4..ba6d75f4d5 100644 --- a/docs/guides/OPENCODE-V2-PLUGIN.md +++ b/docs/guides/OPENCODE-V2-PLUGIN.md @@ -91,7 +91,7 @@ naming the endpoint and what was lost — so a degraded picker is never a myster | `freshPerOwner` | `10` | Default-view fresh entries kept per provider | | `freshWindowDays` | `90` | Freshness window in days for the fresh branch | | `usageMemory` | `true` | Restore statically dropped entries named by 30-day usage analytics (needs a management token) | -| `visibleModels` / `hiddenModels` | `[]` | Exact-or-suffix allowlists; deny wins | +| `visibleModels` / `hiddenModels` | `[]` | Exact-or-suffix allowlists; deny wins; `*` publishes the full catalog (other filters still apply) | | `geminiSanitization` | `true` | Strip the JSON-Schema keywords Gemini rejects from tool schemas (`$ref` tools are forwarded untouched) | | `apiFormat.allowAnthropic` | `false` | Route allowlisted ids through the Anthropic API block | | `apiFormat.anthropicModels` | `[]` | Full model ids routed to Anthropic |