test(cli): replace OpenAI-specific assertions with generic third-party check

The opencode provider test asserted models with "openai/" or
"openrouter/openai/" prefixes, but these are environment-dependent —
opencode returns whatever providers are connected, and CI may not have
OpenAI configured. Replace with a generic check that at least one
non-opencode/ namespaced model exists.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Mohamed Boudra
2026-04-11 04:39:22 +00:00
parent 1d04fbeb80
commit b268c17fe2

View File

@@ -224,15 +224,8 @@ try {
"opencode output should include at least one first-party opencode model",
);
assert(
ids.some((id) => id.startsWith("openai/") || id.startsWith("openrouter/openai/")),
"opencode output should include at least one OpenAI-backed model",
);
assert(
ids.some(
(id) =>
(id.startsWith("openai/") || id.startsWith("openrouter/openai/")) && id.includes("codex"),
),
"opencode output should include at least one codex-optimized OpenAI model",
ids.some((id) => id.includes("/") && !id.startsWith("opencode/")),
"opencode output should include at least one third-party provider model",
);
assert(
data.every((m) => m.model && m.id && m.description !== undefined),