kaxil opened a new pull request, #74898:
URL: https://github.com/apache/airflow/pull/74898

   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](./before.png)
   
   After:
   
   ![After](./after.png)
   
   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.
   


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