Skip to content

Commit bf6907d

Browse files
committed
chore: drop OPENCODE_API_KEY and REQUIRE_PAID from e2e workflow
All e2e tests now use the mock LLM server or noReply seeding — no test makes real provider calls. Remove the API key, model override, and paid-model guard from the CI workflow and seed script. Fixes the Windows CI failure where OPENCODE_API_KEY was unavailable.
1 parent edbce8e commit bf6907d

2 files changed

Lines changed: 0 additions & 18 deletions

File tree

.github/workflows/test.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,6 @@ jobs:
100100
run: bun --cwd packages/app test:e2e:local
101101
env:
102102
CI: true
103-
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
104-
OPENCODE_E2E_MODEL: opencode/claude-haiku-4-5
105-
OPENCODE_E2E_REQUIRE_PAID: "true"
106103
timeout-minutes: 30
107104

108105
- name: Upload Playwright artifacts

packages/opencode/script/seed-e2e.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ const dir = process.env.OPENCODE_E2E_PROJECT_DIR ?? process.cwd()
22
const title = process.env.OPENCODE_E2E_SESSION_TITLE ?? "E2E Session"
33
const text = process.env.OPENCODE_E2E_MESSAGE ?? "Seeded for UI e2e"
44
const model = process.env.OPENCODE_E2E_MODEL ?? "opencode/gpt-5-nano"
5-
const requirePaid = process.env.OPENCODE_E2E_REQUIRE_PAID === "true"
65
const parts = model.split("/")
76
const providerID = parts[0] ?? "opencode"
87
const modelID = parts[1] ?? "gpt-5-nano"
@@ -12,7 +11,6 @@ const seed = async () => {
1211
const { Instance } = await import("../src/project/instance")
1312
const { InstanceBootstrap } = await import("../src/project/bootstrap")
1413
const { Config } = await import("../src/config/config")
15-
const { Provider } = await import("../src/provider/provider")
1614
const { Session } = await import("../src/session")
1715
const { MessageID, PartID } = await import("../src/session/schema")
1816
const { Project } = await import("../src/project/project")
@@ -27,19 +25,6 @@ const seed = async () => {
2725
await Config.waitForDependencies()
2826
await ToolRegistry.ids()
2927

30-
if (requirePaid && providerID === "opencode" && !process.env.OPENCODE_API_KEY) {
31-
throw new Error("OPENCODE_API_KEY is required when OPENCODE_E2E_REQUIRE_PAID=true")
32-
}
33-
34-
const info = await Provider.getModel(ProviderID.make(providerID), ModelID.make(modelID))
35-
if (requirePaid) {
36-
const paid =
37-
info.cost.input > 0 || info.cost.output > 0 || info.cost.cache.read > 0 || info.cost.cache.write > 0
38-
if (!paid) {
39-
throw new Error(`OPENCODE_E2E_MODEL must resolve to a paid model: ${providerID}/${modelID}`)
40-
}
41-
}
42-
4328
const session = await Session.create({ title })
4429
const messageID = MessageID.ascending()
4530
const partID = PartID.ascending()

0 commit comments

Comments
 (0)