[PR #4504] [MERGED] Improve URL handler for collector processes #4651

Closed
opened 2026-02-22 18:36:16 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/4504
Author: @timothycarambat
Created: 10/7/2025
Status: Merged
Merged: 10/7/2025
Merged by: @timothycarambat

Base: masterHead: improve-url-handler-collector


📝 Commits (2)

  • 28201ba Improve URL handler for collector processes
  • ba4bbbc dev build

📊 Changes

7 files changed (+161 additions, -6 deletions)

View changed files

📝 .github/workflows/dev-build.yaml (+1 -1)
collector/__tests__/utils/url/index.test.js (+112 -0)
📝 collector/extensions/index.js (+2 -1)
📝 collector/processLink/convert/generic.js (+1 -1)
📝 collector/processLink/index.js (+3 -0)
📝 collector/utils/url/index.js (+28 -1)
📝 server/utils/agents/aibitat/plugins/web-scraping.js (+14 -2)

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

--

What is in this change?

  • Allows the collector to reasonably handle URLS without protocols

This happens a lot when an LLM creates the web-scraping request resulting in an implied URL like anythingllm.com.

Currently, the collector fails to reach this URL due to lack of protocol since it fails the validURL function check since new URL('anythingllm.com') is actually invalid.

Instead, we now handle implied protocols to remap this URL to a https:// protocol, while still reserving the protocol if set.

Additional Information

  • Updated the feedback loop for web-scraping so user can know when LLM is processing the site text and how large that payload might be.

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/4504 **Author:** [@timothycarambat](https://github.com/timothycarambat) **Created:** 10/7/2025 **Status:** ✅ Merged **Merged:** 10/7/2025 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `improve-url-handler-collector` --- ### 📝 Commits (2) - [`28201ba`](https://github.com/Mintplex-Labs/anything-llm/commit/28201baa9c6a160844f5c52af02586f3b71b72ea) Improve URL handler for collector processes - [`ba4bbbc`](https://github.com/Mintplex-Labs/anything-llm/commit/ba4bbbc52ac589ca6d9024ce927302ee9be373a3) dev build ### 📊 Changes **7 files changed** (+161 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/dev-build.yaml` (+1 -1) ➕ `collector/__tests__/utils/url/index.test.js` (+112 -0) 📝 `collector/extensions/index.js` (+2 -1) 📝 `collector/processLink/convert/generic.js` (+1 -1) 📝 `collector/processLink/index.js` (+3 -0) 📝 `collector/utils/url/index.js` (+28 -1) 📝 `server/utils/agents/aibitat/plugins/web-scraping.js` (+14 -2) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [x] ✨ feat - [x] 🐛 fix - [ ] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues -- ### What is in this change? - Allows the collector to reasonably handle URLS without protocols This happens a lot when an LLM creates the web-scraping request resulting in an implied URL like `anythingllm.com`. Currently, the collector fails to reach this URL due to lack of protocol since it fails the `validURL` function check since `new URL('anythingllm.com')` is actually invalid. Instead, we now handle implied protocols to remap this URL to a `https://` protocol, while still reserving the protocol if set. <!-- Describe the changes in this PR that are impactful to the repo. --> ### Additional Information - Updated the feedback loop for web-scraping so user can know when LLM is processing the site text and how large that payload might be. <!-- Add any other context about the Pull Request here that was not captured above. --> ### Developer Validations <!-- All of the applicable items should be checked. --> - [x] I ran `yarn lint` from the root of the repo & committed changes - [x] Relevant documentation has been updated - [x] I have tested my code functionality - [x] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:36:16 -05:00
yindo closed this issue 2026-02-22 18:36:16 -05:00
yindo changed title from [PR #4504] Improve URL handler for collector processes to [PR #4504] [MERGED] Improve URL handler for collector processes 2026-06-05 15:19:38 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#4651