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:
@@ -105,7 +105,7 @@ jobs:
|
|||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Install agent CLIs for provider tests
|
- name: Install agent CLIs for provider tests
|
||||||
run: npm install -g @anthropic-ai/claude-code opencode-ai@1.14.46
|
run: npm install -g @anthropic-ai/claude-code opencode-ai
|
||||||
|
|
||||||
- name: Build highlight dependency
|
- name: Build highlight dependency
|
||||||
run: npm run build --workspace=@getpaseo/highlight
|
run: npm run build --workspace=@getpaseo/highlight
|
||||||
@@ -118,6 +118,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
||||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||||
|
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
|
||||||
|
|
||||||
desktop-tests:
|
desktop-tests:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -196,7 +197,7 @@ jobs:
|
|||||||
run: npm run build --workspace=@getpaseo/server
|
run: npm run build --workspace=@getpaseo/server
|
||||||
|
|
||||||
- name: Install agent CLIs for provider tests
|
- name: Install agent CLIs for provider tests
|
||||||
run: npm install -g @anthropic-ai/claude-code @openai/codex@0.105.0 opencode-ai@1.14.46
|
run: npm install -g @anthropic-ai/claude-code @openai/codex@0.105.0 opencode-ai
|
||||||
|
|
||||||
- name: Run Playwright E2E tests
|
- name: Run Playwright E2E tests
|
||||||
run: npm run test:e2e --workspace=@getpaseo/app
|
run: npm run test:e2e --workspace=@getpaseo/app
|
||||||
@@ -251,7 +252,7 @@ jobs:
|
|||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Install agent CLIs for provider tests
|
- name: Install agent CLIs for provider tests
|
||||||
run: npm install -g @anthropic-ai/claude-code @openai/codex@0.105.0 opencode-ai@1.14.46
|
run: npm install -g @anthropic-ai/claude-code @openai/codex@0.105.0 opencode-ai
|
||||||
|
|
||||||
- name: Build highlight dependency
|
- name: Build highlight dependency
|
||||||
run: npm run build --workspace=@getpaseo/highlight
|
run: npm run build --workspace=@getpaseo/highlight
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ function tmpCwd(): string {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const TEST_MODEL = "opencode/big-pickle";
|
const TEST_MODEL = "openrouter/~openai/gpt-mini-latest";
|
||||||
|
|
||||||
interface TurnResult {
|
interface TurnResult {
|
||||||
events: AgentStreamEvent[];
|
events: AgentStreamEvent[];
|
||||||
@@ -92,10 +92,10 @@ function isBinaryInstalled(binary: string): boolean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const hasOpenCode = isBinaryInstalled("opencode");
|
const hasOpenCode = isBinaryInstalled("opencode");
|
||||||
const shouldRunOpenCodeSmokeTests =
|
const hasOpenRouterKey = Boolean(process.env.OPENROUTER_API_KEY);
|
||||||
process.env.PASEO_RUN_OPENCODE_SMOKE_TESTS === "1" && hasOpenCode;
|
const canRunLiveOpenCodeTurns = hasOpenCode && hasOpenRouterKey;
|
||||||
|
|
||||||
(shouldRunOpenCodeSmokeTests ? describe : describe.skip)("OpenCodeAgentClient smoke tests", () => {
|
(canRunLiveOpenCodeTurns ? describe : describe.skip)("OpenCodeAgentClient smoke tests", () => {
|
||||||
const logger = createTestLogger();
|
const logger = createTestLogger();
|
||||||
const buildConfig = (cwd: string): AgentSessionConfig => ({
|
const buildConfig = (cwd: string): AgentSessionConfig => ({
|
||||||
provider: "opencode",
|
provider: "opencode",
|
||||||
|
|||||||
Reference in New Issue
Block a user