Commit Graph
2 Commits
Author SHA1 Message Date
dev_agentandClaude Opus 5.5 d90886ddc2 Bound whole retrying Generate call by one deadline
CI / ci (push) Successful in 1m29s
CI / ci (pull_request) Successful in 1m33s
Request.Timeout, or the 60-second default, now sets a single context
deadline covering every attempt and wait, instead of restarting for
each attempt. A shorter caller deadline still wins; attempts receive
Timeout 0 so adapters do not restart the clock. A negative Timeout is
left for the wrapped Provider to reject with its key redaction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 10:53:53 -04:00
dev_agentandClaude Opus 5.5 cbf24e63e1 Add retrying Provider wrapper with backoff and default timeout
llm.NewRetrying wraps a Provider and retries ErrRateLimited, ErrTimeout
and 5xx ErrProvider at most twice. A rate limit waits RetryAfter, capped
at 20 s; other retries use jittered exponential backoff. ErrAuth, 4xx and
other errors are never retried, and no retry is made whose wait would not
end before the caller's context deadline. Generate gets a 60 s per-attempt
timeout when Request.Timeout is 0.

Maestro task: 1a882923-fdb4-4576-ab82-9529e9974b26

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 10:48:07 -04:00