Skip to content

feat(plugin): filter published catalog by provider with empty-result guard - #15239

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.52from
maxmad64bis:feat/plugin-provider-filter
Oct 6, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.52from
maxmad64bis:feat/plugin-provider-filter

Conversation

@maxmad64bis

@maxmad64bis maxmad64bis commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ base-red inherited: #15306

Summary

Adds an opt-in providersAllow option to the v2 plugin that restricts the published catalog (models, combos, auto-combos) by provider id prefix; empty or absent means the full catalog, so existing installs are unchanged.

Related Issues

Validation

  • Change type: other
  • Focused tests and category gates from the golden path — 8/8 touched-file tests green, each new case fails without the change
  • npm run lint — ESLint on the touched files is clean; the full run is red on the base (🔴 Release branch not green: release/v3.8.52 #15306).
  • Reconciled with the current active release base; focused checks rerun afterward
  • Production-code changes include a new or updated automated test in this PR

Tests Added Or Updated

  • @omniroute/opencode-plugin-v2/tests/provider-filter.test.ts (new): predicate-level coverage — empty allow, single provider, unknown name fail-open, empty-result case, multi-provider combos, pool typo, alias/canonical resolution, normalization.
  • @omniroute/opencode-plugin-v2/tests/catalog-provider.test.ts (new): integration through parsePluginOptions + the exported toResolvedOptions into collectCatalog — all spec cases at catalog level plus synthetic scale and allowlist interop.
  • @omniroute/opencode-plugin-v2/tests/options.test.ts (extended): option default, acceptance, non-array rejection.

Coverage Notes

  • New module src/provider-filter.ts is pure (no fetch, no global state) and covered at both predicate and catalog levels; src/catalog.ts wiring (3 collection points + empty-result guard) is covered by the integration file.
  • Red proofs: removing any one of the three predicates or the empty-result guard makes the corresponding tests fail.

Reviewer Notes

@maxmad64bis
maxmad64bis force-pushed the feat/plugin-provider-filter branch from 230e264 to a940d27 Compare September 30, 2026 21:51
@maxmad64bis
maxmad64bis marked this pull request as ready for review September 30, 2026 22:07
@maxmad64bis
maxmad64bis marked this pull request as draft October 1, 2026 22:46
@maxmad64bis
maxmad64bis force-pushed the feat/plugin-provider-filter branch from a940d27 to c0e5009 Compare October 2, 2026 00:33
@maxmad64bis
maxmad64bis marked this pull request as ready for review October 2, 2026 09:02
@maxmad64bis
maxmad64bis marked this pull request as draft October 3, 2026 01:23
@maxmad64bis
maxmad64bis force-pushed the feat/plugin-provider-filter branch from c0e5009 to 0f898d9 Compare October 3, 2026 01:23
@maxmad64bis
maxmad64bis marked this pull request as ready for review October 3, 2026 01:41
@maxmad64bis
maxmad64bis force-pushed the feat/plugin-provider-filter branch from 0f898d9 to 002e02c Compare October 4, 2026 15:14
@diegosouzapw
diegosouzapw merged commit fb07b05 into diegosouzapw:release/v3.8.52 Oct 6, 2026
48 of 116 checks passed
@maxmad64bis
maxmad64bis deleted the feat/plugin-provider-filter branch October 7, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants