Skip to content

Fix Common AI Model tab not loading on Airflow 3.4 - #74898

Merged
kaxil merged 1 commit into
apache:mainfrom
astronomer:fix-commonai-model-tab-applies-to
Oct 17, 2026
Merged

kaxil merged 1 commit into
apache:mainfrom
astronomer:fix-commonai-model-tab-applies-to

Conversation

@kaxil

@kaxil kaxil commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

The "AI Model" tab added in #74334 never appears on Airflow 3.4. The plugin scopes its React app with applies_to: {"operator_names": [...]}, but applies_to keys are paths on TaskInstanceResponse, and the field there is operator_name. Since #74425, core rejects a path that names no field and withholds the app entirely, so at startup the api-server logs:

Plugin 'ai_model_panel' has a React App 'AI Model' with an 'applies_to' path that matches no field: 'operator_names' names no field 'operator_names' on TaskInstanceResponse (did you mean 'operator_name'?). It could never scope the way it asks to, so the App will not be loaded.

and /api/v2/plugins reports ai_model_panel with no React apps. This PR renames the key to operator_name and keeps the same four operator names.

The existing plugin test read the same misspelled key straight off the plugin class, so it passed. The new test sends the plugin through core's _get_ui_plugins, which is the path the api-server takes. With the old key it fails with the error above.

Found while testing common.ai 1.0.0rc1 (#74741) on Airflow 3.4.0b1. Both screenshots show the same successful AgentOperator task instance. The "after" screenshot comes from 3.4.0b1 running this branch's provider.

Before: no "AI Model" tab.

Before

After:

After

Known gap, not addressed here: LLMOperator pushes model_name but no usage XCom, so on LLMOperator / @task.llm tasks the tab shows only the model name.

The AI Model React app scoped itself with an 'operator_names' applies_to
key, which names no TaskInstanceResponse field. Since core started
rejecting such paths, the api-server withholds the app and the tab never
appears. Use the 'operator_name' field instead.
@kaxil
kaxil merged commit b1ce1ca into apache:main Oct 17, 2026
86 checks passed
@kaxil
kaxil deleted the fix-commonai-model-tab-applies-to branch October 17, 2026 12:54
SameerMesiah97 pushed a commit to SameerMesiah97/airflow-oss-sm97 that referenced this pull request Oct 27, 2026
The AI Model React app scoped itself with an 'operator_names' applies_to
key, which names no TaskInstanceResponse field. Since core started
rejecting such paths, the api-server withholds the app and the tab never
appears. Use the 'operator_name' field instead.
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