Captcha manual solve#86
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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) |
There was a problem hiding this comment.
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].
Triggered by learned rule: Pydantic model field types must match Hyperbrowser API contract
Reviewed by Cursor Bugbot for commit 7cff2d8. Configure here.


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 transportpost()(sync + async + base interface) to accept an optionaltimeout, and bumps SDK version to0.91.0with 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.