Skip to content

Conversation

@maxdeviant
Copy link
Member

This PR expands our automatic retry behavior for certain classes of completion errors (e.g., rate limit errors).

Previously this was only available when using burn mode.

We now auto-retry when:

  • Using the Zed provider while on a token-based plan
  • Using the Zed provider while on a legacy plan with burn mode enabled
  • Using a non-Zed provider

Release Notes:

  • Expanded automatic retry behavior for errors in the Agent. Errors classified as "retryable" (such as rate limit errors) will now automatically be retried when:
    • Using the Zed provider while on a token-based plan
    • Using the Zed provider while on a legacy plan with burn mode enabled
    • Using a non-Zed provider
maxdeviant and others added 2 commits October 8, 2025 10:44
Co-authored-by: David Kleingeld <davidsk@zed.dev>
Co-authored-by: David Kleingeld <davidsk@zed.dev>
@maxdeviant maxdeviant self-assigned this Oct 8, 2025
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Oct 8, 2025
.await
.map_err(|error| anyhow!(error))?;

let (mut events, mut error) = match model.stream_completion(request, cx).await {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dvdsk and I noticed that the error handling in this could be improved, as right now the success path and error path are somewhat intertwined (e.g., using the emptiness of events/tool_results for control flow).

This could probably benefit from a larger refactoring in order to make the control flow clearer, but we didn't want to touch it as part of this change on account of not being super familiar with this code.

cc @benbrandt @rtfeldman

@maxdeviant maxdeviant enabled auto-merge (squash) October 8, 2025 15:29
@maxdeviant maxdeviant merged commit 5a0f796 into main Oct 8, 2025
23 checks passed
@maxdeviant maxdeviant deleted the push-knvsqlxoulmv branch October 8, 2025 15:52
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Oct 11, 2025
This PR expands our automatic retry behavior for certain classes of
completion errors (e.g., rate limit errors).

Previously this was only available when using burn mode.

We now auto-retry when:

- Using the Zed provider while on a token-based plan
- Using the Zed provider while on a legacy plan with burn mode enabled
- Using a non-Zed provider

Release Notes:

- Expanded automatic retry behavior for errors in the Agent. Errors
classified as "retryable" (such as rate limit errors) will now
automatically be retried when:
  - Using the Zed provider while on a token-based plan
  - Using the Zed provider while on a legacy plan with burn mode enabled
  - Using a non-Zed provider

---------

Co-authored-by: David Kleingeld <davidsk@zed.dev>
@cmclaughlin
Copy link
Contributor

@maxdeviant thank you! I noticed Zed retrying and found this in the release notes. This is a big time saver for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

3 participants