Description
When using a model that has reached its rate limit, JCode continuously retries the request indefinitely. During this state, the application becomes effectively impossible to stop, interruption is ignored, and the retry loop continues.
Steps to Reproduce
- Configure a model/API with a low rate limit.
- Send requests until the rate limit is reached.
- Observe the retry behavior.
- Attempt to stop the current operation.
Expected Behavior
- Retry logic should either:
- stop after a configurable number of attempts, or
- wait according to the provider's
Retry-After header.
- Instructing Stop should immediately cancel all pending retries and terminate the request.
Actual Behavior
- The application keeps retrying indefinitely after receiving the rate limit error.
- The Stop instruction has no effect while retries are occurring.
- The only way to recover is to forcibly terminate the application/process.
Additional Information
I've attached a screenshot showing the retry loop and the inability to stop the process.

Description
When using a model that has reached its rate limit, JCode continuously retries the request indefinitely. During this state, the application becomes effectively impossible to stop, interruption is ignored, and the retry loop continues.
Steps to Reproduce
Expected Behavior
Retry-Afterheader.Actual Behavior
Additional Information
I've attached a screenshot showing the retry loop and the inability to stop the process.