Lee-W commented on code in PR #71461:
URL: https://github.com/apache/airflow/pull/71461#discussion_r3771875741
##########
providers/anthropic/src/airflow/providers/anthropic/hooks/anthropic.py:
##########
@@ -119,6 +120,22 @@ def is_terminal(cls, status: str) -> bool:
#: ``outcome_evaluations[].result`` values that mean the outcome did NOT
succeed.
OUTCOME_FAILURE_RESULTS = frozenset({"failed", "max_iterations_reached",
"interrupted"})
+#: ``session.status_idle`` stop reason emitted when a session stops against
its budget.
Review Comment:
https://github.com/apache/airflow/pull/71462#discussion_r3765824885
We can also change it here. (not including the existing ones)
##########
providers/anthropic/src/airflow/providers/anthropic/hooks/anthropic.py:
##########
@@ -587,13 +604,24 @@ def _latest_idle_reason(self, session_id: str,
kickoff_event_id: str | None) ->
def poll_session_completion(
self, session_id: str, *, expect_outcome: bool = False,
kickoff_event_id: str | None = None
- ) -> tuple[bool, str | None]:
+ ) -> tuple[bool, str | None, str | None]:
Review Comment:
Could we make the return type a NamedTuple? This seems easy to get wrong,
especially when the second and third values have the same type.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]