New in 0.2: OpenAI Node.js SDK 3.x → 4.x for JavaScript and TypeScript.Try it on your code
Driftfix
Request access
LiveOpenAI SDK migrations for Python and Node

APIs change.
Your code gets a pull request.

Driftfix reads a provider's breaking change, rewrites every affected call in your codebase, proves the fix with your own tests and opens a pull request your team can review in a minute.

Try it on your code
Pull requests only, never pushes to main Tests run before and after every patch One engine in the CLI and the browser
driftfix · acme
Live demo · sample repositories
The real product, running in your browser on four sample repositories. Every number comes from the migration engine. Ctrl K to search inside
Playground

Paste old OpenAI code. Get the migrated file, the diff and the pull request, right here.

Updates as you type
    app.pyEditable · Ctrl ↵ to run
    Why now

    APIs break on a schedule now. Someone on your team has to notice, read the changelog and rewrite the calls before the date.

    ProviderHow often it breaksOld versionsSource
    Google AdsFour major API versions a year since January 2026sunset after ~12 monthsPPC Land
    StripeA potentially breaking major release twice a yearpinned until you upgradeStripe docs
    ShopifyA new Admin API version every quartersupported ~12 monthsShopify docs
    SalesforceRetired API versions 21 through 30 in 2025calls now failSalesforce
    OpenAIRemoved the module-level Python API in 1.0raises APIRemovedInV1Migration guide
    OpenAI (Node)Replaced OpenAIApi and Configuration in 4.0"is not a constructor"Migration guide
    87%

    of 251 REST API versions with breaking changes gave no deprecation notice in the version before. Teams usually find out when production breaks.

    Study on arXiv
    How it works

    Changelog in, verified pull request out. Every step is inspectable, and nothing is guessed.

    01 · Read

    Map the change

    Each breaking change becomes an entry in the change map: versions, dates, changelog and rewrite rules.

    OPENAI_PYTHON_V1 = Change(
        id="openai-python-v1",
        from_version="0.x",
        to_version=">=1.0",
        released="2023-11-06",
    )
    02 · Find

    Find every call

    The code is parsed, and the API is followed through aliases, loops and comprehensions, not grepped.

    import openai as oa
    
    r = oa.ChatCompletion.create(...)
    for row in r["data"]:
        print(row["embedding"])
    03 · Fix

    Rewrite the syntax tree

    Edits land on the concrete syntax tree, so comments, quoting and formatting survive.

    -r = oa.ChatCompletion.create(
    +r = client.chat.completions.create(
    -r["choices"][0]["message"]
    +r.choices[0].message
    04 · Prove

    Test, then open the PR

    Your tests run before and after. If they don't pass, the patch is rolled back and nothing is opened.

    ✕ tests before   3 failed
    ✓ removed calls  0 left
    ✓ tests after    3 passed
    ✓ pull request   opened

    The same engine on the command line

    Run it in CI or on a laptop. It scans, patches, runs the repository's own tests, commits to a branch and writes the pull request.

    $ driftfix scan .
    $ driftfix run .
    $ driftfix run . --open-pr
    ~/support-bot
    $ driftfix run . driftfix 0.1.0  support-bot   ▸ Change         OpenAI Python SDK 0.x -> >=1.0  ▸ Scan           3 Python files, 1 affected, 8 edits  ▸ Tests before   3 failed  APIRemovedInV1  ▸ Patch          app.py  +8 -7  ▸ Verify         compiled 1 file, tests 3 passed  ▸ Commit         d0d3c0f on driftfix/openai-python-v1  ▸ Pull request   ready  DRIFTFIX_PR.md   Done in 2.3s. 8 edits, verified.
    In the wild

    Real pull requests to real projects. Each checked against the current SDK before it was opened.

    sourcegraph/zendesk-discord-integration #15OpenAI Node 3.x → 4.x in TypeScript, with package.json and pnpm lockfile. tsc --noEmit passes on openai 4.104.Open
    anvaka/local-chat #2OpenAI Python 0.x → 1.x. Type check fails on main, passes on the branch.Open
    batuhantoker/Flask-OpenAI-Chatbot #13OpenAI Python 0.x → 1.x plus the dependency pin.Open
    gecitemre/issue-filler #1Driftfix flagged this file for a human instead of guessing; fixed by hand.Open
    Security

    Built to be merged. Safe enough to let near production code.

    Pull requests only

    Driftfix works on its own branch and never pushes to a default branch. Your team reviews and merges.

    Rolls back on failure

    If tests that passed before the patch fail after it, the patch is discarded and no pull request is opened.

    Says what it didn't do

    Patterns it can't rewrite safely are listed under "Needs a human look", with file and line, never guessed.

    Who it's for

    Two sides of the same breaking change.

    Engineering teams

    Stay current across every vendor

    Connect repositories once. When an API you depend on ships a breaking change, you get a review-ready pull request instead of a pager alert.

    • Every vendor's deprecations in one place
    • Branches and PRs only, never main
    • Ambiguous code flagged for a human
    API companies

    Ship the change, not just the announcement

    Stop waiting for integrators to read the changelog. Push the migration into their code and retire old versions on schedule.

    • See which integrators are still on a retiring version
    • Send each of them a tested pull request
    • Fewer tickets and fewer delayed sunsets
    OpenAI Python SDK, 0.x to 1.xChat, completions, embeddings, images, audio, moderation, errors, async, dependency pinsLive
    OpenAI Node.js SDK, 3.x to 4.xJavaScript and TypeScript: client, resources, .data unwrapping, types, package.json and lockfilesLive
    Stripe API versionsVersion upgrades across Python and Node clientsNext
    Google Ads APIQuarterly versions and their sunsetsNext
    Shopify Admin APIQuarterly versionsPlanned
    Pricing

    Free to run yourself. Pay when you want it to happen without you.

    Open source

    $0MIT licensed

    The CLI and the GitHub Action. Every published migration, on your own machine or CI.

    • driftfix scan and run
    • Tests before and after, rollback
    • Job summary on every pull request
    Install the CLI

    API providers

    Customper retired version

    Ship your breaking change as tested pull requests to the integrators who depend on it.

    • Rules written with your team
    • Adoption by integrator and version
    • Sunset dates you can keep
    Talk to us
    Get started

    Your first migration is free.

    Send a repository that's stuck on an old API version. We'll run Driftfix on it and send you the pull request with test results, usually within a day.

    Or emailhello@driftfix.dev

    We only read the repository to run the migration. For private repositories we send a GitHub App link scoped to that one repository.