Skip to content

feat(llama_hub): refactor connector to support LlamaIndex v0.14+ dire…#3325

Closed
anshuS1310 wants to merge 3 commits into
deepset-ai:mainfrom
anshuS1310:main
Closed

feat(llama_hub): refactor connector to support LlamaIndex v0.14+ dire…#3325
anshuS1310 wants to merge 3 commits into
deepset-ai:mainfrom
anshuS1310:main

Conversation

@anshuS1310
Copy link
Copy Markdown

🚀 Description

Refactored the LlamaHubConnector component to align with the modern LlamaIndex package architecture. LlamaIndex completely removed the dynamic download_loader utility as of v0.14.0, transitioning to a model where reader sub-packages are explicitly installed upfront (e.g., pip install llama-index-readers-web).

This change shifts the connector to dynamically resolve these explicitly installed packages using standard library reflection (importlib), preventing runtime dependency crashes and making the component future-proof.


🔗 Connected Issues

Fixes #575 > This PR completely implements the core functionality requested in issue #575 ("Build LlamaHub Integration"). It provides a generic, unified component wrapper that can execute modular LlamaIndex readers and seamlessly translate their outputs into native Haystack 2.0 Document models.

Note: To accommodate the complete removal of the dynamic download_loader utility as of LlamaIndex v0.14.0, the implementation was modernized to utilize explicit, upfront sub-package installations combined with runtime reflection (importlib) instead of the deprecated dynamic asset-downloading endpoints.


🛠️ Key Changes

📦 Core Component Refactoring

  • Updated LlamaHubConnector.__init__ parameters to accept explicit tracking variables reader_module and reader_class rather than the deprecated loader_name.
  • Replaced legacy dynamic asset-downloading endpoints with standard importlib.import_module pipelines.
  • Standardized document structural translation fields by robustly mapping attributes to Haystack 2.0 Document models using defensive reflection (getattr).

🧪 Test Suite Realignment

  • Completely overhauled tests/test_connector.py to decouple execution from the deprecated global loader.
  • Implemented isolation mocks around importlib pathways to securely intercept class initialization states during automated testing validation tasks.
  • Emptied outdated global interception configs in tests/conftest.py.

🛡️ Environmental Configuration

  • Added a local mypy.ini configuration file mapping explicitly to mypy_path = src to eliminate duplicate package base root path indexing issues under the Hatch monorepo structure.

✅ Verification Validation

All integration checking blocks were verified locally inside the isolated integrations/llama_hub environment:

  • Code Styling Validation: hatch run fmt passed with clean compliance.
  • Static Type Verification: hatch run types passed seamlessly with Success: no issues found in 2 source files.
  • Pipeline Unit Testing: hatch run unit executed all mock logic branches with zero collection errors or runtime failures.

@anshuS1310 anshuS1310 requested a review from a team as a code owner May 18, 2026 11:11
@anshuS1310 anshuS1310 requested review from sjrl and removed request for a team May 18, 2026 11:11
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 18, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added the type:documentation Improvements or additions to documentation label May 18, 2026
@anakin87
Copy link
Copy Markdown
Member

Based on run-llama/llama_index#21703 (comment), it seems that a unified LlamaHub interface no longer exists. Also, the project seems quite unmaintained. At this point, and with better alternatives, having an integration does not seem to provide significant value to Haystack users.

For this reason, I'll close this PR and the original issue.

Thank you!

@anakin87 anakin87 closed this May 18, 2026
@anshuS1310
Copy link
Copy Markdown
Author

😭😭😭😭😭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build LlamaHub Integration

3 participants