Skip to content

fix: Replace Google with GoogleGenerativeAI in provider options#8683

Merged
Cristhianzl merged 2 commits into
mainfrom
cz/change-icon-google
Jun 23, 2025
Merged

fix: Replace Google with GoogleGenerativeAI in provider options#8683
Cristhianzl merged 2 commits into
mainfrom
cz/change-icon-google

Conversation

@Cristhianzl
Copy link
Copy Markdown
Member

@Cristhianzl Cristhianzl commented Jun 23, 2025

This pull request includes a minor update to the LanguageModelComponent class in src/backend/base/langflow/components/models/language_model.py. The change updates the options_metadata list to replace "Google" with "GoogleGenerativeAI" as an option.

Summary by CodeRabbit

  • Style
    • Updated the icon for the Google provider option in the provider dropdown to improve visual representation across various components and starter projects. No changes to functionality or logic.

…o include a new model provider "GoogleGenerativeAI" for better user experience
@Cristhianzl Cristhianzl self-assigned this Jun 23, 2025
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jun 23, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 23, 2025

Walkthrough

This change updates the icon metadata for the "Google" provider option in the LanguageModelComponent across multiple files. The icon string is changed from "Google" to "GoogleGenerativeAI" in the provider dropdown input metadata, affecting only the visual representation in the UI. No logic, control flow, or error handling is modified.

Changes

File(s) Change Summary
src/backend/base/langflow/components/models/language_model.py Updated the "Google" provider icon metadata from "Google" to "GoogleGenerativeAI" in the provider dropdown.
src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json Changed the icon metadata for the "Google" provider in embedded LanguageModelComponent code; reordered some JSON properties.
src/backend/base/langflow/initial_setup/starter_projects/Custom Component Maker.json Changed the icon metadata for the "Google" provider in embedded LanguageModelComponent code.
src/backend/base/langflow/initial_setup/starter_projects/Image Sentiment Analysis.json Changed the icon metadata for the "Google" provider in embedded LanguageModelComponent code.
src/backend/base/langflow/initial_setup/starter_projects/Research Translation Loop.json Changed the icon metadata for the "Google" provider in embedded LanguageModelComponent code.
src/backend/base/langflow/initial_setup/starter_projects/Text Sentiment Analysis.json Changed the icon metadata for the "Google" provider in three instances of embedded LanguageModelComponent code.
src/backend/base/langflow/initial_setup/starter_projects/Twitter Thread Generator.json Changed the icon metadata for the "Google" provider in embedded LanguageModelComponent code.

Possibly related PRs

Suggested labels

size:XS, lgtm

Suggested reviewers

  • erichare
  • edwinjosechittilappilly

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 332738a and 3e8df9f.

