feat: add BurnCloud provider metadata and assets#10569
Conversation
|
Hi! I'm I would like to apply some automated changes to this pull request, but it looks like I don't have the necessary permissions to do so. To get this pull request into a mergeable state, please do one of the following two things:
|
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis PR adds comprehensive BurnCloud support to Langflow, including documentation, frontend icon assets, backend model integration, and availability across starter projects. BurnCloud is integrated as an OpenAI-compatible API gateway provider with fields for API key, base URL, and model configuration. Changes
Sequence DiagramsequenceDiagram
participant User as User/UI
participant Langflow as Langflow Build
participant BurnCloud as BurnCloud API
User->>Langflow: Select BurnCloud model provider
Langflow->>BurnCloud: get_models(api_key, base_url)
activate BurnCloud
BurnCloud-->>Langflow: Available models list
deactivate BurnCloud
User->>Langflow: Configure BurnCloud (api_key, model_name, temperature, etc.)
Langflow->>Langflow: update_build_config()
User->>Langflow: Execute flow
Langflow->>Langflow: build_model() - create ChatOpenAI instance
Langflow->>BurnCloud: POST /chat/completions (with openAI_api_key, openAI_api_base)
activate BurnCloud
BurnCloud-->>Langflow: Model response
deactivate BurnCloud
Langflow-->>User: Text output
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touchesImportant Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 2 warnings)
✅ Passed checks (4 passed)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (5)
src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json (1)
2687-2716: Fix missing BurnCloud icon metadata only.The original concern about runtime failure is unfounded—BurnCloud is properly registered in MODEL_PROVIDERS_DICT and the BurnCloudModel component has a working build_model() method. However, the options_metadata array is incomplete.
Add the missing BurnCloud icon entry to match the options list:
"options_metadata": [ { "icon": "Anthropic" }, + { + "icon": "BurnCloud" + }, { "icon": "GoogleGenerativeAI" }, { "icon": "OpenAI" } ],src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json (1)
1510-1516: Fix typo and mention BurnCloud in quick start.Minor copy tweak: “searcn” → “search”; and note can mention BurnCloud as an option.
- * The **Agent** returns a structured response to your searcn in the chat. + * The **Agent** returns a structured response to your search in the chat. + + Tip: You can use OpenAI or BurnCloud as the model provider—set it in the Agent’s “Model Provider” field.src/backend/base/langflow/initial_setup/starter_projects/Market Research.json (1)
1658-1679: Options and metadata array mismatch in agent_llm dropdown.The options array contains 6 entries (lines 1658–1665) while options_metadata contains only 4 entries (lines 1666–1679). BurnCloud, IBM watsonx.ai, and Ollama have no corresponding icon metadata, creating an index mismatch that will break frontend rendering expecting 1:1 correspondence.
Add the missing metadata entries:
"options_metadata": [ { "icon": "Anthropic" }, + { + "icon": "BurnCloud" + }, { "icon": "GoogleGenerativeAI" }, { "icon": "OpenAI" }, - { - "icon": "OpenAI" - } + { + "icon": "WatsonxAI" + }, + { + "icon": "Ollama" + } ],src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json (1)
465-472: Add BurnCloud icon to options_metadata for consistent UI renderingBurnCloud appears in the options array but is missing from options_metadata. This will cause the dropdown to fail rendering the icon. Add the BurnCloud entry to options_metadata alongside existing provider icons:
"options_metadata": [ { "icon": "Anthropic" }, + { + "icon": "BurnCloud" + }, { "icon": "GoogleGenerativeAI" }, { "icon": "OpenAI" } ]This applies to all three agent_llm configuration blocks in this file (lines ~467, ~1197, ~2698) and consistently across other starter projects.
src/backend/base/langflow/initial_setup/starter_projects/Nvidia Remix.json (1)
918-947: Original review comment is correct; apply the suggested fixes for complete BurnCloud supportBurnCloud is registered in MODEL_PROVIDERS_DICT, confirming the backend support is solid. However, the two issues identified in the review are valid:
Missing icon metadata: The
options_metadataarray lacks a BurnCloud entry despite it being listed in options, which will cause the UI to render without an icon for that provider option.Generic API key label: Keeping the provider-specific label ("OpenAI API Key") is misleading when BurnCloud or other providers are selected before the dynamic field rebuild occurs.
Both fixes align with the starter project's provider-agnostic design.
🧹 Nitpick comments (15)
src/backend/base/langflow/initial_setup/starter_projects/Travel Planning Agents.json (4)
1773-1779: Add BurnCloud icon metadata and make API key label provider‑agnostic for this agent.
- options includes "BurnCloud" but options_metadata lacks its icon; add it so the card renders with the correct icon.
- Change “OpenAI API Key” to a neutral “API Key” since this agent can now use BurnCloud.
Suggested diffs:
"options_metadata": [ { "icon": "Anthropic" }, { "icon": "GoogleGenerativeAI" }, { "icon": "OpenAI" }, + { "icon": "BurnCloud" } ],- "display_name": "OpenAI API Key", - "info": "The OpenAI API Key to use for the OpenAI model.", + "display_name": "API Key", + "info": "API key for the selected provider.",
2496-2501: Mirror the BurnCloud icon and neutral API key label for Local Expert Agent.Apply the same two adjustments here:
- Add
{ "icon": "BurnCloud" }to options_metadata.- Rename “OpenAI API Key” to “API Key” with provider‑neutral info text.
3219-3224: Mirror the BurnCloud icon and neutral API key label for Travel Concierge Agent.Add the BurnCloud icon entry to options_metadata and switch the API key label/info to provider‑agnostic wording as above.
751-759: Docs and tags should reflect multi‑provider support.
- Update Quickstart note to mention provider‑agnostic setup (OpenAI or BurnCloud).
- Adjust tags to avoid implying OpenAI‑only.
Suggested diffs:
-1. Add your OpenAI API Key to each Agent. +1. Add your API key for the selected provider (e.g., OpenAI or BurnCloud) to each Agent.- "tags": ["agents", "openai"] + "tags": ["agents", "burncloud", "openai"]Also applies to: 3809-3811
src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json (2)
1714-1722: BurnCloud added—also add icon metadata for visual parity.You added "BurnCloud" to options but options_metadata below lacks a BurnCloud icon entry. Add it so the provider renders with its icon in the UI.
"options_metadata": [ { "icon": "Anthropic" }, + { + "icon": "BurnCloud" + }, { "icon": "GoogleGenerativeAI" }, { "icon": "OpenAI" } ],
1745-1761: Make labels provider‑agnostic (“API Key”, “API Base”).The labels still say “OpenAI API Key” and “OpenAI API Base”. With BurnCloud available, these should be generic to avoid confusion.
- "display_name": "OpenAI API Key", - "info": "The OpenAI API Key to use for the OpenAI model.", + "display_name": "API Key", + "info": "API key for the selected model provider.", - "display_name": "OpenAI API Base", - "info": "The base URL of the OpenAI API. Defaults to https://api.openai.com/v1. You can change this to use other APIs like JinaChat, LocalAI and Prem.", + "display_name": "API Base URL", + "info": "Base URL for the selected provider's API (e.g., OpenAI, BurnCloud).",Also applies to: 2045-2061
src/backend/base/langflow/initial_setup/starter_projects/Simple Agent.json (2)
1038-1046: Include BurnCloud icon metadata alongside the new option.Add a BurnCloud icon entry so the dropdown shows the correct icon.
"options_metadata": [ { "icon": "Anthropic" }, + { + "icon": "BurnCloud" + }, { "icon": "GoogleGenerativeAI" }, { "icon": "OpenAI" } ],
149-156: Make the note provider‑agnostic (“Add your LLM API key here”).Since BurnCloud is supported, avoid “OpenAI‑only” language to reduce confusion.
- "description": "### 💡 Add your OpenAI API key here👇", + "description": "### 💡 Add your LLM API key here👇\n(OpenAI or BurnCloud)",src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json (2)
1195-1202: Repeat for second Agent blockSame as above: add BurnCloud to options_metadata for this node and confirm provider-field swapping works when BurnCloud is selected. Otherwise, make the API key label/provider help text provider-agnostic in this template.
"options_metadata": [ { "icon": "Anthropic" }, + { "icon": "BurnCloud" }, { "icon": "GoogleGenerativeAI" }, { "icon": "OpenAI" } ]
2696-2703: Third Agent block: icon parity and UX checkAdd BurnCloud to options_metadata here as well for consistent UI. Also sanity‑check that changing to BurnCloud removes OpenAI‑only fields in this starter (to avoid “OpenAI API Key” label showing under BurnCloud).
"options_metadata": [ { "icon": "Anthropic" }, + { "icon": "BurnCloud" }, { "icon": "GoogleGenerativeAI" }, { "icon": "OpenAI" } ]src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json (1)
2091-2098: Add provider is fine; verify provider registry and optional icon metadata.
- Ensure MODEL_PROVIDERS_DICT/MODELS_METADATA include "BurnCloud" so this option works end‑to‑end.
- Consider adding an options_metadata entry for BurnCloud (icon: "BurnCloud") if the UI relies on it for badges.
src/frontend/src/utils/styleUtils.ts (1)
261-262: Normalize bundle name casing for consistency.Most bundle entries use lowercase name values (e.g., "anthropic", "openai"). Consider
name: "burncloud"to align with convention and avoid case‑sensitive lookup surprises.- { display_name: "BurnCloud", name: "BurnCloud", icon: "BurnCloud" }, + { display_name: "BurnCloud", name: "burncloud", icon: "BurnCloud" },src/frontend/src/icons/BurnCloud/BurnCloudIcon.jsx (1)
1-28: Support dark mode and avoid gradient id collisions.
- Add
isDarkprop handling to adjust stops for dark themes, per icon guidelines.- Use
useId()to generate a unique gradient id to prevent collisions when multiple icons render on a page.-const BurnCloudIconSVG = ({ ...props }) => ( - <svg +import { useId } from "react"; + +const BurnCloudIconSVG = ({ isDark = false, ...props }) => { + const gradId = useId(); + return ( + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-label="BurnCloud icon" fill="none" {...props} > <defs> - <linearGradient - id="burncloud-gradient" + <linearGradient + id={gradId} x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(-0.04 9.248 -11.433 -0.05 12.058 8.618)" > - <stop offset="0" stopColor="#f7b52c" /> - <stop offset="1" stopColor="#e95513" /> + <stop offset="0" stopColor={isDark ? "#ffc266" : "#f7b52c"} /> + <stop offset="1" stopColor={isDark ? "#ff6e2a" : "#e95513"} /> </linearGradient> </defs> <path - fill="url(#burncloud-gradient)" + fill={`url(#${gradId})`} d="M17.8 10.1c-.6-.9-1.4-1.9-1.4-1.9s-1.8-2.1-1.5-5.2c0 0-6.9 2.7-7 8.2 0 0-1-1.6-.8-4.6 0 0-2.2 2.1-2.5 5.5-2.1.7-3.8 2.5-3.8 4.3 0 2.5 2.7 4.6 5.9 4.6-2.4-.4-4.2-2-4.2-4 0-1.4.8-2.5 2-3.3.1 1.1.5 2.4.5 2.4s1.2 3.8 5.4 4.8a6.8 6.8 0 0 0 3.7-.3c1.3-.6 2.8-1.8 2.8-4.5 0 0 .1-2.7-1.5-4.1 0 0 2.1 5-1.8 6.5a4.8 4.8 0 0 1-3.9 0c-1.7-.7-3.8-2.5-3.5-7.2 0 0 1 3.4 3.2 4.7 0 0-2-5.8 3.9-9.8 0 0 .5 2.1 1.9 3.3.4.4 4 3.2 3.3 8 .7-.9 1.3-3.1.7-4.8 0 0-.1-.4-.4-.9 1.5.3 2.7 1.5 2.8 4.2.1 2.3-1.6 4.2-3.8 5 3-.4 5.4-2.7 5.4-5.6 0-2.8-2.2-5.1-5.4-5.3Z" /> </svg> -); + ); +};Based on learnings
src/lfx/src/lfx/components/BurnCloud/burncloud.py (2)
121-132: Consider narrowing the exception type.While the bare
Exceptioncatch provides defensive error handling, it could mask unexpected errors during model fetching. Sinceget_models()already has specific exception handling, consider catching only expected exceptions here or adding more detailed logging.if field_name in {"api_key", "base_url", "model_name"} and field_value: try: model_options = self.get_models() - except Exception as exc: # pragma: no cover - defensive - self.log(f"Error while updating BurnCloud models: {exc}", "warning") + except (httpx.HTTPError, ValueError, KeyError, AttributeError) as exc: + self.log(f"Error while updating BurnCloud models: {exc}", "warning") model_options = DEFAULT_BURNCLOUD_MODELS.copy()
134-154: Consider simplifying the API key handling.Line 144 wraps
self.api_keyinSecretStrand immediately unwraps it with.get_secret_value(). Sinceapi_keyfromSecretStrInputis already a string, you can pass it directly toChatOpenAI.kwargs = { "model": self.model_name, - "openai_api_key": SecretStr(self.api_key).get_secret_value(), + "openai_api_key": self.api_key, "openai_api_base": self._build_api_base(),However, if the wrapping is intentional for security logging purposes (e.g., preventing accidental key exposure in stack traces), the current approach is acceptable.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
src/frontend/src/icons/BurnCloud/BurnCloudIcon.svgis excluded by!**/*.svg
📒 Files selected for processing (26)
docs/docs/Components/bundles-burncloud.mdx(1 hunks)docs/sidebars.js(1 hunks)src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json(1 hunks)src/backend/base/langflow/initial_setup/starter_projects/Invoice Summarizer.json(1 hunks)src/backend/base/langflow/initial_setup/starter_projects/Market Research.json(1 hunks)src/backend/base/langflow/initial_setup/starter_projects/News Aggregator.json(1 hunks)src/backend/base/langflow/initial_setup/starter_projects/Nvidia Remix.json(1 hunks)src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json(4 hunks)src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json(1 hunks)src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json(1 hunks)src/backend/base/langflow/initial_setup/starter_projects/SaaS Pricing.json(1 hunks)src/backend/base/langflow/initial_setup/starter_projects/Search agent.json(1 hunks)src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json(3 hunks)src/backend/base/langflow/initial_setup/starter_projects/Simple Agent.json(1 hunks)src/backend/base/langflow/initial_setup/starter_projects/Social Media Agent.json(1 hunks)src/backend/base/langflow/initial_setup/starter_projects/Travel Planning Agents.json(3 hunks)src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json(1 hunks)src/frontend/src/icons/BurnCloud/BurnCloudIcon.jsx(1 hunks)src/frontend/src/icons/BurnCloud/index.tsx(1 hunks)src/frontend/src/icons/eagerIconImports.ts(2 hunks)src/frontend/src/icons/lazyIconImports.ts(1 hunks)src/frontend/src/utils/styleUtils.ts(1 hunks)src/lfx/src/lfx/base/models/model_input_constants.py(2 hunks)src/lfx/src/lfx/components/BurnCloud/__init__.py(1 hunks)src/lfx/src/lfx/components/BurnCloud/burncloud.py(1 hunks)src/lfx/src/lfx/components/__init__.py(3 hunks)
🧰 Additional context used
📓 Path-based instructions (9)
docs/**/*.{md,mdx}
📄 CodeRabbit inference engine (.cursor/rules/docs_development.mdc)
docs/**/*.{md,mdx}: All Markdown/MDX pages must start with front matter including at least title and description; include sidebar_position for docs pages when applicable
Code blocks must specify a language and may include a title (```lang title="…")
Use sentence case for headings and keep paragraphs short and scannable
Write in second person, present tense, with a professional but approachable tone
Use inline code with backticks for code terms; use bold for UI elements and italics for emphasis; keep lists in parallel structure
Ensure internal links are functional and navigation works (update cross-references as needed)
Verify all code examples in docs and blog actually run as shown
Use correct terminology capitalization: Langflow, Component, Flow, API, JSON
Reference images with absolute paths under /img/... and provide descriptive alt text
Files:
docs/docs/Components/bundles-burncloud.mdx
docs/docs/**/*.{md,mdx}
📄 CodeRabbit inference engine (.cursor/rules/docs_development.mdc)
Use Docusaurus admonitions (:::+tip|warning|danger) instead of custom callouts in docs pages
Files:
docs/docs/Components/bundles-burncloud.mdx
src/frontend/src/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/frontend_development.mdc)
src/frontend/src/**/*.{ts,tsx,js,jsx}: All frontend TypeScript and JavaScript code should be located under src/frontend/src/ and organized into components, pages, icons, stores, types, utils, hooks, services, and assets directories as per the specified directory layout.
Use React 18 with TypeScript for all UI components in the frontend.
Format all TypeScript and JavaScript code using the make format_frontend command.
Lint all TypeScript and JavaScript code using the make lint command.
Files:
src/frontend/src/icons/lazyIconImports.tssrc/frontend/src/icons/BurnCloud/index.tsxsrc/frontend/src/icons/BurnCloud/BurnCloudIcon.jsxsrc/frontend/src/icons/eagerIconImports.tssrc/frontend/src/utils/styleUtils.ts
src/frontend/src/icons/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/frontend_development.mdc)
Use Lucide React for icons in the frontend.
Files:
src/frontend/src/icons/lazyIconImports.tssrc/frontend/src/icons/BurnCloud/index.tsxsrc/frontend/src/icons/BurnCloud/BurnCloudIcon.jsxsrc/frontend/src/icons/eagerIconImports.ts
src/frontend/src/icons/lazyIconImports.ts
📄 CodeRabbit inference engine (.cursor/rules/icons.mdc)
Add your icon to the
lazyIconsMappingobject insrc/frontend/src/icons/lazyIconImports.tswith a key that matches the backend icon string exactly.
Files:
src/frontend/src/icons/lazyIconImports.ts
src/frontend/src/icons/*/*.@(js|jsx|ts|tsx)
📄 CodeRabbit inference engine (.cursor/rules/icons.mdc)
Create a new directory for your icon in
src/frontend/src/icons/YourIconName/and add your SVG as a React component (e.g.,YourIconName.jsx). The SVG component must use theisDarkprop to support both light and dark mode.
Files:
src/frontend/src/icons/BurnCloud/index.tsxsrc/frontend/src/icons/BurnCloud/BurnCloudIcon.jsx
src/frontend/src/icons/*/index.tsx
📄 CodeRabbit inference engine (.cursor/rules/icons.mdc)
Create an
index.tsxin your icon directory that exports your icon usingforwardRefand passes theisDarkprop.
Files:
src/frontend/src/icons/BurnCloud/index.tsx
docs/sidebars.js
📄 CodeRabbit inference engine (.cursor/rules/docs_development.mdc)
Keep sidebars.js updated to include new/changed docs sections and items using Docusaurus category structure
Files:
docs/sidebars.js
src/frontend/src/utils/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/frontend_development.mdc)
All utility functions should be placed in the utils directory.
Files:
src/frontend/src/utils/styleUtils.ts
🧠 Learnings (17)
📚 Learning: 2025-09-07T05:44:46.715Z
Learnt from: TensorNull
Repo: langflow-ai/langflow PR: 9735
File: docs/docs/Components/bundles-cometapi.mdx:9-9
Timestamp: 2025-09-07T05:44:46.715Z
Learning: In Langflow bundle documentation files (docs/docs/Components/bundles-*.mdx), the standard link pattern for referencing the main Bundles page is [Bundles](/components-bundle-components), not /components-bundles. This pattern is used consistently across all 37+ bundle documentation files.
Applied to files:
docs/docs/Components/bundles-burncloud.mdx
📚 Learning: 2025-09-30T00:09:51.631Z
Learnt from: CR
Repo: langflow-ai/langflow PR: 0
File: .cursor/rules/docs_development.mdc:0-0
Timestamp: 2025-09-30T00:09:51.631Z
Learning: Applies to docs/**/*.{md,mdx} : Use correct terminology capitalization: Langflow, Component, Flow, API, JSON
Applied to files:
docs/docs/Components/bundles-burncloud.mdx
📚 Learning: 2025-07-28T15:56:47.865Z
Learnt from: CR
Repo: langflow-ai/langflow PR: 0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-07-28T15:56:47.865Z
Learning: Applies to src/frontend/src/icons/lazyIconImports.ts : Add your icon to the `lazyIconsMapping` object in `src/frontend/src/icons/lazyIconImports.ts` with a key that matches the backend icon string exactly.
Applied to files:
src/frontend/src/icons/lazyIconImports.tssrc/frontend/src/icons/BurnCloud/index.tsxsrc/frontend/src/icons/eagerIconImports.ts
📚 Learning: 2025-07-18T18:27:12.609Z
Learnt from: CR
Repo: langflow-ai/langflow PR: 0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-07-18T18:27:12.609Z
Learning: Applies to src/frontend/src/icons/**/*.{ts,tsx,js,jsx} : Use Lucide React for icons in the frontend.
Applied to files:
src/frontend/src/icons/lazyIconImports.tssrc/frontend/src/icons/BurnCloud/index.tsxsrc/frontend/src/icons/BurnCloud/BurnCloudIcon.jsxsrc/frontend/src/icons/eagerIconImports.ts
📚 Learning: 2025-07-28T15:56:47.865Z
Learnt from: CR
Repo: langflow-ai/langflow PR: 0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-07-28T15:56:47.865Z
Learning: Applies to src/frontend/src/icons/*/index.tsx : Create an `index.tsx` in your icon directory that exports your icon using `forwardRef` and passes the `isDark` prop.
Applied to files:
src/frontend/src/icons/lazyIconImports.tssrc/frontend/src/icons/BurnCloud/index.tsxsrc/frontend/src/icons/BurnCloud/BurnCloudIcon.jsxsrc/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: The frontend icon mapping key (in 'lazyIconsMapping') must match the backend 'icon' attribute string exactly, including case sensitivity, to ensure correct icon rendering.
Applied to files:
src/frontend/src/icons/lazyIconImports.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/BurnCloud/index.tsxsrc/frontend/src/icons/BurnCloud/BurnCloudIcon.jsx
📚 Learning: 2025-07-28T15:56:47.865Z
Learnt from: CR
Repo: langflow-ai/langflow PR: 0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-07-28T15:56:47.865Z
Learning: Applies to src/frontend/src/icons/*/*.@(js|jsx|ts|tsx) : Create a new directory for your icon in `src/frontend/src/icons/YourIconName/` and add your SVG as a React component (e.g., `YourIconName.jsx`). The SVG component must use the `isDark` prop to support both light and dark mode.
Applied to files:
src/frontend/src/icons/BurnCloud/index.tsxsrc/frontend/src/icons/BurnCloud/BurnCloudIcon.jsxsrc/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/BurnCloud/index.tsxsrc/frontend/src/icons/BurnCloud/BurnCloudIcon.jsx
📚 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/BurnCloud/index.tsxsrc/frontend/src/icons/BurnCloud/BurnCloudIcon.jsxsrc/frontend/src/icons/eagerIconImports.ts
📚 Learning: 2025-07-18T18:27:12.609Z
Learnt from: CR
Repo: langflow-ai/langflow PR: 0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-07-18T18:27:12.609Z
Learning: Applies to src/frontend/src/**/*.{ts,tsx,js,jsx} : Use React 18 with TypeScript for all UI components in the frontend.
Applied to files:
src/frontend/src/icons/BurnCloud/index.tsx
📚 Learning: 2025-07-18T18:27:12.609Z
Learnt from: CR
Repo: langflow-ai/langflow PR: 0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-07-18T18:27:12.609Z
Learning: Applies to src/frontend/src/components/**/@(FlowGraph|nodes)/**/*.{ts,tsx,js,jsx} : Use React Flow for flow graph visualization components.
Applied to files:
src/frontend/src/icons/BurnCloud/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: 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/BurnCloud/index.tsxsrc/frontend/src/icons/BurnCloud/BurnCloudIcon.jsx
📚 Learning: 2025-09-30T00:09:51.631Z
Learnt from: CR
Repo: langflow-ai/langflow PR: 0
File: .cursor/rules/docs_development.mdc:0-0
Timestamp: 2025-09-30T00:09:51.631Z
Learning: Applies to docs/sidebars.js : Keep sidebars.js updated to include new/changed docs sections and items using Docusaurus category structure
Applied to files:
docs/sidebars.js
📚 Learning: 2025-07-28T15:56:47.865Z
Learnt from: CR
Repo: langflow-ai/langflow PR: 0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-07-28T15:56:47.865Z
Learning: Always use clear, recognizable, and consistent icon names for both backend and frontend (e.g., "AstraDB", "Postgres", "OpenAI").
Applied to files:
src/frontend/src/utils/styleUtils.ts
📚 Learning: 2025-07-18T18:25:54.486Z
Learnt from: CR
Repo: langflow-ai/langflow PR: 0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-07-18T18:25:54.486Z
Learning: Starter project files auto-format after langflow run; these formatting changes can be committed or ignored
Applied to files:
src/backend/base/langflow/initial_setup/starter_projects/Invoice Summarizer.jsonsrc/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.jsonsrc/backend/base/langflow/initial_setup/starter_projects/Nvidia Remix.json
📚 Learning: 2025-07-18T18:25:54.486Z
Learnt from: CR
Repo: langflow-ai/langflow PR: 0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-07-18T18:25:54.486Z
Learning: Applies to src/backend/base/langflow/components/**/__init__.py : Update __init__.py with alphabetical imports when adding new components
Applied to files:
src/lfx/src/lfx/components/BurnCloud/__init__.py
🧬 Code graph analysis (5)
src/frontend/src/icons/BurnCloud/index.tsx (1)
src/frontend/src/icons/BurnCloud/BurnCloudIcon.jsx (1)
BurnCloudIconSVG(1-26)
src/frontend/src/icons/eagerIconImports.ts (1)
src/frontend/src/icons/BurnCloud/index.tsx (1)
BurnCloudIcon(5-7)
src/lfx/src/lfx/components/BurnCloud/burncloud.py (3)
src/lfx/src/lfx/base/models/model.py (1)
LCModelComponent(25-375)src/lfx/src/lfx/inputs/inputs.py (4)
IntInput(344-376)MessageTextInput(206-257)SecretStrInput(286-341)SliderInput(642-643)src/lfx/src/lfx/custom/custom_component/component.py (2)
get_base_inputs(167-170)log(1480-1497)
src/lfx/src/lfx/base/models/model_input_constants.py (1)
src/lfx/src/lfx/components/BurnCloud/burncloud.py (1)
BurnCloudModel(34-154)
src/lfx/src/lfx/components/BurnCloud/__init__.py (1)
src/lfx/src/lfx/components/BurnCloud/burncloud.py (1)
BurnCloudModel(34-154)
🪛 GitHub Actions: Ruff Style Check
src/lfx/src/lfx/components/BurnCloud/burncloud.py
[error] 8-8: Ruff check failed: TC001 Move application import lfx.field_typing.LanguageModel into a type-checking block. Command 'uv run --only-dev ruff check --output-format=github .' exited with code 1.
🪛 GitHub Check: Ruff Style Check (3.13)
src/lfx/src/lfx/components/BurnCloud/burncloud.py
[failure] 125-125: Ruff (BLE001)
src/lfx/src/lfx/components/BurnCloud/burncloud.py:125:20: BLE001 Do not catch blind exception: Exception
[failure] 8-8: Ruff (TC001)
src/lfx/src/lfx/components/BurnCloud/burncloud.py:8:30: TC001 Move application import lfx.field_typing.LanguageModel into a type-checking block
⏰ 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). (50)
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 40/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 25/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 24/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 33/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 38/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 39/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 36/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 35/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 37/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 29/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 32/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 27/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 26/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 28/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 34/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 31/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 23/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 21/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 20/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 22/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 30/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 19/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 18/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 15/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 17/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 14/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 16/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 7/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 11/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 12/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 13/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 10/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 9/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 8/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 5/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 6/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 2/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 3/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 4/40
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 1/40
- GitHub Check: Test Docker Images / Test docker images
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 5
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 4
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 1
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 3
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 2
- GitHub Check: Run Backend Tests / Integration Tests - Python 3.10
- GitHub Check: Test Starter Templates
- GitHub Check: Optimize new Python code in this PR
- GitHub Check: test-starter-projects
🔇 Additional comments (23)
src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json (2)
768-768: Verify APIRequest component hash and follow_redirects description simplification.The APIRequest component has been updated with a new code_hash (line 768). While the code implementation (line 885) appears complete, the follow_redirects field description (line 918) has been changed from what was apparently a detailed SSRF security warning to a simple "Whether to follow http redirects." This simplification may obscure important security considerations for users. Verify that the security guidance hasn't been lost elsewhere or that this change is intentional and appropriate for this starter project context.
Could you confirm:
- That the code_hash "80a56d261133" is accurate and matches the backend APIRequest component?
- Whether the SSRF warning removal from follow_redirects is intentional, and if security guidance for this field exists elsewhere in the UI?
Also applies to: 885-885, 918-918
1349-1349: BurnCloud successfully added to agent_llm options.Line 1349 adds BurnCloud to the agent model provider list. This aligns with the PR objective of integrating BurnCloud as a first-class provider. Ensure that BurnCloud is properly registered in
MODEL_PROVIDERS_DICTand related backend wiring (as mentioned in the PR summary) so the option renders correctly in the UI with appropriate icon and field configuration.src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json (1)
867-885: Add BurnCloud tooptions_metadatafor icon support.Line 869 adds BurnCloud to the
agent_llmdropdown options, but the correspondingoptions_metadataarray (lines 875–885) only contains 3 icon entries while there are 6 provider options. According to the PR objectives, BurnCloud should have icon support exposed. The current mismatch may prevent proper icon rendering."options": [ "Anthropic", "BurnCloud", "Google Generative AI", "OpenAI", "IBM watsonx.ai", "Ollama" ], "options_metadata": [ { "icon": "Anthropic" }, + { + "icon": "BurnCloud" + }, { "icon": "GoogleGenerativeAI" }, { "icon": "OpenAI" } ]Verify that BurnCloud icon metadata is included in the frontend icon asset exports and confirm the correct icon key to use in
options_metadata.src/backend/base/langflow/initial_setup/starter_projects/SaaS Pricing.json (1)
976-993: Verify BurnCloud icon metadata is configured.BurnCloud is added to the
optionsarray (line 978), but the correspondingoptions_metadataarray (lines 984–993) is not updated to include BurnCloud's icon. The PR summary mentions icon assets for BurnCloud, so verify whether metadata here needs to be populated for proper frontend rendering.Note: IBM watsonx.ai and Ollama also lack metadata entries, so this may be intentional. If metadata is handled elsewhere (e.g., in frontend components or a registry), this is acceptable.
src/backend/base/langflow/initial_setup/starter_projects/Search agent.json (2)
1053-1060: BurnCloud provider option added correctly to agent_llm dropdown.Line 1055 adds "BurnCloud" to the model provider options. The naming and placement are consistent with other providers in the list.
1061-1071: Verify options_metadata alignment with provider options.The
options_metadataarray contains 3 entries (for Anthropic, GoogleGenerativeAI, OpenAI) but theoptionsarray now has 6 providers (including BurnCloud, Google Generative AI, IBM watsonx.ai). If the frontend maps icon metadata by array index, entries 4–6 will lack corresponding icon definitions. The AI summary indicates icons are being wired in other PR files, but please confirm this metadata gap is intentional and won't cause rendering issues on the frontend.src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json (1)
1694-1743: Metadata mismatch in Price Deal Finder.json: options_metadata incomplete for BurnCloud provider.The backend wiring is correctly configured. BurnCloud is properly registered in
MODEL_PROVIDERS_LIST,MODEL_PROVIDERS_DICT, and mapped to theBurnCloudModelcomponent class with full initialization parameters. However, the Price Deal Finder.json file has a data consistency issue:
- Lines 1714-1720 (options array): Includes 5 providers: Anthropic, BurnCloud, Google Generative AI, OpenAI, IBM watsonx.ai
- Lines 1725-1732 (options_metadata): Only provides metadata for 3 providers (Anthropic, GoogleGenerativeAI, OpenAI)
The missing BurnCloud icon entry in
options_metadatawill prevent the frontend from rendering the correct icon for the BurnCloud option in the dropdown. Add a metadata entry with icon "BurnCloud" to align with the provider in the options array.src/backend/base/langflow/initial_setup/starter_projects/Social Media Agent.json (1)
1396-1425: Verify BurnCloud icon metadata is included in options_metadata.The provider option "BurnCloud" is added to the
agent_llmoptions array (line 1398), but the correspondingoptions_metadataarray (lines 1404-1414) only includes icon mappings for Anthropic, GoogleGenerativeAI, and OpenAI.Ensure that BurnCloud icon metadata is also included in this array for consistent UI rendering. Check if this array is complete in the full file or if a matching icon entry needs to be added.
src/backend/base/langflow/initial_setup/starter_projects/Invoice Summarizer.json (1)
1260-1291: Verify BurnCloud icon metadata is included in options_metadata.The provider option "BurnCloud" is added to the
agent_llmoptions array (line 1264), but the correspondingoptions_metadataarray (lines 1270-1280) only includes icon mappings for Anthropic, GoogleGenerativeAI, and OpenAI.Ensure that BurnCloud icon metadata is also included in this array for consistent UI rendering across all affected starter projects. This appears to be a pattern across multiple starter project templates (e.g., Social Media Agent.json shows the same issue).
src/backend/base/langflow/initial_setup/starter_projects/News Aggregator.json (1)
1287-1293: LGTM! BurnCloud provider successfully added.The addition of "BurnCloud" to the agent_llm options list is correct and consistent with the integration of BurnCloud as a new provider across the codebase.
src/lfx/src/lfx/components/__init__.py (1)
23-23: LGTM! BurnCloud module properly registered for lazy loading.The BurnCloud module is correctly wired into the lazy loading infrastructure with consistent entries in all three required locations:
- TYPE_CHECKING imports block
- _dynamic_imports mapping
- all exports list
All entries maintain alphabetical ordering and follow the established pattern for module registration.
Also applies to: 125-125, 257-257
src/frontend/src/icons/eagerIconImports.ts (1)
17-17: Icon wiring looks correct; confirm key parity with backend.Import and mapping for BurnCloud follow existing patterns. Please confirm the backend icon string is exactly "BurnCloud" to ensure resolution across eager/lazy paths.
Also applies to: 137-139
docs/sidebars.js (1)
300-304: Sidebar entry added correctly.Placement and id format match existing Bundles items.
src/frontend/src/icons/lazyIconImports.ts (1)
97-101: Lazy import mapping LGTM; ensure key matches backend exactly.The dynamic import targets "@/icons/BurnCloud" and exports BurnCloudIcon. Confirm backend icon string is "BurnCloud" to avoid mismatches.
src/frontend/src/icons/BurnCloud/index.tsx (1)
5-7: Wrapper matches house pattern; no issues.Ref forwarding and prop passthrough are consistent with other icons.
docs/docs/Components/bundles-burncloud.mdx (1)
29-43: Verify params and defaults reflect the component’s actual behavior.Please confirm:
- Default model_name is indeed "gpt-4o" in the BurnCloud component.
- The component appends “/v1” automatically when needed.
- The “Language Model” output is a ChatOpenAI instance configured for BurnCloud endpoints.
Update the table/text if any differ to prevent doc drift.
src/lfx/src/lfx/base/models/model_input_constants.py (2)
220-233: LGTM! BurnCloud provider registration follows established patterns.The registration structure is consistent with other providers in the file, properly wrapping the import in a try-except block and initializing all required fields.
391-398: LGTM! BurnCloud appropriately positioned in provider list.The placement of BurnCloud early in the list (position 2) is appropriate for a newly integrated first-class provider.
src/lfx/src/lfx/components/BurnCloud/__init__.py (1)
1-32: LGTM! Lazy import implementation follows best practices.The dynamic import mechanism is properly implemented with appropriate error handling, caching via
globals(), and support for introspection through__dir__().src/lfx/src/lfx/components/BurnCloud/burncloud.py (4)
34-89: LGTM! Component inputs are well-structured.The input configuration properly supports dynamic model fetching with appropriate refresh options and follows established patterns for LLM components.
91-101: LGTM! Helper methods correctly construct API requirements.The URL normalization and header construction properly prepare requests for an OpenAI-compatible API gateway.
103-119: LGTM! Model fetching properly handles errors with sensible fallbacks.The method correctly returns default models when the API key is missing or when the API request fails, ensuring a good user experience.
13-30: No action required—all model names are valid.The models flagged in the original review (
"o3","o4-mini","llama-4-maverick","grok-4") have been verified as real, legitimate LLMs:
- o3 and o4-mini are OpenAI models (o4-mini announced April 16, 2025)
- llama-4-maverick is Meta's multimodal Llama 4 model released on partner platforms
- grok-4 is part of X's Grok model family
BurnCloud exposes a large, evolving catalog of 100+ / 200+ models including these third-party offerings, so the default list contains legitimate model names rather than placeholders.
| from pydantic.v1 import SecretStr | ||
|
|
||
| from lfx.base.models.model import LCModelComponent | ||
| from lfx.field_typing import LanguageModel |
There was a problem hiding this comment.
Fix the import to resolve pipeline failure.
The LanguageModel import should be moved into a TYPE_CHECKING block to avoid circular dependencies and comply with the project's import conventions.
Apply this diff:
+from typing import TYPE_CHECKING
+
import httpx
from langchain_openai import ChatOpenAI
from pydantic.v1 import SecretStr
-from lfx.base.models.model import LCModelComponent
-from lfx.field_typing import LanguageModel
+if TYPE_CHECKING:
+ from lfx.field_typing import LanguageModel
+
+from lfx.base.models.model import LCModelComponent
from lfx.field_typing.range_spec import RangeSpec📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| from lfx.field_typing import LanguageModel | |
| from typing import TYPE_CHECKING | |
| import httpx | |
| from langchain_openai import ChatOpenAI | |
| from pydantic.v1 import SecretStr | |
| if TYPE_CHECKING: | |
| from lfx.field_typing import LanguageModel | |
| from lfx.base.models.model import LCModelComponent | |
| from lfx.field_typing.range_spec import RangeSpec |
🧰 Tools
🪛 GitHub Actions: Ruff Style Check
[error] 8-8: Ruff check failed: TC001 Move application import lfx.field_typing.LanguageModel into a type-checking block. Command 'uv run --only-dev ruff check --output-format=github .' exited with code 1.
🪛 GitHub Check: Ruff Style Check (3.13)
[failure] 8-8: Ruff (TC001)
src/lfx/src/lfx/components/BurnCloud/burncloud.py:8:30: TC001 Move application import lfx.field_typing.LanguageModel into a type-checking block
🤖 Prompt for AI Agents
In src/lfx/src/lfx/components/BurnCloud/burncloud.py around line 8, the direct
import "from lfx.field_typing import LanguageModel" causes circular
import/pipeline failure; move this import into a typing-only conditional by
adding "from typing import TYPE_CHECKING" at the top and wrapping "from
lfx.field_typing import LanguageModel" inside "if TYPE_CHECKING: ...", so the
symbol is available for type checkers but not imported at runtime.
Introduces BurnCloud as a first-class provider by wiring its component metadata, backend model component, and base-model constants into LFX. Adds documentation (
docs/docs/Components/ bundles-burncloud.mdx) plus sidebar entry, registers the provider insidesrc/lfx/src/lfx/components/BurnCloud/, and exposes its icon set and eager/lazy imports for the frontend. Starter project templatesnow include BurnCloud-compatible options, and shared styling utilities understand the new iconography, ensuring the BurnCloud card renders consistently across the app.
Summary by CodeRabbit
New Features
Documentation