Uh oh!
There was an error while loading. Please reload this page.
tweak: add experimental chatMaxRetries to config - #2116
Conversation
thdxr
commented
Aug 21, 2025
can you put this flag under |
dfavato
commented
Aug 22, 2025
Changed. Here's a log from a session where I changed my config And here's a log from a session where I used the default config. |
outp1
commented
Sep 17, 2025
Why has this become stale? We cannot use OpenAI models, and we need a solution ( |
dfavato
commented
Sep 24, 2025
Seems like the team chose to just increase the maxRetries and not expose the config to the users Let me know if you want me to update this PR with the conflict resolution, if not you can close this. |
I'd be interested nonetheless, because a part of me is curious to see how things would go if I left the agent overnight. Caveat is, if I leave it overnight, and it gets rate limited, or servers are overloaded, etc. I wouldn't want it to stop; I'd rather have it keep trying as long as it can. So I could set the limit to like 999 to never stop trying. |
Sewer56
commented
Sep 24, 2025
Ideally exponential backoff would be perfect with this, but I'm not sure if the dev team is interested on that for the time being. |
dfavato
commented
Sep 24, 2025
Exponential backoff, and Retry-After behavior is already implemented at ai.util.retry-with-exponential-backoff and it is used in the streamText. So this PR would only let users increase the number of retries tried with exponential backoff. |
Might be worth closing the issue for exponential backoff then. I still think it'd be useful nonetheless. |
dfavato
commented
Sep 24, 2025
Solved the conflicts just in case. |
rekram1-node
commented
Oct 28, 2025
Im gonna resolve the merge conflicts and merge this pr |
Uh oh!
There was an error while loading. Please reload this page.
Sewer56
commented
Oct 29, 2025
Ayo merged! |
Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
This PR tries to give users some power to work around AI_RetryError.
Some related issues this is aiming are:
This PR is also related to feat: Add retry mechanism for Anthropic overloaded errors however, in #1027 the retry backoff is re-implemented and I'm not sure this is the right approach.
Exponential backoff, and Retry-After behavior is already implemented at ai.util.retry-with-exponential-backoff and it is used in the streamText function here.
I could not find handles in the
aipackage where we could expose the backoff parameters (delay, maximumDelay, factor, etc..).If someone can point me to where I should update the documentation, I can do that.
Here's a log from a session where I changed my
config.chatMaxRetriesto 5.