[pull] main from firecrawl:main - #373
Merged
Merged
Conversation
* fix(api): stop charging the +4 credit surcharge for enhanced (stealth) proxies Enhanced (stealth) proxies now bill at the same rate as basic. The surcharge was a flat +4 credits, applied in three independent places: - `lib/scrape-billing.ts`: the real charge, keyed on the proxy actually used, so `auto`-escalated stealth retries paid it too. - `lib/keyless-credit-projection.ts`: the keyless up-front reservation, which also reserved for `proxy: "auto"` (the v2 default). - `services/monitoring/store.ts`: the watch estimate and the actual-credits fallback. `SCRAPE_OPTION_CREDIT_BONUS` stays — it is shared with lockdown/question/highlights/audio/video. Removing the monitoring proxy usage left the `includeProxy` plumbing and `MonitorCreditMetadata.proxyUsed` dead, so both are gone. `unsupportedFeatures` stays in the `calculateCreditsToBeBilled` signature (renamed `_unsupportedFeatures`) because callers pass `exchange` and `threatDecisions` positionally after it. json-mode scrapes still cost 5: that branch assigns, it does not add. The other +4 add-ons and ZDR's +1 are untouched. Also updates the v1/v2 OpenAPI specs and the Elixir SDK docstring, which claimed "Costs up to 5 credits per request". Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FXrJTj9WQdxvbxGLEvjUSp * docs(api): say "enhanced" instead of "stealth" in billing comments Wording only. The `proxy` parameter still accepts `basic`/`stealth`/ `enhanced`/`auto` and `metadata.proxyUsed` still reports `"stealth"`, so every literal value, enum member, engine name and feature flag is untouched; only test titles and comments change. The v1/v2 OpenAPI `proxy` descriptions and the Elixir SDK docstrings already used "enhanced" and needed no change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FXrJTj9WQdxvbxGLEvjUSp * docs(python-sdk): correct the stale v1 proxy docstring Both `proxy` docstrings in the v1 client listed `Literal["basic", "stealth", "auto"]`, omitting `enhanced`, which every one of the real signatures has accepted. Adds it and updates the parenthetical to name the mode as customers see it. `stealth` stays inside the Literal because the API still accepts it; the signatures themselves are unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FXrJTj9WQdxvbxGLEvjUSp --------- Co-authored-by: Claude <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )