Skip to content

feat: Clean up the modelinput unification#12025

Open
erichare wants to merge 4 commits intorelease-1.8.0from
feat-unify-models++
Open

feat: Clean up the modelinput unification#12025
erichare wants to merge 4 commits intorelease-1.8.0from
feat-unify-models++

Conversation

@erichare
Copy link
Collaborator

@erichare erichare commented Mar 4, 2026

This pull request introduces significant improvements to model input handling and embedding model instantiation, along with some refactoring and cleanup of provider-specific field visibility logic. The most important changes are the addition of a unified function for updating build configurations based on model input, a new embedding model factory, and stricter requirements for certain provider fields.

Model input handling improvements:

  • Added handle_model_input_update to unified_models.py, which centralizes and streamlines the process of updating build configurations for components with model inputs. This function replaces previous ad-hoc logic for showing/hiding provider-specific fields and refreshing options, making the codebase more maintainable and extensible. [1] [2] [3]

Embedding model instantiation:

  • Introduced a new get_embeddings function in unified_models.py, providing a standardized way to instantiate embedding models with provider-specific parameters, credential resolution, and available models support. This complements the existing get_llm for language models. [1] [2] [3]

Provider field requirements:

  • Updated the metadata for IBM WatsonX models to require project_id and url fields, ensuring these values must be provided rather than relying solely on environment variable fallbacks. [1] [2]

Refactoring and cleanup:

  • Removed legacy provider-specific field visibility logic (update_provider_fields_visibility and related helpers) from agentics.helpers.model_config.py and updated all components to use the new unified handle_model_input_update instead. This reduces duplication and potential for errors. [1] [2] [3] [4] [5] [6] [7] [8]

Component updates:

  • Refactored base_component.py, csv_agent.py, and openai_tools.py to use handle_model_input_update for build config updates, ensuring consistent provider field handling and option refreshes across all components. [1] [2] [3]

Let me know if you'd like a deeper walkthrough of the new unified model input update flow or the embedding model factory!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 4, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat-unify-models++

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 github-actions bot added the enhancement New feature or request label Mar 4, 2026
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Mar 4, 2026
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Mar 4, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 23%
22.88% (7986/34896) 15.46% (4227/27340) 15.62% (1148/7349)

Unit Test Results

Tests Skipped Failures Errors Time
2611 0 💤 0 ❌ 0 🔥 44.504s ⏱️

@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release-1.8.0@74be98a). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##             release-1.8.0   #12025   +/-   ##
================================================
  Coverage                 ?   36.99%           
================================================
  Files                    ?     1588           
  Lines                    ?    78081           
  Branches                 ?    11838           
================================================
  Hits                     ?    28885           
  Misses                   ?    47574           
  Partials                 ?     1622           
Flag Coverage Δ
backend 57.32% <ø> (?)
frontend 20.50% <ø> (?)
lfx 41.27% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/lfx/src/lfx/base/models/model_metadata.py 84.21% <ø> (ø)
src/lfx/src/lfx/base/models/unified_models.py 21.08% <ø> (ø)
🚀 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.

@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant