max_retries Parameter in ChatMistralAI Class Is Ineffective Due to Commented Code #30362
Closed
5 tasks done
Labels
🤖:bug
Related to a bug, vulnerability, unexpected error with an existing feature
investigate
Flagged for investigation.
Checked other resources
Example Code
The following code:
returns:
Error Message and Stack Trace (if applicable)
Description
The
max_retries
parameter of the ChatMistralAI class doesn't do anything because the two lines necessary for the retry decorator have been commented out from thecompletion_with_retry
method here:langchain/libs/partners/mistralai/langchain_mistralai/chat_models.py
Line 460 in 0ba03d8
As a result, as you can see in my example, even though
timeout
is set to 1s and themax_retries
to 10, the call fails after about 1s which suggest that it fails after only 1 try.The lines were commented a year ago in this commit 53ac1eb in this PR #19420.
System Info
The text was updated successfully, but these errors were encountered: