Skip to content

Render multi-branch review choices as a multi-select - #71046

Merged
guan404ming merged 3 commits into
apache:mainfrom
guan404ming:llm-branch-multiselect
Aug 4, 2026
Merged

Render multi-branch review choices as a multi-select#71046
guan404ming merged 3 commits into
apache:mainfrom
guan404ming:llm-branch-multiselect

Conversation

@guan404ming

@guan404ming guan404ming commented Aug 4, 2026

Copy link
Copy Markdown
Member

Why

related: #70651 (comment)

  • With allow_multiple_branches=True, reviewers edit branch choices as free-text JSON; a typo fails only at resume, wasting the approval and an LLM call.

How

  • Publish choices as {"type": "array", "enum": [...]} so the review form renders a multi-select.
  • Let the approval mixin pass the list as the param value and accept a list back, re-serialized to JSON.

E2E

Verified against a live Airflow (breeze, pydantic-ai TestModel): the review form renders the multi-select pre-filled with the LLM's choice (billing), the reviewer adds infra, and after Approve the run finishes with billing/infra success and auth skipped.

e2e_llm_branch_multiselect
Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Fable 5)

Generated-by: Claude Code (Fable 5) following the guidelines

@guan404ming
guan404ming force-pushed the llm-branch-multiselect branch from 1f5d702 to 3623ecd Compare August 4, 2026 03:39
@guan404ming
guan404ming marked this pull request as ready for review August 4, 2026 08:36
Comment thread providers/common/ai/src/airflow/providers/common/ai/operators/llm_branch.py Outdated
Comment thread providers/common/ai/src/airflow/providers/common/ai/mixins/approval.py Outdated
@guan404ming

Copy link
Copy Markdown
Member Author

Thanks!

@guan404ming
guan404ming merged commit 0aeec0c into apache:main Aug 4, 2026
83 checks passed
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