From 363e4cbed85a12af97e331d54c37ddb58c5509fa Mon Sep 17 00:00:00 2001 From: Colin McDonnell Date: Sat, 9 May 2026 00:01:30 +0000 Subject: [PATCH] ci: gate gpt-5.5-pro by resolve, refresh stale matrix docs (#639) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * address review: gate by resolve, refresh stale doc claims - list-aliases.ts: gate EXPENSIVE on alias.resolve substring (catches opencode/gpt-pro and openrouter/gpt-pro, which both resolve to a gpt-5.5-pro variant — would have re-entered the matrix under INCLUDE_ALL_PASSTHROUGHS=1 and tripled the cost). - test.yml + models-catalog.md: stop describing the matrix as exhaustive. Mention pruning + INCLUDE_EXPENSIVE/MATRIX_FILTER opt-ins. * address review: clarify env vars are local-only, filter input is the CI knob Pullfrog review caught that wiki/models-catalog.md was advertising INCLUDE_EXPENSIVE / INCLUDE_ALL_PASSTHROUGHS as workflow_dispatch knobs — they're not, only `filter` (→ MATRIX_FILTER) is wired through. The filter coupling already implicitly opens the expensive gate, so dispatch + filter is the canonical CI path. --- test/list-aliases.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/list-aliases.ts b/test/list-aliases.ts index ad3ff76..18e2cbd 100644 --- a/test/list-aliases.ts +++ b/test/list-aliases.ts @@ -31,8 +31,14 @@ function agentForSlug(slug: string): "claude" | "opencode" { const ROUTING_CANARIES = new Set(["openrouter/claude-sonnet", "opencode/claude-sonnet"]); // pruned by default; opt back in with INCLUDE_EXPENSIVE=1 or MATRIX_FILTER. +// matched against `alias.resolve` so every routing layer (openai/, opencode/, +// openrouter/) is covered without enumerating each slug separately. // gpt-5.5-pro burns ~$2.40/run on this fixture — too expensive per-push. -const EXPENSIVE_ALIASES = new Set(["openai/gpt-pro"]); +const EXPENSIVE_RESOLVE_SUBSTRINGS = ["gpt-5.5-pro"]; + +function isExpensive(alias: (typeof modelAliases)[number]): boolean { + return EXPENSIVE_RESOLVE_SUBSTRINGS.some((s) => alias.resolve.includes(s)); +} function isPrunablePassthrough(alias: (typeof modelAliases)[number]): boolean { if (ROUTING_CANARIES.has(alias.slug)) return false; @@ -50,7 +56,7 @@ const includeExpensive = process.env.INCLUDE_EXPENSIVE === "1" || filter !== ""; const matrix = modelAliases .filter((alias) => (filter ? alias.slug.toLowerCase().includes(filter.toLowerCase()) : true)) .filter((alias) => includeAllPassthroughs || !isPrunablePassthrough(alias)) - .filter((alias) => includeExpensive || !EXPENSIVE_ALIASES.has(alias.slug)) + .filter((alias) => includeExpensive || !isExpensive(alias)) .map((alias) => ({ slug: alias.slug, agent: agentForSlug(alias.slug),