fix(ci): use opencode-go plan model for AI review #5
@@ -210,9 +210,19 @@ jobs:
|
||||
# (variants: high, max). NOTE the provider prefix must be
|
||||
# "opencode-go", NOT "opencode" (Zen is a different, pay-per-call
|
||||
# provider and fails with 'Insufficient account funds').
|
||||
# Output is redirected (not piped through tee): if opencode fails,
|
||||
# the job must fail here so the error log is never posted as a
|
||||
# "review" comment.
|
||||
#
|
||||
# Belt and suspenders on auth: OPENCODE_API_KEY is exported for
|
||||
# env-based pickup, AND an opencode.json is generated that binds
|
||||
# the key to the opencode-go provider explicitly - so headless CI
|
||||
# never depends on env-var mapping behavior.
|
||||
printf '{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"provider": {
|
||||
"opencode-go": {
|
||||
"options": { "apiKey": "%s" }
|
||||
}
|
||||
}
|
||||
}' "$OPENCODE_API_KEY" > opencode.json
|
||||
# --print-logs: surface auth/provider errors in the CI log instead
|
||||
# of failing with an opaque exit code
|
||||
opencode run \
|
||||
|
||||
Reference in new issue
Block a user