Skip to content

Add a Model tab to the task-instance page for common.ai - #74334

Merged
kaxil merged 3 commits into
apache:mainfrom
astronomer:common-ai-model-name-ui
Oct 13, 2026
Merged

kaxil merged 3 commits into
apache:mainfrom
astronomer:common-ai-model-name-ui

Conversation

@pierrejeambrun

@pierrejeambrun pierrejeambrun commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #74272 (merged): this PR surfaces the model name (__AIRFLOW__COMMON_AI_MODEL_NAME__) and usage XComs as a first-class "AI Model" tab on the task-instance page, instead of leaving them only reachable through the raw XCom tab.

The tab reads the XComs directly from the core REST API (same-origin, cookie auth) rather than adding a new backend endpoint, and is scoped via applies_to to the operators that actually publish this data (LLMOperator, AgentOperator, and their @task.llm/@task.agent TaskFlow forms) so it doesn't show up as a dead end on unrelated tasks. LLMBranchOperator, LLMSQLQueryOperator, LLMSchemaCompareOperator, and LLMFileAnalysisOperator don't publish the model name yet and aren't in scope here either -- that's upcoming work.

Screenshots below are from a real AgentOperator run (an AIP-tracking agent with tool calls against Confluence/GitHub) rather than a synthetic example, to show real token/cost numbers.

Model + full token usage, cost (33 tool calls, ~195k tokens):

Model tab with usage

Cost tooltip (best-effort pricing explanation):

Cost tooltip

Empty state on a plain @task in the same Dag run -- note the tab isn't even in the nav list (applies_to scoping), this is a direct link:

Empty state

Also fixes a latent bug in update_providers_dependencies.py: it sorted each provider's plugin list by comparing the raw dicts directly, which only worked because no provider had more than one plugin before this one.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.7)

Generated-by: Claude Code (Opus 4.7) following the guidelines

@pierrejeambrun

Copy link
Copy Markdown
Member Author

Rounded dollars estimation

Screenshot 2026-10-06 at 17 14 32

@pierrejeambrun

Copy link
Copy Markdown
Member Author

Soften wording (to mention no auto refresh yet)

Screenshot 2026-10-07 at 14 31 54

Rename to AI Model (plugin and tab)
Screenshot 2026-10-07 at 14 32 09

@pierrejeambrun
pierrejeambrun force-pushed the common-ai-model-name-ui branch 2 times, most recently from 0629768 to 9ac59d0 Compare October 8, 2026 15:21
Reading which model answered and what the run cost currently means pulling raw XComs; the tab shows the model name and usage XComs as a readable table for LLMOperator and AgentOperator runs.
@pierrejeambrun
pierrejeambrun force-pushed the common-ai-model-name-ui branch from 9ac59d0 to f879581 Compare October 13, 2026 09:00
The project-structure check expects the tests for _plugin_urls.py in test__plugin_urls.py.
common.ai now registers a second entry-point plugin, so the plugins manager loads eight provider plugins.
@kaxil
kaxil merged commit d8efc66 into apache:main Oct 13, 2026
207 of 208 checks passed
@kaxil
kaxil deleted the common-ai-model-name-ui branch October 13, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants