Skip to content

Conversation

@edwinjosechittilappilly
Copy link
Collaborator

@edwinjosechittilappilly edwinjosechittilappilly commented Dec 1, 2025

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

  • Style
    • IBM watsonx base URL input fields are now presented as combobox controls, enabling users to both select from predefined options and enter custom values.

✏️ Tip: You can customize this high-level summary in your review settings.

Added the 'combobox=True' option to the IBM WatsonX URL input fields in both EmbeddingModelComponent and LanguageModelComponent to enhance user input flexibility.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 1, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

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

Walkthrough

Two 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

Cohort / File(s) Summary
IBM Watsonx Base URL Input Enhancement
src/lfx/src/lfx/components/models_and_agents/embedding_model.py, src/lfx/src/lfx/components/models_and_agents/language_model.py
Added combobox=True argument to the base_url_ibm_watsonx DropdownInput in both files to enable combobox UI behavior for improved user interaction

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • Highly repetitive change applied identically to two files
  • UI configuration only with no logic modifications
  • No validation, defaults, or downstream logic affected
  • Minimal scope and straightforward implementation

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • lucaseduoli
  • erichare
  • HimavarshaVS

Pre-merge checks and finishing touches

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Test Quality And Coverage ⚠️ Warning The PR adds combobox=True to IBM WatsonX URL inputs but existing tests do not verify this parameter or validate the component input definitions. Add test assertions to verify combobox parameter is set on base_url_ibm_watsonx DropdownInput and that it persists through configuration updates.
Test File Naming And Structure ⚠️ Warning Test files exist with proper structure but lack coverage for the newly added combobox=True feature in embedding_model and language_model components. Add test cases to verify combobox=True configuration in both test files using existing pytest async patterns.
Test Coverage For New Implementations ❓ Inconclusive Cannot locate PR files or test structure to assess test coverage for embedding_model.py and language_model.py modifications. Verify PR branch is checked out and confirm file paths are accessible before reassessing test coverage.
✅ 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 'feat:Enable combobox for IBM WatsonX URL input fields' clearly and specifically describes the main change: enabling combobox functionality for IBM WatsonX URL inputs across the components.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Excessive Mock Usage Warning ✅ Passed PR contains only UI configuration changes to dropdown inputs with no test file modifications, so excessive mock usage cannot be assessed.

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 and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 15%
15.43% (4244/27499) 8.61% (1811/21013) 9.69% (587/6057)

Unit Test Results

Tests Skipped Failures Errors Time
1671 0 💤 0 ❌ 0 🔥 21.708s ⏱️

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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.py file, 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 combobox parameter is fully supported by DropdownInput (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_url pattern 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

📥 Commits

Reviewing files that changed from the base of the PR and between 056faea and bfd6d06.

📒 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
Copy link

codecov bot commented Dec 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 29.95%. Comparing base (21e257a) to head (cd3b273).

❌ 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

Impacted file tree graph

@@            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              
Flag Coverage Δ
backend 41.62% <ø> (-9.95%) ⬇️
frontend 14.28% <ø> (ø)
lfx 39.95% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 94 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@Adam-Aghili Adam-Aghili left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the lgtm This PR has been approved by a maintainer label Dec 1, 2025
Copilot AI review requested due to automatic review settings December 3, 2025 05:14
Copy link
Contributor

Copilot AI left a 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=True to 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":
Copy link

Copilot AI Dec 3, 2025

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?

Suggested change
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]

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants