Skip to content

feat: Model Provider Input Patches for Design#11218

Merged
deon-sanchez merged 34 commits intomainfrom
lfoss-3024-v2
Jan 16, 2026
Merged

feat: Model Provider Input Patches for Design#11218
deon-sanchez merged 34 commits intomainfrom
lfoss-3024-v2

Conversation

@deon-sanchez
Copy link
Collaborator

@deon-sanchez deon-sanchez commented Jan 6, 2026

This pull request improves IBM WatsonX provider support and model provider icon handling, as well as enhances the Model Providers UI with better documentation linking and layout tweaks. The most important changes are summarized below:

IBM WatsonX Provider & Icon Improvements:

  • Standardized the icon for all IBM WatsonX models and the provider itself to use the new IBM icon instead of the previous WatsonxAI icon, ensuring consistency across the UI. [1] [2] [3]
  • Added a new IBM SVG icon and updated icon import/export logic to support both IBM and WatsonxAI icons from a single directory, consolidating icon management. [1] [2] [3] [4] [5] [6] [7]

Model Provider Metadata & Documentation:

  • Added an optional api_docs_url field to model provider metadata in both backend and frontend types, and populated this field for major providers (OpenAI, Anthropic, Google Generative AI, Ollama, IBM WatsonX). [1] [2] [3] [4]
  • Updated the Model Providers UI so that clicking the provider name (when an API key is required) opens the provider's API documentation in a new tab, using the new api_docs_url field.

UI and Usability Improvements:

  • Improved the layout of the Model Providers page and modal for better responsiveness and visual consistency, including adjusting heights and flexbox usage. [1] [2] [3]
  • Updated section titles in the model selection modal from "LLM Models" to "Language Models" for clarity and consistency. [1] [2]

Other Icon Loading Adjustments:

  • Refactored icon loading logic to ensure all IBM-related icons are loaded from the new IBM directory, and removed duplicate or outdated imports. [1] [2]

These changes collectively improve the user experience, maintainability, and extensibility of model provider handling and UI presentation.

- Add new IBM logo icon (IBM.jsx, ibm.svg) for generic IBM provider branding
- Reorganize icon directory structure: move IBMWatsonx to IBM parent folder with watsonx subfolder
- Export both WatsonxAiIcon and IBMIcon from consolidated IBM index
- Update icon mapping in use-get-model-providers to support both 'IBM WatsonX' and 'IBM watsonx.ai' provider names
- Standardize quote style from double to single quotes across use-get-model-providers.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 6, 2026

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.

Walkthrough

The changes consolidate IBM-related icons into a single module, add IBM provider mappings, and remove unused lazy icon imports. WatsonxAiIcon and a new IBMIcon are now exported from a unified IBM module; the IBMWatsonx module is cleared; and icon imports are updated accordingly. A minor layout adjustment adds full height to ModelProvidersContent.

Changes

