Skip to content

feat(eventPipeline): let AI summary node reuse a centralized LLM config#2169

Open
cencaogao wants to merge 1 commit into
n9e:mainfrom
cencaogao:feat/ai-summary-reuse-llm-config
Open

feat(eventPipeline): let AI summary node reuse a centralized LLM config#2169
cencaogao wants to merge 1 commit into
n9e:mainfrom
cencaogao:feat/ai-summary-reuse-llm-config

Conversation

@cencaogao

@cencaogao cencaogao commented Jul 9, 2026

Copy link
Copy Markdown

Add a 'Reuse LLM Config' select to the AI summary processor form. Picking a configured LLM (from /api/n9e/ai-llm-configs) hides and clears the inline url/api_key/model_name fields and drops their required rules, so the node can be saved with just llm_config_id. Leaving it empty keeps the existing inline manual configuration.

Uses the absolute form path (prefixNamePath + namePath) for Form.useWatch, matching the existing Relabel processor, so the watch works inside Form.List.

Backend: ccfos/nightingale#3199

Summary by CodeRabbit

  • New Features

    • Added support for selecting a reusable LLM configuration in the AI Summary setup.
    • When a saved configuration is chosen, the manual connection fields are hidden and no longer need to be filled in.
    • Added updated wording and hints in English and Chinese for the new selection option.
  • Bug Fixes

    • Prevents stale manual LLM values from being submitted when using a saved configuration.

Add a 'Reuse LLM Config' select to the AI summary processor form. Picking a
configured LLM (from /api/n9e/ai-llm-configs) hides and clears the inline
url/api_key/model_name fields and drops their required rules, so the node can
be saved with just llm_config_id. Leaving it empty keeps the existing inline
manual configuration.

Uses the absolute form path (prefixNamePath + namePath) for Form.useWatch,
matching the existing Relabel processor, so the watch works inside Form.List.

Backend: ccfos/nightingale#3199
Signed-off-by: cencaogao <cencaogao@gmail.com>
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6201741f-a4bc-4663-b63f-c82ddb0eb70e

📥 Commits

Reviewing files that changed from the base of the PR and between e833bda and 76fa70e.

📒 Files selected for processing (4)
  • src/pages/eventPipeline/locale/en_US.ts
  • src/pages/eventPipeline/locale/zh_CN.ts
  • src/pages/eventPipeline/pages/Form/Processor/AISummary.tsx
  • src/pages/eventPipeline/pages/Form/Processor/index.tsx

📝 Walkthrough

Walkthrough

Adds support for selecting a centralized, reusable LLM configuration in the AISummary event pipeline processor. Includes a new llm_config_id select field, conditional hiding/required logic for inline url/api_key/model_name fields, prefixNamePath wiring from the parent form, and new English/Chinese locale strings.

Changes

Centralized LLM Config Selection in AISummary

Layer / File(s) Summary
LLM config select field and fetch logic
src/pages/eventPipeline/pages/Form/Processor/AISummary.tsx
Fetches available LLM configs on mount, adds a llm_config_id select field, watches its value via prefixNamePath-aware path, and clears inline url, api_key, model_name fields when a config is selected.
Conditional inline field validation and visibility
src/pages/eventPipeline/pages/Form/Processor/AISummary.tsx
Makes url, api_key, and model_name required only when no centralized config is selected, and hides them when a config is in use.
Parent wiring and locale strings
src/pages/eventPipeline/pages/Form/Processor/index.tsx, src/pages/eventPipeline/locale/en_US.ts, src/pages/eventPipeline/locale/zh_CN.ts
Passes prefixNamePath={['processors']} into AISummary from NotifyConfig, and adds llm_config, llm_config_placeholder, and llm_config_tip locale keys in English and Chinese.

Estimated code review effort: 2 (Simple) | ~12 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding centralized LLM config reuse for the AI summary node.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant