Skip to content

Commit 5521d6d

Browse files
committed
rm comments
1 parent 1c067f3 commit 5521d6d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/seer/automation/agent/client.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
ToolUseBlockParam,
1818
)
1919
from google import genai # type: ignore[attr-defined]
20-
from google.genai.errors import ClientError, ServerError # Add ServerError import
20+
from google.genai.errors import ClientError, ServerError
2121
from google.genai.types import (
2222
Content,
2323
FunctionDeclaration,
@@ -843,9 +843,11 @@ def is_completion_exception_retryable(exception: Exception) -> bool:
843843
"Internal error",
844844
)
845845
return (
846-
isinstance(exception, ServerError) or # Always retry server errors
847-
(isinstance(exception, ClientError) and
848-
any(error in str(exception) for error in retryable_errors))
846+
isinstance(exception, ServerError)
847+
or (
848+
isinstance(exception, ClientError)
849+
and any(error in str(exception) for error in retryable_errors)
850+
)
849851
) or isinstance(exception, LlmStreamTimeoutError)
850852

851853
@observe(as_type="generation", name="Gemini Generation")

0 commit comments

Comments
 (0)