-
Notifications
You must be signed in to change notification settings - Fork 8.2k
feat:Enable combobox for IBM WatsonX URL input fields #10818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Added the 'combobox=True' option to the IBM WatsonX URL input fields in both EmbeddingModelComponent and LanguageModelComponent to enhance user input flexibility.
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughTwo files in the models and agents components are updated to add a combobox parameter to the IBM Watsonx base URL dropdown input field. The change enables combobox UI behavior, allowing users to select from predefined options or enter custom values. No core logic or validation is modified. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touchesImportant Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (4 passed)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/lfx/src/lfx/components/models_and_agents/language_model.py (1)
108-108: LGTM - consistent enhancement across components.The combobox parameter addition matches the change in
embedding_model.py, ensuring consistent UX for IBM WatsonX URL inputs across language and embedding model components.Optional: Consider adding URL validation.
Similar to the
embedding_model.pyfile, consider implementing URL format validation for custom entries to improve user feedback and catch errors earlier.src/lfx/src/lfx/components/models_and_agents/embedding_model.py (1)
79-79: Good UX enhancement - combobox parameter confirmed as valid.The
comboboxparameter is fully supported byDropdownInput(documented in the class definition), enabling users to enter custom IBM WatsonX endpoints alongside predefined options. This pattern is widely used throughout the codebase for similar flexibility.Optional: Consider adding URL validation.
Since users can now enter arbitrary URLs, adding validation similar to the
is_valid_ollama_urlpattern would catch malformed URLs earlier and provide better user feedback. This is not currently implemented for WatsonX endpoints.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/lfx/src/lfx/components/models_and_agents/embedding_model.py(1 hunks)src/lfx/src/lfx/components/models_and_agents/language_model.py(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Run Ruff Check and Format
- GitHub Check: Update Component Index
- GitHub Check: Update Starter Projects
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (41.62%) is below the target coverage (55.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #10818 +/- ##
==========================================
- Coverage 32.54% 29.95% -2.59%
==========================================
Files 1370 1370
Lines 63543 63543
Branches 9394 9394
==========================================
- Hits 20680 19035 -1645
- Misses 41824 43469 +1645
Partials 1039 1039
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Adam-Aghili
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request enables combobox functionality for IBM WatsonX URL input fields, allowing users to enter custom API endpoints in addition to selecting from predefined options. The change affects both the Language Model and Embedding Model components, enhancing input flexibility for IBM WatsonX.ai integration.
Key changes:
- Added
combobox=Trueto IBM WatsonX base URL input definitions in both components - Reinforced combobox setting in LanguageModelComponent's dynamic configuration handler
- Removed default model initialization for IBM WatsonX in LanguageModelComponent (appears unrelated to stated purpose)
Reviewed changes
Copilot reviewed 21 out of 24 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/lfx/src/lfx/components/models_and_agents/language_model.py | Added combobox property to base_url_ibm_watsonx field in both input definition and update_build_config method; removed model_name initialization for IBM watsonx.ai provider |
| src/lfx/src/lfx/components/models_and_agents/embedding_model.py | Added combobox property to base_url_ibm_watsonx field in input definition |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| build_config["base_url_ibm_watsonx"]["show"] = False | ||
| build_config["project_id"]["show"] = False | ||
| build_config["ollama_base_url"]["show"] = False | ||
| elif field_value == "IBM watsonx.ai": |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of these two lines that set model_name options and value for IBM watsonx.ai appears unrelated to the PR's stated purpose of adding combobox functionality. This change means that when switching to IBM watsonx.ai provider, the model_name dropdown won't be populated with default models until the base_url_ibm_watsonx field is changed (which triggers the model fetch at line 336-338). This differs from other providers (OpenAI, Anthropic, Google) which immediately populate model options on provider selection. Was this intentional?
| elif field_value == "IBM watsonx.ai": | |
| elif field_value == "IBM watsonx.ai": | |
| build_config["model_name"]["options"] = IBM_WATSONX_DEFAULT_MODELS | |
| build_config["model_name"]["value"] = IBM_WATSONX_DEFAULT_MODELS[0] |
Added the 'combobox=True' option to the IBM WatsonX URL input fields in both EmbeddingModelComponent and LanguageModelComponent to enhance user input flexibility.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.