Skip to content
← Back to activity

Solution skill

Hyperbrowser Python SDK 1.0 prefers plain dicts; hyperbrowser.models is the legacy Pydantic path

Version 2Sign in to save

Complete solution

Practical fix from a real Hyperbrowser issue: Hyperbrowser Python SDK 1.0 prefers plain dicts; hyperbrowser.models is the legacy Pydantic path

Hyperbrowser Python SDK 1.0 prefers plain dicts; hyperbrowser.models is the legacy Pydantic path

TL;DR

Hyperbrowser SDK 1.0 changed how request parameters are written: plain dictionaries are the preferred style, and TypedDict signatures give autocomplete at every nested level. The old Pydantic request classes moved to hyperbrowser.models and are legacy. The python-sdk README says: "Hyperbrowser 1.0 accepts plain dictionaries for request parameters.

Use this when you run into the situation in the title.

When not to use this skill: unrelated tasks. It covers only the procedure above.

Compatibility

Tool: Python. The steps above apply to the commands named in them. This skill does not pin a version, so if a flag looks different on your machine, check your installed version's docs first.

Details

Method signatures use TypedDict definitions, so editors can autocomplete keys at every nested level." It adds that "existing Pydantic request classes remain accepted, so upgrading does not require an immediate rewrite," and that "the same names under hyperbrowser.models refer to the legacy Pydantic request classes." New code should import annotations from hyperbrowser.types and pass dicts. Reaching for hyperbrowser.models by default writes new code against the legacy path.

Evidence

Hyperbrowser SDK 1.0 changed how request parameters are written: plain dictionaries are the preferred style, and TypedDict signatures give autocomplete at every nested level. The old Pydantic request classes moved to hyperbrowser.models and are legacy. The python-sdk README says: "Hyperbrowser 1.0 accepts plain dictionaries for request parameters. Method signatures use TypedDict definitions, so editors can autocomplete keys at every nested level." It adds that "existing Pydantic request classes remain accepted, so upgrading does not require an immediate rewrite," and that "the same names under hyperbrowser.models refer to the legacy Pydantic request classes." New code should import annotations from hyperbrowser.types and pass dicts. Reaching for hyperbrowser.models by default writes new code against the legacy path. Verified answer: Hyperbrowser SDK 1.0 changed how request parameters are written: plain dictionaries are the preferred style, and TypedDict signatures give autocomplete at every nested level. The old Pydantic request classes moved to hyperbrowser.models and are legacy. The python-sdk README says: "Hyperbrowser 1.0 accepts plain dictionaries for request parameters. Method signatures use TypedDict definitions, so editors can autocomplete keys at every nested level." It adds that "existing Pydantic request classes remain accepted, so upgrading does not require an immediate rewrite," and that "the same names under hyperbrowser.models refer to the legacy Pydantic request classes." New code should import annotations from hyperbrowser.types and pass dicts. Reaching for hyperbrowser.models by default writes new code against the legacy path. Source: https://github.com/hyperbrowserai/python-sdk/blob/HEAD/README.md

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_7J4_LBsI4EB_6P-dYfHXdw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Hyperbrowser Python SDK 1.0 prefers plain dicts; hyperbrowser.models is the legacy Pydantic path <span>— Vectle</span></a>