Cohort / File(s) Change Summary
IBM Icon Module Consolidation
src/frontend/src/icons/IBM/ibm/IBM.jsx, src/frontend/src/icons/IBM/index.tsx, src/frontend/src/icons/IBMWatsonx/index.tsx
New SvgIBM SVG component created; IBMIcon and WatsonxAiIcon forwardRef wrappers added to IBM/index.tsx; IBMWatsonx/index.tsx emptied (WatsonxAiIcon moved to IBM module)
Icon Registration & Imports
src/frontend/src/icons/eagerIconImports.ts, src/frontend/src/icons/lazyIconImports.ts
IBM and WatsonxAiIcon imports consolidated from single IBM module; IBMIcon added to eagerIconsMapping; lazy imports reorganized with IBM and WatsonxAI entries added; VertexAI, vLLM, Weaviate, Wikipedia entries removed
Model Provider Configuration
src/frontend/src/controllers/API/queries/models/use-get-model-providers.ts
Two new IBM provider icon mappings added: "IBM WatsonX" and "IBM watsonx.ai" both map to "IBM"
Layout Adjustment
src/frontend/src/modals/modelProviderModal/components/ModelProvidersContent.tsx
Container height class updated from overflow-hidden w-full to include h-full for full-height flex layout

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 5
❌ Failed checks (1 error, 2 warnings, 2 inconclusive)
Check name Status Explanation Resolution
Test Coverage For New Implementations ❌ Error PR introduces new IBM provider mappings and icon components without corresponding test coverage for these implementations. Add test cases covering new provider mappings, icon components, import consolidation, and dark mode support functionality.
Test Quality And Coverage ⚠️ Warning Pull request introduces new IBM provider mappings and icon components without corresponding test coverage. Update use-get-model-providers.test.ts to include test cases for new IBM provider mappings and create unit tests for IBMIcon and WatsonxAiIcon components.
Excessive Mock Usage Warning ⚠️ Warning Test file uses weak assertions and mocks that obscure actual behavior validation; new IBM provider mappings lack explicit test coverage. Replace weak assertions with specific validations, add test cases for new IBM provider mappings, and unit test icon mapping logic directly.
Title check ❓ Inconclusive The title 'feat: Model Provider Input Patches for Design' is vague and does not clearly convey the main technical changes in the PR. Consider a more specific title such as 'feat: Add IBM icon and consolidate icon imports' or 'feat: Reorganize IBM icons and update provider mappings' to better reflect the actual changes.
Test File Naming And Structure ❓ Inconclusive No test files are present for the icon component changes in this PR. Determine if test files are required for icon component changes and verify against repository testing standards.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch lfoss-3024-v2

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 Jan 6, 2026
@deon-sanchez deon-sanchez self-assigned this Jan 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 17%
17.49% (4997/28556) 10.83% (2388/22036) 11.59% (724/6244)

Unit Test Results

Tests Skipped Failures Errors Time
1998 0 💤 0 ❌ 0 🔥 26.007s ⏱️

@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 6, 2026
@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

❌ Patch coverage is 29.62963% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 34.24%. Comparing base (0e03376) to head (c02900c).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
src/frontend/src/hooks/use-refresh-model-inputs.ts 50.00% 4 Missing and 8 partials ⚠️
src/frontend/src/icons/IBM/index.tsx 0.00% 7 Missing ⚠️
src/lfx/src/lfx/base/models/unified_models.py 0.00% 5 Missing ⚠️
...c/frontend/src/modals/modelProviderModal/index.tsx 0.00% 4 Missing ⚠️
...Component/components/modelInputComponent/index.tsx 50.00% 1 Missing and 2 partials ⚠️
...ProviderModal/components/ModelProvidersContent.tsx 0.00% 3 Missing ⚠️
src/frontend/src/icons/eagerIconImports.ts 0.00% 2 Missing ⚠️
src/frontend/src/icons/lazyIconImports.ts 0.00% 2 Missing ⚠️

