Bug Description
Both Wikidata components call the public Wikidata API without an explicit timeout:
# src/lfx/src/lfx/components/tools/wikidata_api.py
response = httpx.get(self.wikidata_api_url, params=params)
# src/lfx/src/lfx/components/wikipedia/wikidata.py
response = httpx.get(wikidata_api_url, params=params)
When Wikidata is slow or unreachable, a flow that invokes the component/tool can block longer than expected instead of returning a bounded tool/component error.
Reproduction
- Add the Wikidata component/tool to a flow.
- Run the flow in an environment where
https://www.wikidata.org/w/api.php is slow, blocked, or blackholed.
- The component waits on
httpx.get() without a configured timeout.
Minimal code path:
from lfx.components.wikipedia.wikidata import WikidataComponent
component = WikidataComponent(query="Langflow")
component.fetch_content()
Expected behavior
Wikidata requests should use a bounded timeout and return a clear ToolException/component error when the external API is unavailable.
Environment
- Operating System: Linux/macOS
- Langflow Version: current main branch by code inspection
- Python Version: 3.11/3.12
Bug Description
Both Wikidata components call the public Wikidata API without an explicit timeout:
When Wikidata is slow or unreachable, a flow that invokes the component/tool can block longer than expected instead of returning a bounded tool/component error.
Reproduction
https://www.wikidata.org/w/api.phpis slow, blocked, or blackholed.httpx.get()without a configured timeout.Minimal code path:
Expected behavior
Wikidata requests should use a bounded timeout and return a clear
ToolException/component error when the external API is unavailable.Environment