pierrejeambrun opened a new pull request, #74355: URL: https://github.com/apache/airflow/pull/74355
Stacked on #74272 -- `AgentOperator` already exposes request/token/cost counts on the `usage` XCom key; `LLMOperator` computes the same data for its own log summary (`log_run_summary`) but never published it, so there was no way to see what an `LLMOperator` run actually cost without reading task logs. Push it the same way `AgentOperator` does, so tooling that reads the `usage` XCom -- e.g. the Model tab added in #74334 -- works the same for both operators instead of only showing a bare model name for `LLMOperator` runs. No change to `LLMBranchOperator`/`LLMSchemaCompareOperator`/`LLMSQLQueryOperator`/`LLMFileAnalysisOperator` -- each of those overrides `execute()` with its own implementation rather than inheriting `LLMOperator`'s, so this doesn't reach them. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 4.7) Generated-by: Claude Code (Opus 4.7) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