❌ Your patch status has failed because the patch coverage (29.62%) is below the target coverage (40.00%). You can increase the patch coverage or adjust the target coverage.
❌ Your project status has failed because the head coverage (40.80%) is below the target coverage (60.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #11218      +/-   ##
==========================================
- Coverage   34.25%   34.24%   -0.02%     
==========================================
  Files        1409     1409              
  Lines       66892    66929      +37     
  Branches     9860     9877      +17     
==========================================
+ Hits        22912    22917       +5     
- Misses      42787    42811      +24     
- Partials     1193     1201       +8     
Flag Coverage Δ
backend 53.53% <ø> (-0.07%) ⬇️
frontend 16.03% <32.65%> (+0.03%) ⬆️
lfx 40.80% <0.00%> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
...lers/API/queries/models/use-get-model-providers.ts 84.61% <ø> (ø)
...s/modelProviderModal/components/ModelSelection.tsx 83.33% <100.00%> (+0.47%) ⬆️
...als/modelProviderModal/components/ProviderList.tsx 81.48% <ø> (ø)
...es/SettingsPage/pages/ModelProvidersPage/index.tsx 0.00% <ø> (ø)
src/lfx/src/lfx/base/models/watsonx_constants.py 100.00% <ø> (ø)
src/frontend/src/icons/eagerIconImports.ts 0.00% <0.00%> (ø)
src/frontend/src/icons/lazyIconImports.ts 0.53% <0.00%> (+<0.01%) ⬆️
...Component/components/modelInputComponent/index.tsx 60.47% <50.00%> (-0.02%) ⬇️
...ProviderModal/components/ModelProvidersContent.tsx 0.00% <0.00%> (ø)
...c/frontend/src/modals/modelProviderModal/index.tsx 0.00% <0.00%> (ø)
... and 3 more

... and 6 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.

@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 6, 2026
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: 1

🤖 Fix all issues with AI Agents
In @src/frontend/src/icons/IBM/ibm/IBM.jsx:
- Around line 1-162: The component SvgIBM is a JSX file that needs to be
converted to TypeScript and add dark mode support: rename IBM.jsx to IBM.tsx,
change the component signature to accept a typed props interface including an
optional boolean isDark (e.g., interface Props { isDark?: boolean } ) and
replace all path fill="currentColor" (and any other fill values relying on
currentColor) with fill={props.isDark ? "#ffffff" : "#0A0A0A"} (or use the typed
prop name you add) so the SVG renders white in dark mode and dark in light mode;
ensure the component export remains default SvgIBM and update any usages/imports
if necessary.
📜 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 dcaed98 and e5f3548.

⛔ Files ignored due to path filters (2)
  • src/frontend/src/icons/IBM/ibm/ibm.svg is excluded by !**/*.svg
  • src/frontend/src/icons/IBM/watsonx/watsonx-ai.svg is excluded by !**/*.svg
📒 Files selected for processing (8)
  • src/frontend/src/controllers/API/queries/models/use-get-model-providers.ts
  • src/frontend/src/icons/IBM/ibm/IBM.jsx
  • src/frontend/src/icons/IBM/index.tsx
  • src/frontend/src/icons/IBM/watsonx/WatsonxAI.jsx
  • src/frontend/src/icons/IBMWatsonx/index.tsx
  • src/frontend/src/icons/eagerIconImports.ts
  • src/frontend/src/icons/lazyIconImports.ts
  • src/frontend/src/modals/modelProviderModal/components/ModelProvidersContent.tsx
💤 Files with no reviewable changes (1)
  • src/frontend/src/icons/IBMWatsonx/index.tsx
🧰 Additional context used
📓 Path-based instructions (5)
src/frontend/src/**/*.{tsx,jsx,css,scss}

📄 CodeRabbit inference engine (.cursor/rules/frontend_development.mdc)

Use Tailwind CSS for styling

Files:

  • src/frontend/src/icons/IBM/ibm/IBM.jsx
  • src/frontend/src/icons/IBM/index.tsx
  • src/frontend/src/modals/modelProviderModal/components/ModelProvidersContent.tsx
src/frontend/src/**/*.{tsx,jsx}

📄 CodeRabbit inference engine (.cursor/rules/frontend_development.mdc)

src/frontend/src/**/*.{tsx,jsx}: Implement dark mode support using the useDarkMode hook and dark store
Use Lucide React for icon components in the application

Files:

  • src/frontend/src/icons/IBM/ibm/IBM.jsx
  • src/frontend/src/icons/IBM/index.tsx
  • src/frontend/src/modals/modelProviderModal/components/ModelProvidersContent.tsx
src/frontend/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/frontend_development.mdc)

src/frontend/src/**/*.{ts,tsx}: Use React 18 with TypeScript for frontend development
Use Zustand for state management

Files:

  • src/frontend/src/icons/IBM/index.tsx
  • src/frontend/src/controllers/API/queries/models/use-get-model-providers.ts
  • src/frontend/src/modals/modelProviderModal/components/ModelProvidersContent.tsx
  • src/frontend/src/icons/eagerIconImports.ts
  • src/frontend/src/icons/lazyIconImports.ts
