-
Notifications
You must be signed in to change notification settings - Fork 8.2k
fix: set mcp_composer feature as true by default #9522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
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 WalkthroughBackend and frontend defaults for the MCP Composer feature flag were flipped from disabled to enabled. The backend FeatureFlags.mcp_composer default is now True, and the frontend Vite config now defaults process.env.LANGFLOW_FEATURE_MCP_COMPOSER to "true" when unset. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
There was a problem hiding this 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
🧹 Nitpick comments (3)
src/frontend/vite.config.mts (2)
56-58: Document the new default and override instructions.Please update any environment/feature flag docs (README, .env.example, deployment guides) to reflect that the default is enabled and how to disable it (LANGFLOW_FEATURE_MCP_COMPOSER=false).
I can raise a docs PR or add a snippet if you point me to the docs location.
56-58: Optional: Standardize the MCP Composer flag to BooleanWe found a single usage of this flag in
• src/frontend/src/customization/feature-flags.ts (line 21), where it’s compared as a string:export const ENABLE_MCP_COMPOSER = process.env.LANGFLOW_FEATURE_MCP_COMPOSER === "true";If you’d like to normalize to a boolean (to match the other flags), you can:
- In src/frontend/vite.config.mts (lines 56–58), change the default from a string to a boolean:
"process.env.LANGFLOW_FEATURE_MCP_COMPOSER": JSON.stringify(envLangflow.LANGFLOW_FEATURE_MCP_COMPOSER ?? "true",),
"process.env.LANGFLOW_FEATURE_MCP_COMPOSER": JSON.stringify(envLangflow.LANGFLOW_FEATURE_MCP_COMPOSER ?? true,),
- In src/frontend/src/customization/feature-flags.ts, update the runtime check to compare against a boolean:
- process.env.LANGFLOW_FEATURE_MCP_COMPOSER === "true"
- process.env.LANGFLOW_FEATURE_MCP_COMPOSER === true
This change is optional—if you prefer to keep the string-based check, no further action is needed. </blockquote></details> <details> <summary>src/backend/base/langflow/services/settings/feature_flags.py (1)</summary><blockquote> `4-12`: **Optional: align with pydantic-settings v2 style (only if the repo is already on v2).** If you’re on pydantic v2/pydantic-settings v2, the recommended config is via SettingsConfigDict instead of an inner Config class. Not required for this PR; consider a separate cleanup. ```python from pydantic_settings import BaseSettings, SettingsConfigDict class FeatureFlags(BaseSettings): mvp_components: bool = False mcp_composer: bool = True model_config = SettingsConfigDict(env_prefix="LANGFLOW_FEATURE_")
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
src/backend/base/langflow/services/settings/feature_flags.py(1 hunks)src/frontend/vite.config.mts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
{src/backend/**/*.py,tests/**/*.py,Makefile}
📄 CodeRabbit inference engine (.cursor/rules/backend_development.mdc)
{src/backend/**/*.py,tests/**/*.py,Makefile}: Run make format_backend to format Python code before linting or committing changes
Run make lint to perform linting checks on backend Python code
Files:
src/backend/base/langflow/services/settings/feature_flags.py
src/frontend/vite.config.*
📄 CodeRabbit inference engine (.cursor/rules/frontend_development.mdc)
Use Vite as the build tool and dev server for the frontend.
Files:
src/frontend/vite.config.mts
src/frontend/@(package*.json|tsconfig.json|tailwind.config.*|vite.config.*)
📄 CodeRabbit inference engine (.cursor/rules/frontend_development.mdc)
Frontend configuration files such as package.json, tsconfig.json, and Tailwind/Vite configs must be maintained and updated as needed.
Files:
src/frontend/vite.config.mts
⏰ 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). (3)
- GitHub Check: Run Ruff Check and Format
- GitHub Check: Update Starter Projects
- GitHub Check: Ruff Style Check (3.13)
🔇 Additional comments (3)
src/frontend/vite.config.mts (1)
56-58: Default flip to enabled is correct and matches PR intent.The fallback now enables MCP Composer when LANGFLOW_FEATURE_MCP_COMPOSER is unset. This aligns with the backend change and the PR objective.
src/backend/base/langflow/services/settings/feature_flags.py (2)
6-6: Backend default enabled — LGTM and consistent with the frontend.Flipping mcp_composer to True at the settings layer aligns the system-wide default with the PR objective. Pydantic will still honor LANGFLOW_FEATURE_MCP_COMPOSER env overrides.
4-12: Feature flag usage and env var prefix verified
All backend references tomcp_composerandmvp_componentsuseFEATURE_FLAGS(no rawos.getenv("LANGFLOW_FEATURE_MCP_COMPOSER")or similar), and theenv_prefix = "LANGFLOW_FEATURE_"is correctly applied.
|
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (3.80%) is below the target coverage (10.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #9522 +/- ##
==========================================
+ Coverage 33.80% 33.84% +0.03%
==========================================
Files 1196 1196
Lines 56386 56475 +89
Branches 5335 5335
==========================================
+ Hits 19063 19112 +49
- Misses 37253 37293 +40
Partials 70 70
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|



This pull request updates the default value of the
mcp_composerfeature flag to be enabled by default in both the backend and frontend configurations. This change ensures that the MCP Composer feature is active unless explicitly disabled.Feature flag default changes:
src/backend/base/langflow/services/settings/feature_flags.py: Changed the default value ofmcp_composertoTruein theFeatureFlagssettings class.src/frontend/vite.config.mts: Updated the frontend environment configuration to defaultLANGFLOW_FEATURE_MCP_COMPOSERto"true"instead of"false".Summary by CodeRabbit