You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: ModelUtils retries auth/request-side errors when retryOn is unset, contradicting RETRYABLE_ERRORS docs #2861
This contradicts the documented default of ExecutionConfig.RETRYABLE_ERRORS (which backs ExecutionConfig.MODEL_DEFAULTS): its javadoc explicitly lists HTTP 401/403 (authentication) and other 4xx client errors as non-retryable, while 429/5xx/timeout/network errors are retryable.
Because the field is nullable and ExecutionConfig.mergeConfigs keeps null when neither side supplies a predicate, any caller that builds an ExecutionConfig with only maxAttempts / backoff (or relies on the agent-level maxRetries budget) silently gets retry-all semantics: an invalid API key (401/403) or a permanently bad request (400/422) is retried maxAttempts - 1 extra times, each guaranteed to fail again — burning latency, quota, and log noise.
Impact
Every official model extension (OpenAI, Anthropic, DashScope, Gemini, Ollama) routes through ModelUtils.applyTimeoutAndRetry, so the bug affects all providers when retryOn is not explicitly configured.
Auth and request-side failures are retried pointlessly; the final error surfaces only after the full retry budget is exhausted.
Suggested Fix
When retryOn is null, default to ExecutionConfig.RETRYABLE_ERRORS (429/5xx/timeout/network) so runtime behavior matches the documented default. This is a behavior change for callers that relied on retry-all — it restores the semantics the docs already promise.
Related
[Bug]: ExecutionConfig retry settings are ignored for tool failures #2829 observes the tool-execution path also has a retry-default problem (ToolExecutor.applyRetry shares the same error -> true fallback); note that tool retry is currently dead code there because execute() converts failures into normal ToolResultBlock.error signals before retryWhen can see them. This issue fixes only the live model path; the tool path deserves separate tracking.
Category: bug | Area: area/core/model | Status: Confirmed (verified against current main)
Root Cause: In ModelUtils.applyTimeoutAndRetry, when ExecutionConfig.getRetryOn() is null the default predicate becomes error -> true (retry everything). This contradicts the documented default ExecutionConfig.RETRYABLE_ERRORS, which excludes 401/403 and other 4xx client errors. Impact: Authentication / request-side errors burn the full retry budget (and backoff delays), masking the real failure and slowing failure detection. Severity: medium
Suggested fix: default retryOn to RETRYABLE_ERRORS instead of retry-all when unset.
Activity
oss-maintainer commentedon Sep 14, 2026
Issue Evaluation
Category:
bug| Area:area/core/model| Status: Confirmed (verified against currentmain)Root Cause: In
ModelUtils.applyTimeoutAndRetry, whenExecutionConfig.getRetryOn()isnullthe default predicate becomeserror -> true(retry everything). This contradicts the documented defaultExecutionConfig.RETRYABLE_ERRORS, which excludes 401/403 and other 4xx client errors.Impact: Authentication / request-side errors burn the full retry budget (and backoff delays), masking the real failure and slowing failure detection.
Severity: medium
Suggested fix: default
retryOntoRETRYABLE_ERRORSinstead of retry-all when unset.Automated evaluation by github-manager-bot
fix(core): default retryOn to RETRYABLE_ERRORS when unset in ModelUtils