feat: integrate helicone as a bundle and as an agent provider
Summary by CodeRabbit
-
New Features
- Added Helicone as a selectable model provider with UI for API key, model selection, temperature, and max tokens.
- New Helicone icon and sidebar entry; Helicone is now available in model/provider lists and component pickers.
- On-demand Helicone component enables discovery of available Helicone-backed models.
-
Documentation
- Added a Helicone bundle docs page with configuration details, parameter table, and reference links.
[!IMPORTANT]
Review skipped
Auto incremental reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.
[!NOTE]
Other AI code review bot(s) detected
CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.
Walkthrough
Adds Helicone bundle: documentation and sidebar entry, frontend SVG icon and lazy import, dropdown search memoization, backend provider registration and model metadata, a new HeliconeComponent with model discovery and LangChain ChatOpenAI build logic, and lazy-loading component exports.
Changes
| Cohort / File(s) | Summary |
|---|---|
Documentation docs/docs/Components/bundles-helicone.mdx, docs/sidebars.js |
New Helicone docs page with frontmatter, parameters table (api_key, model_name, temperature, max_tokens); sidebar updated to include Components → Bundles → bundles-helicone. |
Frontend Icons & Lazy Loading src/frontend/src/icons/Helicone/HeliconeIcon.jsx, src/frontend/src/icons/Helicone/index.tsx, src/frontend/src/icons/lazyIconImports.ts |
Add SvgHelicone SVG component, a forwardRef HeliconeIcon wrapper, and a lazy-icons mapping entry for on-demand import. |
Frontend Search Logic src/frontend/src/components/core/dropdownComponent/index.tsx |
Memoize Fuse options as { value } items, construct Fuse over value with threshold 0.3, and map Fuse results to search.item.value; comments added. |
Frontend Styling src/frontend/src/utils/styleUtils.ts |
Added Helicone entry to SIDEBAR_BUNDLES (display_name "Helicone", name "helicone", icon "Helicone"). |
Backend Model Provider Setup src/lfx/src/lfx/base/models/model_input_constants.py |
Added _get_helicone_inputs_and_fields() helper; registered Helicone in MODEL_PROVIDERS_DICT, MODEL_PROVIDERS_LIST, ACTIVE_MODEL_PROVIDERS_DICT, and related metadata generation. |
Backend Component Registration src/lfx/src/lfx/components/__init__.py, src/lfx/src/lfx/components/helicone/__init__.py |
Expose helicone in TYPE_CHECKING, dynamic imports map, discovery list, and __all__; helicone package implements module-level __getattr__, __dir__, and __all__ = ["HeliconeComponent"] for lazy attribute import. |
Backend Component Implementation src/lfx/src/lfx/components/helicone/helicone.py |
New HeliconeComponent (extends LCModelComponent) with inputs (api_key, model_name, temperature, max_tokens), fetch_models(), update_build_config(), and build_model() that validates inputs and constructs a LangChain ChatOpenAI model via Helicone gateway; includes normalization and defensive parsing of registry responses. |
Sequence Diagram(s)
sequenceDiagram
participant User
participant Frontend
participant HeliconeComponent
participant HeliconeAPI
participant LangChain
User->>Frontend: select Helicone bundle
Frontend->>HeliconeComponent: request model options
HeliconeComponent->>HeliconeAPI: fetch_models()
HeliconeAPI-->>HeliconeComponent: registry response (varied shapes)
HeliconeComponent->>HeliconeComponent: normalize models, update_build_config()
HeliconeComponent-->>Frontend: return options + metadata
User->>Frontend: select model & provide params
Frontend->>HeliconeComponent: build_model()
HeliconeComponent->>HeliconeComponent: validate inputs
HeliconeComponent->>LangChain: instantiate ChatOpenAI via Helicone gateway
LangChain-->>HeliconeComponent: LanguageModel instance ready
HeliconeComponent-->>Frontend: model ready for use
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~25 minutes
Areas to focus review on:
src/lfx/src/lfx/components/helicone/helicone.py— normalization of heterogeneous registry responses, error handling, and correctness of LangChain model construction.src/frontend/src/components/core/dropdownComponent/index.tsx— verify Fuse item-shape change and typing.src/lfx/src/lfx/base/models/model_input_constants.py— integration into provider lists, defaults, and activation logic.- Lazy-import behavior and public API exposure:
src/lfx/src/lfx/components/__init__.pyandsrc/lfx/src/lfx/components/helicone/__init__.py.
Possibly related PRs
- langflow-ai/langflow#8824 — overlaps editing of
SIDEBAR_BUNDLESinsrc/frontend/src/utils/styleUtils.ts(potential merge overlap).
Suggested labels
enhancement, size:M
Suggested reviewers
- erichare
- mendonk
- edwinjosechittilappilly
Pre-merge checks and finishing touches
[!IMPORTANT]
Pre-merge checks failed
Please resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error, 2 warnings, 1 inconclusive)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Test Coverage For New Implementations | ❌ Error | PR adds HeliconeComponent, Helicone icon, dropdown changes, and model integration without corresponding test files. | Add test_helicone.py for HeliconeComponent methods and tests for _get_helicone_inputs_and_fields() function, plus frontend component tests. |
| Test Quality And Coverage | ⚠️ Warning | Helicone component has no test files despite implementing critical API-calling methods with complex business logic for model discovery and configuration. | Add unit tests for fetch_models(), update_build_config(), and build_model() methods with mocked Helicone API responses, error handling scenarios, and integration tests with the model provider system. |
| Test File Naming And Structure | ⚠️ Warning | PR introduces 11 new files with backend and frontend components but adds zero test files for critical functionality like API calls and model discovery. | Create test_helicone.py with pytest tests for fetch_models(), update_build_config(), build_model() methods and *.test.tsx for HeliconeIcon component covering positive/negative scenarios and error conditions. |
| Excessive Mock Usage Warning | ❓ Inconclusive | PR adds production code for HeliconeComponent with API integration but includes no test files to assess mock usage. | Add test files covering HeliconeComponent functionality. Mock only external API calls and HTTP requests; verify configuration management with real objects. |
✅ Passed checks (2 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title accurately summarizes the main change: integrating Helicone as both a bundle and agent provider, which is reflected across documentation, icons, and backend components. |
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 @coderabbitai help to get the list of available commands and usage tips.
@coderabbitai help
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.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. - PR comments: Tag
@coderabbitaiin 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
CodeRabbit commands
These commands are invoked using PR/Issue comments.
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai evaluate custom pre-merge check --instructions <custom-checks-instructions> --name <custom-checks-title> [--mode <error|warning>]to validate the custom pre-merge checks instructions. Defaults toerrorwhen--modeis omitted.@coderabbitai ignore pre-merge checksto override pre-merge checks and get an approval on PR.@coderabbitai run pre-merge checksto run pre-merge checks on the pull request.
@coderabbitai generate docstringsto generate docstrings for this PR.@coderabbitai generate sequence diagramto generate a sequence diagram of the changes in this PR.@coderabbitai generate unit teststo generate unit tests for this PR.@coderabbitai resolveto resolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreor@coderabbit ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
Status, support, documentation and community
- Visit our status page to check the current availability of CodeRabbit.
- Create a ticket on our support page for assistance with any issues or questions.
- Visit our documentation site for detailed information on how to use CodeRabbit.
- Join our Discord community to connect with other users and get help from the community.
- Follow us on X/Twitter for updates and announcements.
@coderabbitai review
✅ Actions performed
Review triggered.
Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
@H2Shami can you resovle the conflicts?
Please also do resolve the merge conflicts with model_input_constants.py - the component index one can be resolved by taking either the main or your branch's version and then running make build_component_index