Route OpenCode live tests through OpenRouter

Big Pickle's models.dev metadata changed upstream to route via the
Anthropic SDK against the Zen OpenAI-compatible endpoint, which the
endpoint rejects. Swap the live-turn smoke tests to
openrouter/~openai/gpt-mini-latest and gate them on OPENROUTER_API_KEY
so fork PRs skip cleanly when the secret is absent. Also unpin
opencode-ai so CI tracks the latest CLI.
This commit is contained in:
Mohamed Boudra
2026-05-18 17:16:57 +07:00
parent 2072265b98
commit 68bce623c8
2 changed files with 8 additions and 7 deletions
@@ -34,7 +34,7 @@ function tmpCwd(): string {
}
}
const TEST_MODEL = "opencode/big-pickle";
const TEST_MODEL = "openrouter/~openai/gpt-mini-latest";
interface TurnResult {
events: AgentStreamEvent[];
@@ -92,10 +92,10 @@ function isBinaryInstalled(binary: string): boolean {
}
const hasOpenCode = isBinaryInstalled("opencode");
const shouldRunOpenCodeSmokeTests =
process.env.PASEO_RUN_OPENCODE_SMOKE_TESTS === "1" && hasOpenCode;
const hasOpenRouterKey = Boolean(process.env.OPENROUTER_API_KEY);
const canRunLiveOpenCodeTurns = hasOpenCode && hasOpenRouterKey;
(shouldRunOpenCodeSmokeTests ? describe : describe.skip)("OpenCodeAgentClient smoke tests", () => {
(canRunLiveOpenCodeTurns ? describe : describe.skip)("OpenCodeAgentClient smoke tests", () => {
const logger = createTestLogger();
const buildConfig = (cwd: string): AgentSessionConfig => ({
provider: "opencode",