feat(bundles): consolidate long-tail providers into lfx-bundles (45 providers)#13568
Draft
erichare wants to merge 4 commits into
Draft
feat(bundles): consolidate long-tail providers into lfx-bundles (45 providers)#13568erichare wants to merge 4 commits into
erichare wants to merge 4 commits into
Conversation
Adds scripts/migrate/consolidate_bundles.py (the inverse of port_bundle.py -- moves in-tree providers into the manifest-less lfx-bundles metapackage) and runs it on a verified 5-provider tranche: tavily, exa, wikipedia, yahoosearch, wolframalpha. Per provider the script: - moves src/lfx/src/lfx/components/<p>/ -> lfx_bundles/<p>/ (lowercase names); - leaves a fail-soft import shim (first line `# lfx-bundles-shim`) so `from lfx.components.<p> import X` keeps working when lfx-bundles is installed, and raises an actionable ImportError otherwise; - merges the provider's third-party deps into a PEP 685-normalized lfx-bundles extra and regenerates the `all` aggregate. Dep parity holds: `uv sync` is a no-op because those deps were already pulled via langflow-base[complete]; - appends the 4-entry migration block per Component class (28 entries) so saved flows referencing lfx.components.<p>.<Class> migrate to ext:<p>:<Class>@official. To avoid double registration, the in-tree component walk (_load_components_dynamically) now skips shimmed provider dirs, and component_index.json is regenerated (355->348 components, 95->90 modules); the moved providers load only at @official via lfx.bundles discovery. Verified: discovery finds all 5 at @official with no errors; shims resolve; `import lfx.components` still works; the index drops the 7 moved component entries (residual `tools`-category name refs resolve via the shim); ruff clean. First tranche proves the engine; the remaining long-tail scales by extending PROVIDER_DEPS (each provider's deps verified individually -- the careful part).
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Extends PROVIDER_DEPS with 30 individually-verified providers and runs the consolidation: vector stores (chroma, clickhouse, couchbase, milvus, mongodb, pgvector, pinecone, qdrant, supabase, upstash, weaviate), model providers (groq, mistral, ollama, perplexity, sambanova), and tools/memory/data (apify, assemblyai, confluence, firecrawl, git, glean, icosacomputing, mem0, needle, scrapegraph, serpapi, unstructured, youtube, zep). Dep verification (the careful part): every spec comes from langflow-base's per-provider extras or its direct dependencies; langchain-community providers carry the wrapper plus the SDK the wrapper lazy-imports (e.g. pgvector, atlassian-python-api); requests is declared explicitly where imported (it is only transitive in today's env); pinecone keeps its python_version<'3.14' marker verbatim. Tranche excludes: providers with langflow imports (vlmrun), provider-specific lfx.base dirs (composio/huggingface/langwatch), case- sensitive names (FAISS/Notion), the openai-SDK family (azure/aiml/deepseek/ litellm/lmstudio/novita/openrouter/vllm/xai/cometapi -- cleaner after PR-8), and the partner set. Dep parity verified at the resolution level: the uv.lock diff is +220 lines of lfx-bundles extras metadata with ZERO packages added or removed (`name =` diff empty), so pip install langflow resolves the identical set. Also: 192 append-only migration entries (48 classes x 4, zero bare-name ambiguities); component_index.json regenerated 348->300 components / 90->60 modules (exactly the moved set, no stale standalone entries); mongodb_atlas.py SLF001 per-file-ignore and the mem0/mongodb detect-secrets baseline entries migrated to the new paths (lint/secrets exceptions travel with moved files); 35 bundles now discover at @official with 55 components; shims verified across categories; 449 extension tests pass.
5 tasks
10 providers that ride the langchain-openai wrapper, deferred from tranche 2 until the partner graduation settled the openai-SDK dep story: aiml, azure, cometapi, deepseek, litellm, lmstudio, novita, openrouter, vllm, xai. Dep verification: every provider declares langchain-openai>=1.1.6; the openai SDK is declared only where a component imports it directly (aiml, deepseek, litellm, lmstudio, vllm, xai -- wrapper-transitive elsewhere); requests declared where imported (cometapi, deepseek, novita, xai); lmstudio's lazy NVIDIAEmbeddings path gets langchain-nvidia-ai-endpoints~=1.0.0. The litellm component drives LiteLLM-served endpoints through the OpenAI client and does NOT import the litellm package -- langflow-base's litellm extra stays put. These providers use the lazy _dynamic_imports __init__ shape; it survives the move unchanged (import_mod resolves via __spec__.parent and lfx.components._importing remains a core helper). Dep parity: uv.lock diff has zero package additions/removals (all specs already resolved via langflow-base[complete]). Also: 56 append-only migration entries (14 classes x 4, zero ambiguities); component_index.json regenerated 300->286 components / 60->50 modules (exactly the moved set); detect-secrets baseline re-keyed; 45 bundles now discover at @official with 69 components; shims verified (azure/xai/litellm/deepseek); ruff clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bundle Separation Phase A — PR 6: bulk-move long-tail into lfx-bundles (engine + 45 providers)
Part of Bundle Separation Phase A — metapackage split (1.11). Stacked on the skeleton PR (
bundles/create-lfx-bundles). The high-risk PR — collapsing providers into the metapackage must preservepip install langflowexactly.What this does
Adds
scripts/migrate/consolidate_bundles.py(the inverse ofport_bundle.py: moves in-tree providers into the manifest-lesslfx-bundlesmetapackage) and runs it on 45 providers across three verified tranches:Per provider:
src/lfx/src/lfx/components/<p>/→lfx_bundles/<p>/(lowercase, perBUNDLE_NAME_RE);# lfx-bundles-shim) sofrom lfx.components.<p> import Xkeeps working whenlfx-bundlesis installed, and raises an actionable ImportError otherwise;allaggregate;ext:<p>:<Class>@official.To avoid double registration, the in-tree walk (
_load_components_dynamically) skips shimmed provider dirs, andcomponent_index.jsonis regenerated (355→286 components, 95→50 modules — exactly the moved set; no stale standalone entries).Dep parity (the headline risk)
Every spec is sourced from
langflow-base's per-provider extras or its direct dependencies;langchain-communityproviders carry the wrapper plus the SDK the wrapper lazy-imports (e.g.pgvector,atlassian-python-api);requestsis declared explicitly where imported (only transitive in today's env);pineconekeeps itspython_version<'3.14'marker verbatim.Verified at the resolution level: the
uv.lockdiff is +220 lines of lfx-bundles extras metadata with zero packages added or removed (name =diff empty) —pip install langflowresolves the identical set.Test plan
@official, 69 components, no errors/warningsimport lfx.componentsstill works (engine safety)mongodb_atlas.pySLF001 per-file-ignore; mem0/mongodb detect-secrets baseline re-keyed)Deliberately deferred (next tranches)
lfx.base.*(composio, huggingface, langwatch) — needs base-move support in the scriptBUNDLE_NAME_REis lowercase-only; palette-name implications need a decisionfrom langflowimporters (vlmrun), marker-heavy (cuga, altk), and community-wrapper providers with unverified runtime SDKs (baidu, bing, cloudflare, maritalk, vectara, searchapi, redis, cassandra, elastic, nvidia, …)langflow-baseper-provider extras left in place (harmless dep duplication; de-dup is a follow-up)Stack
Base
bundles/create-lfx-bundles(PR 2); the stack lands onrelease-1.11.0bottom-up via PR 1 (#13563). Draft until QA signs off.