diff --git a/core/src/providers/anthropic.rs b/core/src/providers/anthropic.rs index d843a43fec54..4796ed6c54ea 100644 --- a/core/src/providers/anthropic.rs +++ b/core/src/providers/anthropic.rs @@ -541,11 +541,7 @@ impl AnthropicLLM { "Anthropic API Error: {}", event.error.to_string() ), - retryable: Some(ModelErrorRetryOptions { - sleep: Duration::from_millis(500), - factor: 1, - retries: 1, - }), + retryable: None, })?; break 'stream; } @@ -557,14 +553,10 @@ impl AnthropicLLM { } }, Err(error) => { - Err(ModelError { - message: format!("Error streaming from Anthropic: {:?}", error), - retryable: Some(ModelErrorRetryOptions { - sleep: Duration::from_millis(500), - factor: 1, - retries: 1, - }), - })?; + Err(anyhow!( + "Error streaming tokens from Anthropic: {:?}", + error + ))?; break 'stream; } } diff --git a/core/src/providers/mistral.rs b/core/src/providers/mistral.rs index 1773333a64fb..6cbe71c19354 100644 --- a/core/src/providers/mistral.rs +++ b/core/src/providers/mistral.rs @@ -331,7 +331,7 @@ impl MistralAPIError { } pub fn retryable_streamed(&self) -> bool { - self.retryable() + false } } @@ -497,11 +497,7 @@ impl MistralAILLM { })?, false => Err(ModelError { message: error.message(), - retryable: Some(ModelErrorRetryOptions { - sleep: Duration::from_millis(500), - factor: 1, - retries: 1, - }), + retryable: None, })?, } break 'stream; diff --git a/core/src/providers/openai.rs b/core/src/providers/openai.rs index 4235c4bf738f..539f3f1cfe02 100644 --- a/core/src/providers/openai.rs +++ b/core/src/providers/openai.rs @@ -280,11 +280,7 @@ pub async fn streamed_completion( })?, false => Err(ModelError { message: error.message(), - retryable: Some(ModelErrorRetryOptions { - sleep: Duration::from_millis(500), - factor: 1, - retries: 1, - }), + retryable: None, })?, } break 'stream; @@ -666,11 +662,7 @@ pub async fn streamed_chat_completion( })?, false => Err(ModelError { message: error.message(), - retryable: Some(ModelErrorRetryOptions { - sleep: Duration::from_millis(500), - factor: 1, - retries: 1, - }), + retryable: None, })?, } break 'stream;