Repository navigation
Conversation
FirecrawlTool appended "scrape" to the connection URL, and the search tools handed a relative path to urljoin, which treats the base's last segment as a file name and replaces it. A gateway or a self-hosted deployment configured as https://gw.example.com/firecrawl/v2 therefore posted to .../v2scrape and .../firecrawl/search. Tavily and ScaleSerp passed "/search", an absolute path that drops the base path altogether. The default URLs hid all of this by ending with "/" or having no path. join_base_url() keeps the base as a directory before joining, so the endpoint lands under it whether or not the operator writes the trailing slash.
This branch has not been deployed
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.
A web tool's connection carries a configurable base URL, and four of them did not keep its path:
FirecrawlToolconcatenated the endpoint:self.connection.url + "scrape"turnedhttps://gw.example.com/firecrawl/v2into.../v2scrape.FirecrawlSearchToolandLinkupTooljoined a relativesearch.urljointreats the base's last segment as a file name, so.../firecrawl/v2became.../firecrawl/search.TavilyToolandScaleSerpTooljoined"/search", an absolute path that drops the base path entirely.Only a custom base URL hits this: every default ends with
/or has no path at all, and the existing tests assert exactly those defaults.join_base_url()indynamiq/nodes/tools/utils.pykeeps the base as a directory before joining, the same shape as the Whisper and ElevenLabs fix in #1164, so all five call sites resolve the same URL whether or not an operator writes the trailing slash.Compatibility
No change to saved workflows. The default connections resolve to the same URLs, and a base URL that already ended with
/resolves as before. Only a base URL whose last segment belongs to the path and has no trailing slash changes, from a request to an endpoint that does not exist to the intended one.Verified
tests/unit/nodes/tools/test_web_tool_base_url.py: five tools × base URL with and without the trailing slash, plus one case asserting the URLFirecrawlToolactually posts to.pytest tests/unit/nodes/tools/test_web_tool_base_url.py→ 8 failed, 3 passed.pytest tests/integration/nodes/tools/test_firecrawl.py tests/integration/nodes/tools/test_firecrawl_search.py tests/integration/nodes/tools/test_linkup.py tests/integration/nodes/tools/test_tavily.py tests/unit/nodes/tools/test_firecrawl_async.py tests/unit/nodes/tools/test_web_tool_base_url.py→ 42 passed.flake8andisort --check-onlyclean on the changed files.This change was prepared with AI assistance.