kaxil commented on PR #71403:
URL: https://github.com/apache/airflow/pull/71403#issuecomment-5639210700

   Two non-blocking follow-ons to the review above, so everything lands in one 
push rather than another round.
   
   `cost_limit` is per task attempt. Each Airflow attempt re-renders the 
template fields and hands a fresh `UsageLimits` to a fresh `RunUsage`, so 
`cost_limit=Decimal("0.50")` on a task with `retries=3` permits $2.00 across 
the task. `agent.rst` reasons about budget-versus-retry at length for 
`durable=True`, which leaves the plain case unmentioned right next to it. One 
sentence in the `cost_limit` bullet would cover it.
   
   The coercion runs at the `run_sync` call rather than at the top of 
`execute`, so the `ValueError` this PR adds fires only after the expensive 
part. `llm_schema_compare.py:326` lands after `_build_schema_context()` at 314 
has introspected every configured connection against every table, and the same 
shape is at `llm_sql.py:148` (after `_get_schema_context()`), 
`llm_file_analysis.py:150` (after the files are resolved, read and encoded) and 
`agent.py:466` (after `_build_durable_storage` and `_build_agent`). A typo'd or 
empty Variable burns all of that before failing. Hoisting `limits = 
coerce_usage_limits(self.usage_limits)` to the first statement of each 
`execute` and passing `limits` at the call would fix it.
   
   One more that I could not anchor inline, since the lines are not in a hunk: 
`self_hosted_models.rst:296-299` says the provider prefixes were verified 
against pydantic-ai 2.5.0 and 2.10.0, both below the 2.23.0 floor this PR sets, 
in a file the PR already touches.
   
   On CI: the `Latest Boto test: providers` failure is not from this PR. Its 
summary reports the failure under `Providers[amazon]` (1 failed, 4712 passed) 
and every `providers/common/ai/tests/` file passes in the same job.
   


-- 
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]

Reply via email to