Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .agents/scripts/supervisor-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1807,7 +1807,10 @@ check_model_health() {
fi

# Check for known failure patterns
if echo "$probe_result" | grep -qi 'endpoints failed\|Quota protection\|over.*usage\|quota reset\|503\|service unavailable' 2>/dev/null; then
# NOTE: Patterns must not match inside JSON fields (e.g. timestamps contain digits
# like "1770503..." which falsely matched bare "503"). Use word boundaries or
# anchored patterns. The probe returns JSON lines from opencode run --format json.
if echo "$probe_result" | grep -qiE 'endpoints failed|Quota protection|over[_ -]?usage|quota reset|"status":[[:space:]]*503|HTTP 503|503 Service|service unavailable' 2>/dev/null; then
log_warn "Model health check FAILED: provider error detected"
return 1
fi
Expand Down