src/frontend/src/icons/*/index.tsx

📄 CodeRabbit inference engine (.cursor/rules/icons.mdc)

Create an index.tsx for each icon that exports the icon using forwardRef and properly types it as React.ForwardRefExoticComponent<React.PropsWithChildren<{}> & React.RefAttributes<SVGSVGElement>>.

Files:

  • src/frontend/src/icons/IBM/index.tsx
src/frontend/src/icons/lazyIconImports.ts

📄 CodeRabbit inference engine (.cursor/rules/icons.mdc)

Add icon entries to the lazyIconsMapping object in src/frontend/src/icons/lazyIconImports.ts. The key must match the backend icon name exactly (case-sensitive) and use dynamic imports: IconName: () => import("@/icons/IconName").then((mod) => ({ default: mod.IconNameIcon })).

Files:

  • src/frontend/src/icons/lazyIconImports.ts
🧠 Learnings (12)
📚 Learning: 2025-11-24T19:46:57.920Z
Learnt from: CR
Repo: langflow-ai/langflow PR: 0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-11-24T19:46:57.920Z
Learning: Applies to src/frontend/src/icons/*/*.{jsx,js} : Create icon components in `src/frontend/src/icons/IconName/` directories. Add an SVG as a React component (e.g., `IconName.jsx`) that exports a functional component.

Applied to files:

  • src/frontend/src/icons/IBM/ibm/IBM.jsx
  • src/frontend/src/icons/IBM/index.tsx
  • src/frontend/src/icons/eagerIconImports.ts
  • src/frontend/src/icons/lazyIconImports.ts
📚 Learning: 2025-11-24T19:46:57.920Z
Learnt from: CR
Repo: langflow-ai/langflow PR: 0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-11-24T19:46:57.920Z
Learning: Applies to src/frontend/src/icons/*/index.tsx : Create an `index.tsx` for each icon that exports the icon using `forwardRef` and properly types it as `React.ForwardRefExoticComponent<React.PropsWithChildren<{}> & React.RefAttributes<SVGSVGElement>>`.

Applied to files:

  • src/frontend/src/icons/IBM/ibm/IBM.jsx
  • src/frontend/src/icons/IBM/index.tsx
  • src/frontend/src/icons/eagerIconImports.ts
📚 Learning: 2025-06-16T11:14:04.200Z
Learnt from: dolfim-ibm
Repo: langflow-ai/langflow PR: 8394
File: src/frontend/src/icons/Docling/index.tsx:4-6
Timestamp: 2025-06-16T11:14:04.200Z
Learning: The Langflow codebase consistently uses `React.PropsWithChildren<{}>` as the prop type for all icon components using forwardRef, rather than `React.SVGProps<SVGSVGElement>`. This is an established pattern across hundreds of icon files in src/frontend/src/icons/.

Applied to files:

  • src/frontend/src/icons/IBM/ibm/IBM.jsx
  • src/frontend/src/icons/IBM/index.tsx
📚 Learning: 2025-11-24T19:46:45.790Z
Learnt from: CR
Repo: langflow-ai/langflow PR: 0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-11-24T19:46:45.790Z
Learning: Applies to src/frontend/src/**/*.{tsx,jsx} : Use Lucide React for icon components in the application

Applied to files:

  • src/frontend/src/icons/IBM/ibm/IBM.jsx
  • src/frontend/src/icons/IBM/index.tsx
  • src/frontend/src/icons/eagerIconImports.ts
