Skip to content

[SCR-383] Document Auto-Mode (mode=auto) support#22

Open
kostas-jakeliunas-sb wants to merge 1 commit into
mainfrom
SCR-383/document-auto-mode
Open

[SCR-383] Document Auto-Mode (mode=auto) support#22
kostas-jakeliunas-sb wants to merge 1 commit into
mainfrom
SCR-383/document-auto-mode

Conversation

@kostas-jakeliunas-sb

@kostas-jakeliunas-sb kostas-jakeliunas-sb commented Jun 30, 2026

Copy link
Copy Markdown

Merge order: part of the [SCR-383] Auto-Mode client rollout — merge once the server PR ScrapingBee/scrapingbee-API#1242 is merged + the flag is enabled.

tl;dr

Docs-only: document Auto-Mode (mode=auto) in the Python SDK and bump the version — no client code or validation changes (the SDK is pure pass-through; the server enforces the 400s).

Summary

  • README.md: new Auto-Mode section — enable mode=auto, optional max_cost cap, read the Spb-auto-cost response header; plus notes (GET only; max_cost optional and >= 1; not combinable with render_js/premium_proxy/stealth_proxy → server returns 400).
  • CHANGELOG.md: add 2.0.3 entry documenting Auto-Mode support.
  • scrapingbee/__version__.py: bump 2.0.22.0.3.
  • tests/test_utils.py: update the User-Agent assertion to track the bumped version (the header is derived from __version__).

No changes to scrapingbee/client.py or any param allowlist — params={'mode': 'auto', 'max_cost': N} already serializes correctly today, and response.headers['Spb-auto-cost'] is already readable.

Test plan

  • make lint (flake8) — passes, no findings
  • make test (pytest, mocked, no network) — 16/16 pass
  • Manual: against a server with Auto-Mode enabled, confirm mode=auto returns a winning-config response and Spb-auto-cost reflects credits charged
  • Confirm server-side Auto-Mode has shipped before un-drafting

🤖 Generated with Claude Code

Auto-Mode is a server-side, flag-gated beta feature. The SDK is a pure
pass-through, so `params={'mode': 'auto', 'max_cost': N}` already works
and the `Spb-auto-cost` response header is readable today — no client
code or validation changes are needed (server enforces the 400s).

- README.md: add an "Auto-Mode" example (enable mode=auto, optional
  max_cost cap, read the Spb-auto-cost header) plus usage notes
  (GET only; max_cost optional/>=1; not combinable with
  render_js/premium_proxy/stealth_proxy).
- CHANGELOG.md: add 2.0.3 entry documenting Auto-Mode support.
- scrapingbee/__version__.py: bump 2.0.2 -> 2.0.3.
- tests/test_utils.py: update User-Agent assertion to track the
  bumped version (derived from __version__).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kostas-jakeliunas-sb kostas-jakeliunas-sb marked this pull request as ready for review June 30, 2026 12:56
@kostas-jakeliunas-sb kostas-jakeliunas-sb changed the title [DRAFT — DO NOT MERGE] [SCR-383] Document Auto-Mode (mode=auto) support [SCR-383] Document Auto-Mode (mode=auto) support Jun 30, 2026
@kostas-jakeliunas-sb kostas-jakeliunas-sb self-assigned this Jun 30, 2026

@marius-nemeiksis-sbee marius-nemeiksis-sbee left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open question: should we maybe spend some time to bring the SDK up to speed before or together with this release? The gap is huge.
Or at least the most crucial changes - like api_key in headers (sdk code still use query param)

@kostas-jakeliunas-sb

Copy link
Copy Markdown
Author

Good question, fyi @dbulbukas-sbee see Marius' point above -

basically: scrapingbee-python sdk is very much outdated, what should we do about it (we should at some point make a decision, in the future)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants