sanitize mcp schemas for Gemini; fix gpt-codex-mini alias; add matrix filter

Gemini's generateContent API rejects arktype's `{anyOf:[{enum:[...]}]}` string-enum
encoding, `$schema` metadata, and `anyOf` with sibling fields. Port the old
sanitizer back as an isolated module (action/mcp/geminiSanitizer.ts) and gate it
on `isGeminiRouted(ctx)` so non-gemini routes see the original schema. Wires
`resolvedModel` onto ToolContext so the sanitizer can see the upstream specifier.

Also bumps `openai/gpt-codex-mini` alias from the deprecated `codex-mini-latest`
to `gpt-5.1-codex-mini`, matching the openrouter resolve.

Adds a `filter` workflow_dispatch input + MATRIX_FILTER env that restricts the
models-live matrix to aliases matching a substring, so we can iterate on a
single provider (e.g. `filter=gemini`) without paying to run every model.
This commit is contained in:
Colin McDonnell
2026-04-16 23:09:32 +00:00
committed by pullfrog[bot]
parent a71567af90
commit c608051b79
6 changed files with 152 additions and 10 deletions
+16 -7
View File
@@ -3,7 +3,12 @@
* matrix job. `agent` is auto-derived from the alias provider and matches the
* harness the runtime would pick in production.
*
* usage: `node action/test/list-aliases.ts`
* set MATRIX_FILTER to a substring to restrict the matrix to matching aliases
* — useful for iterating on a single provider without paying for every model.
*
* usage:
* node action/test/list-aliases.ts
* MATRIX_FILTER=gemini node action/test/list-aliases.ts
*/
import { modelAliases } from "../models.ts";
@@ -11,11 +16,15 @@ function agentForSlug(slug: string): "claude" | "opencode" {
return slug.startsWith("anthropic/") ? "claude" : "opencode";
}
const matrix = modelAliases.map((alias) => ({
slug: alias.slug,
agent: agentForSlug(alias.slug),
// readable display name (GHA renders slashes awkwardly in matrix job titles)
name: alias.slug.replace("/", "-"),
}));
const filter = process.env.MATRIX_FILTER?.trim() ?? "";
const matrix = modelAliases
.filter((alias) => (filter ? alias.slug.toLowerCase().includes(filter.toLowerCase()) : true))
.map((alias) => ({
slug: alias.slug,
agent: agentForSlug(alias.slug),
// readable display name (GHA renders slashes awkwardly in matrix job titles)
name: alias.slug.replace("/", "-"),
}));
process.stdout.write(JSON.stringify(matrix));