📚 Learning: 2025-11-24T19:46:57.920Z
Learnt from: CR
Repo: langflow-ai/langflow PR: 0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-11-24T19:46:57.920Z
Learning: Applies to src/frontend/src/icons/*/*.{jsx,js} : In SVG components, use the `isDark` prop to switch between light and dark color schemes (e.g., `fill={props.isDark ? "#ffffff" : "#0A0A0A"}`). The `isDark` prop should be passed from the icon wrapper component.

Applied to files:

  • src/frontend/src/icons/IBM/ibm/IBM.jsx
  • src/frontend/src/icons/IBM/index.tsx
  • src/frontend/src/icons/eagerIconImports.ts
📚 Learning: 2025-06-23T12:46:52.420Z
Learnt from: CR
Repo: langflow-ai/langflow PR: 0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: Custom SVG icon components in React should always support both light and dark mode by accepting an 'isdark' prop and adjusting colors accordingly.

Applied to files:

  • src/frontend/src/icons/IBM/ibm/IBM.jsx
  • src/frontend/src/icons/IBM/index.tsx
📚 Learning: 2025-06-23T12:46:52.420Z
Learnt from: CR
Repo: langflow-ai/langflow PR: 0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).

Applied to files:

  • src/frontend/src/icons/IBM/ibm/IBM.jsx
  • src/frontend/src/icons/IBM/index.tsx
  • src/frontend/src/icons/eagerIconImports.ts
📚 Learning: 2025-06-23T12:46:52.420Z
Learnt from: CR
Repo: langflow-ai/langflow PR: 0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: Export custom icon components in React using React.forwardRef to ensure proper ref forwarding and compatibility with parent components.

Applied to files:

  • src/frontend/src/icons/IBM/index.tsx
📚 Learning: 2025-11-24T19:46:57.920Z
Learnt from: CR
Repo: langflow-ai/langflow PR: 0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-11-24T19:46:57.920Z
Learning: Applies to src/frontend/src/icons/lazyIconImports.ts : Add icon entries to the `lazyIconsMapping` object in `src/frontend/src/icons/lazyIconImports.ts`. The key must match the backend icon name exactly (case-sensitive) and use dynamic imports: `IconName: () => import("@/icons/IconName").then((mod) => ({ default: mod.IconNameIcon }))`.

Applied to files:

  • src/frontend/src/icons/IBM/index.tsx
  • src/frontend/src/icons/eagerIconImports.ts
  • src/frontend/src/icons/lazyIconImports.ts
📚 Learning: 2025-06-23T12:46:42.048Z
Learnt from: CR
Repo: langflow-ai/langflow PR: 0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-23T12:46:42.048Z
Learning: Custom React Flow node types should be implemented as memoized components, using Handle components for connection points and supporting optional icons and labels.

Applied to files:

  • src/frontend/src/icons/IBM/index.tsx
📚 Learning: 2025-11-24T19:46:57.920Z
Learnt from: CR
Repo: langflow-ai/langflow PR: 0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-11-24T19:46:57.920Z
Learning: Use clear, recognizable icon names (e.g., `"AstraDB"`, `"Postgres"`, `"OpenAI"`). Always use the same icon name for the same service across backend and frontend.

Applied to files:

  • src/frontend/src/controllers/API/queries/models/use-get-model-providers.ts
  • src/frontend/src/icons/eagerIconImports.ts
  • src/frontend/src/icons/lazyIconImports.ts
📚 Learning: 2025-07-11T22:12:46.255Z
Learnt from: namastex888
Repo: langflow-ai/langflow PR: 9018
File: src/frontend/src/modals/apiModal/codeTabs/code-tabs.tsx:244-244
Timestamp: 2025-07-11T22:12:46.255Z
Learning: In src/frontend/src/modals/apiModal/codeTabs/code-tabs.tsx, the inconsistent showLineNumbers setting between Step 1 (false) and Step 2 (true) in the API modal is intentional to prevent breaking the modal height. Step 1 uses showLineNumbers={false} to save vertical space while Step 2 uses showLineNumbers={true} for better readability of longer code.

Applied to files:

  • src/frontend/src/modals/modelProviderModal/components/ModelProvidersContent.tsx
🧬 Code graph analysis (2)
src/frontend/src/icons/IBM/index.tsx (2)
src/frontend/src/icons/IBM/watsonx/WatsonxAI.jsx (1)
  • SvgWatsonxAI (1-28)
src/frontend/src/icons/IBM/ibm/IBM.jsx (1)
  • SvgIBM (1-161)
src/frontend/src/icons/eagerIconImports.ts (1)
src/frontend/src/icons/IBM/index.tsx (1)
  • IBMIcon (12-16)
⏰ 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). (5)
  • GitHub Check: Validate PR
  • GitHub Check: Test Docker Images / Test docker images
  • GitHub Check: Run Frontend Unit Tests / Frontend Jest Unit Tests
  • GitHub Check: Run Frontend Tests / Determine Test Suites and Shard Distribution
  • GitHub Check: Test Starter Templates
🔇 Additional comments (6)
src/frontend/src/modals/modelProviderModal/components/ModelProvidersContent.tsx (1)

251-251: LGTM!

The addition of h-full ensures the container div takes full height, which aligns with the parent flex layout. This is a straightforward layout improvement.

src/frontend/src/controllers/API/queries/models/use-get-model-providers.ts (1)

89-90: LGTM!

The IBM provider mappings correctly route both "IBM WatsonX" and "IBM watsonx.ai" provider name variants to the "IBM" icon. This follows the established pattern and supports the newly centralized IBM icon module.

src/frontend/src/icons/eagerIconImports.ts (2)

55-55: LGTM!

The import consolidation correctly brings both IBMIcon and WatsonxAiIcon from the centralized IBM module, replacing the previous separate import path. This follows the reorganization to centralize IBM-related icon exports.


175-175: LGTM!

The addition of IBM: IBMIcon to the eager icons mapping properly exposes the new IBM icon, enabling it to be referenced by the "IBM" key in provider icon lookups.

src/frontend/src/icons/IBM/index.tsx (1)

1-16: LGTM!

This centralized IBM icon module correctly follows the established icon pattern:

  • Uses forwardRef to properly forward refs to the underlying SVG elements
  • Types props as React.PropsWithChildren<{}> per the codebase convention
  • Exports both WatsonxAiIcon and IBMIcon from a single module
  • Properly spreads props and forwards refs to the underlying SVG components

Based on learnings, the implementation aligns with the established pattern across hundreds of icon files in the codebase.

src/frontend/src/icons/lazyIconImports.ts (1)

281-288: LGTM! Frontend icon mapping is correctly implemented.

The lazy import entries follow the correct pattern and properly consolidate IBM-related icons into a single module. Both entries use the appropriate dynamic import structure with correctly matching keys and exports.

Verification confirmed:

  • Frontend keys "IBM" and "WatsonxAI" match the backend icon names (case-sensitive)
  • The @/icons/IBM module correctly exports both IBMIcon and WatsonxAiIcon with proper React 18 forwardRef patterns
  • Dynamic import structure matches coding guidelines exactly

@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 7, 2026
- Update all WatsonX model metadata to use generic "IBM" icon instead of "WatsonxAI"
- Standardize quote style from double to single quotes in ModelProvidersPage imports
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 7, 2026
…elSelection

- Change all double quotes to single quotes in ModelSelection component and tests
- Update "LLM Models" label to "Language Models" for consistency
- Standardize arrow function formatting across component
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 7, 2026
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 7, 2026
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 7, 2026
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 8, 2026
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 15, 2026
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 15, 2026
// This provides a reliable fallback when backend filtering fails
if (enabledModelsData?.enabled_models) {
const providerModels = enabledModelsData.enabled_models[provider];
if (providerModels && providerModels[option.name] === false) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

NIT:

if (providerModels && !providerModels[option.name]) {
}

Slight concise and clearer

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

hey so quick heads up on that change, they're not the same.

=== false is a strict check. It only catches models that are explicitly turned off in the config. If a model just isn't listed at all, it comes back as undefined, which passes the check and the model shows up.

With !providerModels[option.name], you're doing a falsy check so undefined, null, empty string, all that stuff gets caught too. Basically any model that's not explicitly enabled would get filtered out.

so im gonna keep === false if the behavior's working right now... otherwise we might accidentally hide models that just aren't in the config yet.


// Filter out disabled provider placeholders to get actual available models
const availableOptions = options.filter(
(opt: any) => !opt?.metadata?.is_disabled_provider,
Copy link
Collaborator

Choose a reason for hiding this comment

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

could we try to define the type and not use any for reusability in the future?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

great suggestion, i can do.

// Check if current model is still available
const isCurrentModelValid =
currentModelName &&
availableOptions.some((opt: any) => opt.name === currentModelName);
Copy link
Collaborator

Choose a reason for hiding this comment

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

same comment as above

@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 15, 2026
…otes and add ModelOptionType

- Convert double quotes to single quotes throughout use-refresh-model-inputs.ts and api/index.ts
- Add ModelOptionType interface with name, id, icon, provider, and metadata properties
- Update validateModelValue to use typed ModelOptionType instead of any for option filtering
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 15, 2026
@github-actions github-actions bot added the lgtm This PR has been approved by a maintainer label Jan 15, 2026
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 16, 2026
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 16, 2026
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 16, 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 lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants