Repository navigation
Add Web Bot Auth and proxy routes session options - #143
Merged
Merged
Conversation
- web_bot_auth (True, or {"only_domains": [...]}) signs the session's
requests with Web Bot Auth. It works for sessions and agent tasks;
SessionLaunchState.web_bot_auth reports how a session signs.
- proxy_routes chooses, per host, whether traffic goes through the
session's proxy ("default") or straight out ("direct"). It only applies
when creating a session.
- Both are in the request TypedDicts and the legacy Pydantic models. The new
nested models reject unknown keys, so a misspelled "onlyDomains" fails
instead of being dropped and signing for every host.
- Runtime tests for both clients, mypy and Pyright fixtures, README sections,
and the version goes to 1.13.0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AHarmlessPyro
approved these changes
Oct 14, 2026
Co-Authored-By: Claude Opus 5.5 <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 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
Changes
Validation
ruff checkpytestNote
Medium Risk
Web Bot Auth changes request signing scope; strict validation mitigates misconfiguration, but incorrect client usage could still affect which hosts get signed or how traffic is routed.
Overview
Adds Web Bot Auth and proxy routes as session-creation options in the Python SDK, with README docs and typing/tests.
Web Bot Auth:
web_bot_authonCreateSessionParams(and agentsession_options) acceptsTrue/Falseor{"only_domains": [...]}; responses can expose signing details viaSessionLaunchState.web_bot_auth(signature_agent, optionalonly_domains). PydanticWebBotAuthParamsusesextra="forbid"so camelCase typos likeonlyDomainsfail locally instead of being stripped and widening signing scope.Proxy routes:
proxy_routes(withuse_proxy) sends matched hosts through"default"(session proxy) or"direct"; patterns support hostnames,*.example.com, or*, with first-match wins.Exports cover both
hyperbrowser.typesTypedDicts andhyperbrowser.modelsPydantic types. New wire-contract tests (sync/async), launch-state parsing tests, and mypy/Pyright valid/invalid fixtures document constraints (e.g. incompatibilities with ultra-stealth / snapshot / allow_out noted in field docs).Reviewed by Cursor Bugbot for commit 829dee2. Bugbot is set up for automated code reviews on this repo. Configure here.