From 1627bb80ad31a260b96abe80c44a490a8073dd7d Mon Sep 17 00:00:00 2001 From: svtter Date: Thu, 21 May 2026 17:54:43 +0800 Subject: [PATCH 1/2] fix: surface opencode errors to CI and catch model-not-found in fallback - Add `--print-logs --log-level ERROR` to opencode invocation so fatal errors like ProviderModelNotFoundError appear in CI stdout/stderr instead of only in the local log file - Add ProviderModelNotFoundError to default fallback_on_regex in both github-run-opencode and multi-review, so model-not-found errors trigger fallback to the next candidate model Fixes #99 Co-Authored-By: Claude Opus 4.7 --- github-run-opencode/run-github-opencode.py | 4 ++-- multi-review/run-multi-review.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/github-run-opencode/run-github-opencode.py b/github-run-opencode/run-github-opencode.py index 034577a..48a75ca 100755 --- a/github-run-opencode/run-github-opencode.py +++ b/github-run-opencode/run-github-opencode.py @@ -265,11 +265,11 @@ def _main() -> int: ) fallback_on_regex = get_env( "GITHUB_RUN_OPENCODE_FALLBACK_ON_REGEX", - "timed out|timeout|deadline exceeded|context deadline exceeded|operation timed out|connection timed out", + "timed out|timeout|deadline exceeded|context deadline exceeded|operation timed out|connection timed out|ProviderModelNotFoundError", ) # Core opencode env - os.environ["OPENCODE_ARGS"] = "github run" + os.environ["OPENCODE_ARGS"] = "github run --print-logs --log-level ERROR" set_env("OPENCODE_WORKING_DIRECTORY", get_env("GITHUB_RUN_OPENCODE_WORKING_DIRECTORY")) set_env("OPENCODE_ATTEMPTS", get_env("GITHUB_RUN_OPENCODE_ATTEMPTS", "3")) set_env("OPENCODE_RETRY_PROFILE", get_env("GITHUB_RUN_OPENCODE_RETRY_PROFILE", "github-network")) diff --git a/multi-review/run-multi-review.py b/multi-review/run-multi-review.py index 752a32d..283c0ae 100644 --- a/multi-review/run-multi-review.py +++ b/multi-review/run-multi-review.py @@ -541,7 +541,7 @@ def _main() -> int: fallback_models_str = get_env("MULTI_REVIEW_FALLBACK_MODELS", "") fallback_on_regex = get_env( "MULTI_REVIEW_FALLBACK_ON_REGEX", - "timed out|timeout|deadline exceeded|context deadline exceeded|operation timed out|connection timed out", + "timed out|timeout|deadline exceeded|context deadline exceeded|operation timed out|connection timed out|ProviderModelNotFoundError", ) coordinator_prompt_template = get_env("MULTI_REVIEW_COORDINATOR_PROMPT", "") From 435a0868f7b26edd9e38e551ed4a8121162d19a5 Mon Sep 17 00:00:00 2001 From: svtter Date: Thu, 21 May 2026 18:00:10 +0800 Subject: [PATCH 2/2] fix: update fallback-on-regex default in all 6 action.yml files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Python code default was updated but action.yml input defaults override it — without this change ProviderModelNotFoundError would never be matched when using the composite actions. Co-Authored-By: Claude Opus 4.7 --- architect-review/action.yml | 2 +- feature-missing/action.yml | 2 +- github-run-opencode/action.yml | 2 +- multi-review/action.yml | 2 +- review/action.yml | 2 +- spec-coverage/action.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/architect-review/action.yml b/architect-review/action.yml index 53bc5cf..cbadfa6 100644 --- a/architect-review/action.yml +++ b/architect-review/action.yml @@ -73,7 +73,7 @@ inputs: fallback-on-regex: description: Rotate to the next fallback model when output matches this regex. required: false - default: timed out|timeout|deadline exceeded|context deadline exceeded|operation timed out|connection timed out + default: timed out|timeout|deadline exceeded|context deadline exceeded|operation timed out|connection timed out|ProviderModelNotFoundError prompt: description: Value exported as PROMPT before running `opencode github run`. When empty, the built-in architect review prompt is used. required: false diff --git a/feature-missing/action.yml b/feature-missing/action.yml index 886804c..de986d2 100644 --- a/feature-missing/action.yml +++ b/feature-missing/action.yml @@ -151,7 +151,7 @@ inputs: fallback-on-regex: description: Rotate to the next fallback model when output matches this regex. required: false - default: timed out|timeout|deadline exceeded|context deadline exceeded|operation timed out|connection timed out + default: timed out|timeout|deadline exceeded|context deadline exceeded|operation timed out|connection timed out|ProviderModelNotFoundError cleanup-error-comments: description: >- When true, automatically delete error comments posted by opencode to the PR diff --git a/github-run-opencode/action.yml b/github-run-opencode/action.yml index 64697af..5026d4a 100644 --- a/github-run-opencode/action.yml +++ b/github-run-opencode/action.yml @@ -73,7 +73,7 @@ inputs: fallback-on-regex: description: Rotate to the next fallback model when output matches this regex. required: false - default: timed out|timeout|deadline exceeded|context deadline exceeded|operation timed out|connection timed out + default: timed out|timeout|deadline exceeded|context deadline exceeded|operation timed out|connection timed out|ProviderModelNotFoundError prompt: description: Value exported as PROMPT before running `opencode github run`. required: false diff --git a/multi-review/action.yml b/multi-review/action.yml index 077bb6d..5a88e94 100644 --- a/multi-review/action.yml +++ b/multi-review/action.yml @@ -73,7 +73,7 @@ inputs: fallback-on-regex: description: Rotate to next fallback model when output matches this regex. required: false - default: timed out|timeout|deadline exceeded|context deadline exceeded|operation timed out|connection timed out + default: timed out|timeout|deadline exceeded|context deadline exceeded|operation timed out|connection timed out|ProviderModelNotFoundError reviewer-config: description: Path to a YAML file defining custom reviewer personas and team composition. required: false diff --git a/review/action.yml b/review/action.yml index 2b0e48a..48236c5 100644 --- a/review/action.yml +++ b/review/action.yml @@ -73,7 +73,7 @@ inputs: fallback-on-regex: description: Rotate to the next fallback model when output matches this regex. required: false - default: timed out|timeout|deadline exceeded|context deadline exceeded|operation timed out|connection timed out + default: timed out|timeout|deadline exceeded|context deadline exceeded|operation timed out|connection timed out|ProviderModelNotFoundError prompt: description: Value exported as PROMPT before running `opencode github run`. required: false diff --git a/spec-coverage/action.yml b/spec-coverage/action.yml index 2a0388f..ebcbad2 100644 --- a/spec-coverage/action.yml +++ b/spec-coverage/action.yml @@ -170,7 +170,7 @@ inputs: fallback-on-regex: description: Rotate to the next fallback model when output matches this regex. required: false - default: timed out|timeout|deadline exceeded|context deadline exceeded|operation timed out|connection timed out + default: timed out|timeout|deadline exceeded|context deadline exceeded|operation timed out|connection timed out|ProviderModelNotFoundError cleanup-error-comments: description: >- When true, automatically delete error comments posted by opencode to the PR