Skip to content

Commit 754fb30

Browse files
Copilotpelikhan
andauthored
Anchor exhausted-retry pattern to a single line to avoid cross-message false positives
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
1 parent 995acfd commit 754fb30

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

actions/setup/js/detect_agent_errors.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ const MISSING_MODEL_PRICING_PATTERN = /Model\s+"([^"]+)"\s+has no AI credits pri
174174
// All forms are treated as non-retryable; the Copilot CLI/SDK has already retried
175175
// internally before surfacing this error (evidenced by "retried N times" context).
176176
const CAPI_QUOTA_EXCEEDED_PATTERN =
177-
/CAPIError:\s*(?:429\s+)?(?:429\s+quota exceeded|Too Many Requests)|Failed to get response from the AI model;\s*retried\s+\d+\s+times[\s\S]{0,300}?Last error:\s*(?:429|5\d{2})\b/i;
177+
/CAPIError:\s*(?:429\s+)?(?:429\s+quota exceeded|Too Many Requests)|Failed to get response from the AI model;\s*retried\s+\d+\s+times[^\n]{0,300}?Last error:\s*(?:429|5\d{2})\b/i;
178178

179179
/**
180180
* Build a case-insensitive merged RegExp from literal/regex patterns.

0 commit comments

Comments
 (0)