Skip to content

fix: Some minor template adjustments for icons in model dropdown#8690

Merged
erichare merged 4 commits into
mainfrom
fix-minor-template-updates
Jun 23, 2025
Merged

fix: Some minor template adjustments for icons in model dropdown#8690
erichare merged 4 commits into
mainfrom
fix-minor-template-updates

Conversation

@erichare
Copy link
Copy Markdown
Collaborator

@erichare erichare commented Jun 23, 2025

This pull request updates the icons for model providers to match the provider name in certain templates.

Summary by CodeRabbit

  • Style
    • Updated icon metadata for the Google provider to display the "GoogleGenerativeAI" icon in relevant dropdown menus across multiple starter projects.
    • Minor reordering of JSON properties in some nodes for consistency.
    • Updated node and edge IDs and viewport position in the "Research Translation Loop" template for improved organization.
    • Replaced and updated note content in the "Research Translation Loop" template with enhanced instructions and description.
    • Corrected icon associations for "OpenAI" and "Anthropic" providers in the "Research Translation Loop" template.

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jun 23, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 23, 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.

Walkthrough

This update modifies several starter project JSON files by updating the icon metadata for the "Google" provider in the embedded LanguageModelComponent code from "Google" to "GoogleGenerativeAI". Additionally, some JSON property orderings and internal node/edge IDs are adjusted, but no logic, control flow, or public API is changed.

Changes

File(s) Change Summary
.../Basic Prompt Chaining.json
.../SEO Keyword Generator.json
Reordered some JSON keys in nodes; updated "Google" provider icon in LanguageModelComponent to "GoogleGenerativeAI".
.../Blog Writer.json
.../Financial Report Parser.json
.../Hybrid Search RAG.json
Updated "Google" provider icon in LanguageModelComponent to "GoogleGenerativeAI".
.../Research Translation Loop.json Replaced all node/edge IDs with new ones; updated note node content; swapped icon assignments for "Anthropic" and "OpenAI" in provider metadata; updated viewport coordinates and template ID.

Sequence Diagram(s)

No sequence diagram generated as the changes are limited to metadata, property ordering, and internal identifiers without affecting control flow.

Possibly related PRs

Suggested labels

bug, size:XS, lgtm

✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Post Copyable Unit Tests in Comment
  • Commit Unit Tests in branch fix-minor-template-updates

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.

@erichare erichare requested a review from Yukiyukiyeah June 23, 2025 21:18
@github-actions github-actions Bot added the bug Something isn't working label Jun 23, 2025
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jun 23, 2025
@erichare erichare enabled auto-merge June 23, 2025 21:21
@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working 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
Copy link
Copy Markdown
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

🔭 Outside diff range comments (2)
src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json (1)

1476-1490: Inconsistent icon slug between runtime code and stored template

The persisted node template still advertises the old slug:

"options_metadata": [
  { "icon": "OpenAI" },
  { "icon": "Anthropic" },
  { "icon": "Google" }          <-- stale
]

Whereas the component code (see lines 1413-1421) now emits:

options_metadata=[{"icon": "OpenAI"}, {"icon": "Anthropic"}, {"icon": "GoogleGenerativeAI"}]

When this flow is re-hydrated the UI may show mismatched icons depending on which source wins the merge.

Suggested fix:

-                  {
-                    "icon": "Google"
-                  }
+                  {
+                    "icon": "GoogleGenerativeAI"
+                  }

Aligning both definitions prevents subtle visual regressions during import/export cycles.

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

1624-1639: Google provider icon metadata is still outdated

All other starter-project updates in this PR changed the Google provider icon from "Google""GoogleGenerativeAI", and the code field inside this same node already expects the new value.
Leaving the old string here will make the UI show the generic Google icon instead of the Gemini one and breaks consistency across templates.

               "options_metadata": [
                 {
                   "icon": "OpenAI"
                 },
                 {
                   "icon": "Anthropic"
                 },
                 {
-                  "icon": "Google"
+                  "icon": "GoogleGenerativeAI"
                 }
               ],
♻️ Duplicate comments (3)
src/backend/base/langflow/initial_setup/starter_projects/Hybrid Search RAG.json (1)

2341-2342: Same inconsistency in the second LanguageModelComponent instance

The duplicate component below repeats the pattern: embedded code lists "GoogleGenerativeAI" while the surrounding JSON keeps "Google". Make sure both stay in sync.

src/backend/base/langflow/initial_setup/starter_projects/Basic Prompt Chaining.json (2)

1586-1586: Same inconsistency as earlier node

The embedded code for LanguageModelComponent-uV35f was updated, but its surrounding template JSON still uses "Google" as the icon. Apply the same fix suggested above.


1873-1873: Third occurrence of template/code divergence

