goutamadwant opened a new issue, #13184:
URL: https://github.com/apache/seatunnel/issues/13184

   ### Search before asking
   
   - [x] I searched existing issues and pull requests and found no same-purpose 
opt-in LLM retry implementation.
   
   ### Description
   
   Support opt-in retries for transient HTTP responses in the existing LLM 
transform, while retaining one attempt by default. This is an enhancement: the 
current LLM invocation does not apply the shared model retry options, even when 
more than one attempt is configured.
   
   Reuse `model_retry_max_attempts` (default `1`, including the initial 
request), `model_retry_backoff_ms` (default `1000`), and 
`model_retry_max_backoff_ms` (default `10000`). Retry only HTTP `429`, `500`, 
`502`, `503`, and `504`.
   
   Honor valid `Retry-After` delay-seconds and HTTP-date values. Wait for the 
longer of provider delay and local backoff. If a provider delay exceeds a 
positive maximum, fail the invocation rather than retry early. Maximum `0` 
permits an unbounded provider delay with constant local backoff. Missing or 
malformed headers use local backoff. Interrupted retry waits must stop further 
attempts.
   
   Do not retry authentication/configuration failures, response parsing, output 
conversion/validation, or ambiguous network failures such as timeouts and 
disconnects. Preserve existing HTTP timeouts, successful outputs and safe 
diagnostics. Do not add caching or new dependencies.
   
   ### Usage Scenario
   
   An LLM enrichment job should be able to recover from a short rate-limit or 
service-unavailable response without immediately failing the whole job. 
Existing jobs should keep their single-attempt behavior unless explicitly opted 
in.
   
   Retries can duplicate requests and provider charges; non-idempotent CUSTOM 
endpoints can repeat side effects. This must not promise exactly-once remote 
execution. Attempt budgets and provider cooldowns are invocation-local, not 
checkpointed or persisted across engine retries/restores.
   
   ### Related issues
   
   Prerequisites: #13177 provides shared Retry-After handling for embedding, 
and #13179 hardens LLM failure diagnostics. Neither adds opt-in LLM retries. 
This enhancement builds on both without duplicating their scope.
   
   ### Are you willing to submit a PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to