Firecrawl plugin: upgrade v1 -> v2 API#1
Closed
rakshith48 wants to merge 4 commits into
Closed
Conversation
Switch the custom HTTP client (firecrawl_appx.py) from the legacy
/v1/* endpoints to /v2/* endpoints, mirroring the paths Dify's own core
extractor (api/core/rag/extractor/firecrawl/firecrawl_app.py) already
uses: v2/scrape, v2/crawl, v2/map, v2/crawl/{id}.
Scrape tool: in v2 the top-level "extract" field was removed; structured
/ LLM extraction is now expressed as a {"type": "json", schema, prompt,
systemPrompt} object inside the formats array. The scrape tool now builds
that json format object from the existing schema/systemPrompt/prompt
inputs, so the user-facing parameters and outputs are preserved.
Bump plugin version 0.0.9 -> 0.1.0.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
v2 JsonFormat only supports {type, prompt, schema}; the carried-over systemPrompt
would be silently ignored. Merge any system prompt into the single prompt field.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…gnore_sitemap) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…gnore_sitemap) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
Author
|
Superseded — migrated to upstream: langgenius#3250 |
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.
Summary
Upgrades the Firecrawl marketplace plugin (
tools/firecrawl/) from the legacy v1 Firecrawl API to v2, following the exact endpoint paths that Dify's own core extractor (api/core/rag/extractor/firecrawl/firecrawl_app.pyinlanggenius/dify) already uses.Changes
tools/firecrawl_appx.py— custom HTTP client: all endpoints switched/v1/*->/v2/*:v2/scrape,v2/crawl,v2/map,v2/crawl/{id}(status GET + cancel DELETE).tools/scrape.py— v2 removed the top-levelextractfield; structured/LLM extraction is now a{"type": "json", schema, prompt, systemPrompt}object inside theformatsarray. The tool now builds that json format from the existingschema/systemPrompt/promptinputs. User-facing parameters and tool outputs are unchanged.manifest.yaml— version bump0.0.9->0.1.0.Tool inputs/outputs and the provider registration are otherwise preserved. crawl/map/crawl_job payload shapes are unchanged (v2 accepts the same fields and passes through additional params, matching the core extractor's pass-through approach).
Verification
python -m py_compilepasses on all changed.pyfiles (firecrawl_appx.py,scrape.py, and the unchangedcrawl.py/map.py/crawl_job.py/provider/firecrawl.py)..yamlfiles parse cleanly viayaml.safe_load.firecrawl_app.py(already on v2) and the Firecrawl v2 API docs.🤖 Generated with Claude Code