📒 Files selected for processing (7)
  • src/backend/base/langflow/components/models/language_model.py (1 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json (3 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Custom Component Maker.json (1 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Image Sentiment Analysis.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Research Translation Loop.json (1 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Text Sentiment Analysis.json (3 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Twitter Thread Generator.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
`src/backend/base/langflow/components/**/*`: Add new backend components to the appropriate subdirectory under src/backend/base/langflow/components/.

src/backend/base/langflow/components/**/*: Add new backend components to the appropriate subdirectory under src/backend/base/langflow/components/.

  • src/backend/base/langflow/components/models/language_model.py
`src/backend/**/components/**/*.py`: In your component class, set the 'icon' attribute to a string matching the frontend icon mapping exactly (case-sensitive).

src/backend/**/components/**/*.py: In your component class, set the 'icon' attribute to a string matching the frontend icon mapping exactly (case-sensitive).

  • src/backend/base/langflow/components/models/language_model.py
🔇 Additional comments (10)
src/backend/base/langflow/components/models/language_model.py (1)

33-33: Correct icon metadata update for Google provider
The "provider" dropdown’s options_metadata now uses "GoogleGenerativeAI" instead of "Google", matching the frontend icon mapping exactly.

src/backend/base/langflow/initial_setup/starter_projects/Twitter Thread Generator.json (1)

1931-1931: Consistent embedded component metadata update
The starter-project’s embedded LanguageModelComponent code snippet correctly reflects the new "GoogleGenerativeAI" icon in its options_metadata, keeping this flow in sync with the core component change.

src/backend/base/langflow/initial_setup/starter_projects/Custom Component Maker.json (1)

2641-2656: Correctly updated provider icon in code snippet
The options_metadata entry for the provider dropdown now uses "GoogleGenerativeAI" instead of "Google", matching the renamed import and ensuring consistent UI representation.

src/backend/base/langflow/initial_setup/starter_projects/Research Translation Loop.json (1)

1675-1685: Update Google provider icon metadata
The options_metadata entry for the "Google" provider in the embedded LanguageModelComponent.inputs has been updated to "GoogleGenerativeAI", matching the new ChatGoogleGenerativeAI import. Please verify that the "GoogleGenerativeAI" icon asset is available in the front-end UI bundle.

src/backend/base/langflow/initial_setup/starter_projects/Image Sentiment Analysis.json (2)

1503-1503: Icon metadata updated correctly
The provider dropdown’s options_metadata now uses "GoogleGenerativeAI", aligning with the ChatGoogleGenerativeAI integration and the constants in google_generative_ai_constants.


1793-1793: Consistent icon update for duplicate node
The second embedded LanguageModelComponent node also reflects the "GoogleGenerativeAI" icon metadata, keeping both definitions in sync.

src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json (3)

385-387: No-op: Reordered ChatInput fields
Swapping selected_output and type for the ChatInput node only affects JSON property order and has no semantic impact.


516-518: No-op: Reordered Prompt fields
The change only reorders selected_output and type in the Prompt node definition. JSON order is irrelevant here.


1033-1033: Provider icon metadata update
The embedded LanguageModelComponent code now uses "GoogleGenerativeAI" for the provider's icon metadata. Confirm that any corresponding initial setup JSON templates (e.g., the "options_metadata" under the "provider" field) have been updated in sync.

src/backend/base/langflow/initial_setup/starter_projects/Text Sentiment Analysis.json (1)

1771-1771: Update icon metadata for the Google provider
The options_metadata entries in each embedded LanguageModelComponent now correctly use "GoogleGenerativeAI" instead of "Google", ensuring the dropdown displays the updated icon across all starter‐project snippets.

Also applies to: 2040-2040, 2323-2323

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Post Copyable Unit Tests in Comment
  • Commit Unit Tests in branch cz/change-icon-google

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions Bot added the bug Something isn't working label Jun 23, 2025
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Jun 23, 2025
@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels Jun 23, 2025
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jun 23, 2025
info="Select the model provider",
real_time_refresh=True,
options_metadata=[{"icon": "OpenAI"}, {"icon": "Anthropic"}, {"icon": "Google"}],
options_metadata=[{"icon": "OpenAI"}, {"icon": "Anthropic"}, {"icon": "GoogleGenerativeAI"}],
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

i feel like we should be calling googles generative ai by its product name gemini.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Totally agree!

@Cristhianzl Cristhianzl added this pull request to the merge queue Jun 23, 2025
Merged via the queue into main with commit 797a7b6 Jun 23, 2025
81 of 87 checks passed
@Cristhianzl Cristhianzl deleted the cz/change-icon-google branch June 23, 2025 19:09
ogabrielluiz pushed a commit to bkatya2001/langflow that referenced this pull request Jun 24, 2025
…flow-ai#8683)

* ✨ (language_model.py): update the options_metadata in DropdownInput to include a new model provider "GoogleGenerativeAI" for better user experience

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Khurdhula-Harshavardhan pushed a commit to JigsawStack/langflow that referenced this pull request Jul 1, 2025
…flow-ai#8683)

* ✨ (language_model.py): update the options_metadata in DropdownInput to include a new model provider "GoogleGenerativeAI" for better user experience

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants