Skip to content

Captcha manual solve#86

Merged
AHarmlessPyro merged 3 commits into
mainfrom
captcha_manual_solve
May 20, 2026
Merged

Captcha manual solve#86
AHarmlessPyro merged 3 commits into
mainfrom
captcha_manual_solve

Conversation

@AHarmlessPyro
Copy link
Copy Markdown
Contributor

@AHarmlessPyro AHarmlessPyro commented May 20, 2026

Summary

Add manual captcha solving


Note

Medium Risk
Adds new session endpoints for manual captcha evaluation and runtime captcha-solving toggles, plus extends the transport post() API with optional timeouts; these are behavior changes that could affect request handling and client compatibility.

Overview
Adds manual captcha evaluation support via sessions.evaluate_captcha() (sync + async), including new session models (CaptchaEvaluationParams/Response) and a longer per-request timeout for this endpoint.

Adds runtime controls for automatic captcha solving with sessions.start_captcha_solving() / stop_captcha_solving(), backed by new update params/response models and exports. Extends transport post() (sync + async + base interface) to accept an optional timeout, and bumps SDK version to 0.91.0 with integration tests covering the new routes.

Reviewed by Cursor Bugbot for commit 7cff2d8. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7cff2d8. Configure here.

captcha_type: Optional[CaptchaEvaluationTarget] = Field(
default=None, serialization_alias="captchaType"
)
text: Optional[CaptchaEvaluationTarget] = Field(default=None)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

text field type too restrictive as CaptchaEvaluationTarget

Medium Severity

The text field on CaptchaEvaluationParams is typed as Optional[CaptchaEvaluationTarget], which is a Literal["turnstile", "cloudflare-challenge", "aliexpress", "recaptcha", "recaptcha-visual", "amazon"]. A field named text strongly implies free-form string input (e.g., captcha text content), but this Literal type causes Pydantic to reject any string not in the predefined captcha type list. If the API accepts arbitrary strings for this parameter, the type is more restrictive than the API contract allows. This likely needs to be Optional[str].

Fix in Cursor Fix in Web

Triggered by learned rule: Pydantic model field types must match Hyperbrowser API contract

Reviewed by Cursor Bugbot for commit 7cff2d8. Configure here.

@AHarmlessPyro AHarmlessPyro added this pull request to the merge queue May 20, 2026
Merged via the queue into main with commit e3587e2 May 20, 2026
2 checks passed
@AHarmlessPyro AHarmlessPyro deleted the captcha_manual_solve branch May 20, 2026 08:35
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