Gemini 2.5 pro throws 504 deadline exceeded error

I am using Browser-use to automate my browser workflows. The LLM model i have been using is gemini 2.5 pro. In the middle of the workflow it throws this error and the workflow is stuck after that. Browser-use devs says this problem is on gemini’s side

Retrying langchain_google_genai.chat_models._achat_with_retry.._achat_with_retry in 2.0 seconds as it raised DeadlineExceeded: 504 Deadline Exceeded.

Hi @Hassan_Mehmood, Could you please try to set a larger ‘timeout’ in your client request, because this happens when your prompt (or context) is too large to be processed in time. Thank You.