LanguageModelComponent-OVCTy shows the same divergence between code (GoogleGenerativeAI) and template (Google). Harmonise the template.

🧹 Nitpick comments (1)
src/backend/base/langflow/initial_setup/starter_projects/Hybrid Search RAG.json (1)

2053-2054: Icon mismatch between embedded code & top-level metadata

Inside the LanguageModelComponent code you updated the Google provider’s icon to "GoogleGenerativeAI", but the outer-level provider.options_metadata (see lines 2124-2133) still uses "Google".
At runtime this will surface different icons for the same provider in the dropdown versus the component editor.

Please align both places to a single value (preferably "GoogleGenerativeAI" for consistency with the other starter projects).

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4c747d7 and 3ba777e.

📒 Files selected for processing (6)
  • src/backend/base/langflow/initial_setup/starter_projects/Basic Prompt Chaining.json (7 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json (1 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Financial Report Parser.json (1 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Hybrid Search RAG.json (2 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Research Translation Loop.json (24 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/SEO Keyword Generator.json (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Check PyPI Version Update
🔇 Additional comments (10)
src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json (1)

1409-1425: Verify new GoogleGenerativeAI icon is registered in the icon set

The DropdownInput definition inside the embedded LanguageModelComponent code now references {"icon": "GoogleGenerativeAI"}.
If the asset (SVG / font-icon) with that exact slug is not shipped, the UI will silently fall back to a missing-icon placeholder.

Please double-check that:

  1. GoogleGenerativeAI exists in the icon registry that the frontend consumes, and
  2. The casing matches exactly (most loaders are case-sensitive).

Otherwise, ship the icon or revert to the previous slug to avoid a broken glyph.

src/backend/base/langflow/initial_setup/starter_projects/Financial Report Parser.json (1)

1082-1090: ```shell
#!/bin/bash

Display lines 1100-1180 to inspect both embedded code and outer-level options_metadata

sed -n '1100,1180p' "src/backend/base/langflow/initial_setup/starter_projects/Financial Report Parser.json"


</details>
<details>
<summary>src/backend/base/langflow/initial_setup/starter_projects/Basic Prompt Chaining.json (5)</summary>

`311-312`: **No functional impact from JSON key re-ordering**

Only the order of `"selected_output"` and `"type"` was swapped. Since JSON objects are unordered by specification, this has no runtime effect.

---

`609-610`: **Same as above – cosmetic change only**

Key order change in `ChatInput` node; no behaviour change.

---

`1042-1043`: **Same as above – cosmetic change only**

Key order change in `Prompt-F9fZA` node; safe to ignore.

---

`1171-1172`: **Same as above – cosmetic change only**

Key order change in `Prompt-kNwlW` node; safe to ignore.

---

`1299-1299`: I’ll locate the starter‐project JSON and inspect its static `options_metadata` entries to confirm whether `"icon": "Google"` still appears. 


```shell
#!/bin/bash
# Locate the Basic Prompt Chaining template JSON
json_file=$(find src/backend/base/langflow/initial_setup/starter_projects -type f -iname "Basic Prompt Chaining.json")
echo "Found: $json_file"

# Show the provider block and its options_metadata entries
rg -n '"provider"' -A8 -B2 -- "$json_file"
rg -n '"options_metadata"' -A2 -B2 -- "$json_file"
src/backend/base/langflow/initial_setup/starter_projects/SEO Keyword Generator.json (3)

344-346: No-op key order change – looks fine
Only the selected_output key was moved; this is a harmless cosmetic shuffle.


508-510: Second prompt node key order – also fine
Same key-ordering tweak as above; nothing to flag.


966-967: ```shell
#!/bin/bash

Show the provider field and its metadata in the SEO Keyword Generator starter project

rg -n '"name": "provider"' -C5 "src/backend/base/langflow/initial_setup/starter_projects/SEO Keyword Generator.json"

Show the full options_metadata block around lines 1020–1060

sed -n '1020,1060p' "src/backend/base/langflow/initial_setup/starter_projects/SEO Keyword Generator.json"


</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

@erichare erichare added this pull request to the merge queue Jun 23, 2025
Merged via the queue into main with commit 8c983db Jun 23, 2025
63 checks passed
@erichare erichare deleted the fix-minor-template-updates branch June 23, 2025 21:49
ogabrielluiz pushed a commit to bkatya2001/langflow that referenced this pull request Jun 24, 2025
…gflow-ai#8690)

* fix: Minor template updates from refactoring

* Update Research Translation Loop.json

* Update Research Translation Loop.json
Khurdhula-Harshavardhan pushed a commit to JigsawStack/langflow that referenced this pull request Jul 1, 2025
…gflow-ai#8690)

* fix: Minor template updates from refactoring

* Update Research Translation Loop.json

* Update Research Translation Loop.json
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:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants