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

   Pushed three commits covering the open threads:
   
   - `c8c326659` `usage.py` coercion: reject subscripted generics, including 
`list[int] | None`, which reduced to `list[int]` and resolved as a container 
type on Python 3.10; accept integral templated values so `"5.0"` behaves like a 
bare `5.0`; and bound the `Decimal` path so a huge exponent cannot outrun 
CPython's digit ceiling.
   - `588bc6214` hoist the coercion above the expensive setup in each 
`execute()`, so an unparsable value fails before the file read, the schema 
introspection, or the agent build.
   - `d3f898d2b` docs: pricing keys on the model name rather than the endpoint, 
each limit bounds one agent run, plus the `self_hosted_models.rst` baseline and 
the README extras table.
   
   I also restored your `validate-operators-init` docstring. My earlier claim 
that the hook permits value-dependent validation in `__init__` was wrong: its 
description forbids reading un-rendered values.
   
   1571 provider tests pass, mypy and prek clean.
   
   Cost cap against a real Anthropic model, 16 input and 4 output tokens, 
provider-reported cost `$0.00018` against a `cost_limit` of `1E-7`:
   
   ![Cost limit exceeded on a real model 
call](https://github.com/user-attachments/assets/7e4abb7c-3a6d-4dee-9a06-970b2b095b47)
   
   Fail-fast with no connection configured at all. The task fails on the named 
`ValueError` from `llm.py:180`, the hoisted coercion, rather than on the 
missing connection:
   
   ![Unparsable cost limit fails before the model 
call](https://github.com/user-attachments/assets/444138a4-e551-43cc-bd08-f0c46e4ef3f4)
   
   Reproducing the first one needs `anthropic==0.108.0` locally, since the 
breeze image's pinned pair cannot construct the Anthropic provider at all 
(`httpx` versus `httpx2`).
   


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