feat: add vendor-neutral web corpus loader - #11
Conversation
Rework the web ingestion path so it does not bake in or promote a single commercial provider: - Public API exposes a vendor-neutral `WebLoader` (was `LinkupWebLoader`) built against a small `WebFetchClient` interface; no brand name is in the public API or default install. - Any specific backend is a clearly-optional, opt-in adapter behind that interface (`knowledge_base/web_adapters.py`), with the Linkup adapter kept as one example installable via the optional `[linkup]` extra. - Config format renamed `linkup_fetch` -> `web_fetch`, selecting a backend by name or accepting an injected client; no default vendor. - Removed all promotional/endorsement copy from README and DOCUMENTATION and renamed the example config to `web_fetch_config.toml`. Tests updated to the neutral API; full suite (59) and ruff pass. Co-authored-by: Cursor <cursoragent@cursor.com>
opensource-SantanderAI
left a comment
There was a problem hiding this comment.
Thanks @sachasimov — this is a big step in the right direction and we really appreciate the rework. We're happy to accept the architecture: the vendor-agnostic WebFetchClient interface, the WebLoader (no brand in the public API), the no-default/inject-your-own-client design, and the removal of marketing copy. That decoupling is exactly what we wanted.
However, the maintainer requirement for merge is that the repository be 100% vendor-neutral, with no branded backend shipped in code or dependencies. Right now a vendor still remains as the only concrete backend:
knowledge_base/web_adapters.pyregisters exactly one backend —_BACKENDS = {"linkup": linkup_fetch_client}— so the single example we ship is brand-named, which reads as a de-facto endorsement.pyproject.tomladds a real vendor dependency via the[linkup]extra (linkup-sdk>=0.18), i.e. supply-chain surface for one commercial provider.
A branded backend gives no technical advantage here: any generic HTTP client (stdlib urllib/httpx/requests) — or simply "bring your own client / use your agent's fetch tool" — demonstrates the interface equally well, vendor-free.
Please do one of the following:
- (Preferred) Replace the Linkup adapter with a neutral example backend (e.g. a small stdlib-/
httpx-basedWebFetchClient), and drop the[linkup]extra andlinkup-sdkdependency. Linkup (and any other provider) can be mentioned in the docs as one option a user could plug in, but not shipped as code or a dependency. - Or ship no concrete backend at all — keep only the
WebFetchClientinterface plus "bring your own client" documentation, and remove the[linkup]extra/dependency entirely.
A couple of notes while you're in there:
pyproject.tomlhas a duplicate line:linkup-sdk>=0.18appears twice in the[linkup]extra — please remove the duplicate (this would go away entirely with the changes above).- Once a neutral backend is in place, please make sure the example config (
examples/web_fetch_config.toml) andtests/test_web_knowledge_base.pyreference the neutral backend rather than a brand name.
With a brand-free backend (or none) the repo is fully vendor-neutral and we'll be glad to merge. Thanks again for working with us on this!
|
Thanks for the vendor-neutral rework — this addresses the #10 concerns well. We verified the diff and confirmed there is no commercial provider left in the code, dependencies, or docs: the public API exposes only
With the |
Vendor-neutral rework of #10, which was closed because it wired one commercial provider into the public API, dependency set, and marketing copy. This addresses each point you raised.
What changed since #10
WebLoader(wasLinkupWebLoader), built against a small provider-agnosticWebFetchClientinterface (fetch(url, ...) -> response). Nothing vendor-named is exported from the package.WebLoadertakes any client you supply. The config format is renamedlinkup_fetch->web_fetchand requires either an injectedclientor an explicitly named backend — there is no default provider.knowledge_base/web_adapters.py. The Linkup adapter is kept as one example, installable via the optional[linkup]extra, and is never used unless explicitly selected.README.mdandDOCUMENTATION.md; the example config is renamedweb_fetch_config.tomlwith neutral wording.Net effect for users
You can build a retrieval corpus from known public web pages through whatever fetch backend you choose, with the package's default path staying fully offline and dependency-light. No third-party SaaS is required by core, and none is endorsed.
Test plan
pytest(59 passed).ruff checkclean.WebLoaderonly).Made with Cursor