openai/completions-responses-migration-pack
OfficialDeveloper toolkit to migrate applications from the legacy OpenAI Completions/Chat Completions APIs to the unified Responses API, guided by Codex CLI
The Completions to Responses Migration Pack is an official shell-based CLI toolkit from OpenAI that automates upgrading an app's Chat Completions calls to the unified Responses API. It scripts the whole move: detect, edit, test, and open a pull request, so you are not hand-rewriting every call site.
Our Review
OpenAI built this migration pack in-house and released it under the MIT license, and it answers a question a lot of teams are asking as 2026 wears on: how do you move off Chat Completions without hand-editing every request. The Assistants API sunsets on August 26, 2026, and OpenAI's own guidance is to standardize new work on Responses, which puts a purpose-built migration script on the shortlist rather than a nice-to-have.
What the migration pack does:
- •Legacy usage detection scans a target repo for Completions and Chat Completions call sites before touching anything.
- •Guided automated edits runs OpenAI's own Codex CLI to propose and apply the endpoint, parameter, and client changes (
/v1/completionsto/v1/responses,prompttoinput,max_tokenstomax_output_tokens). - •Test and lint verification re-runs your existing test suite and linters after edits and summarizes pass/fail results.
- •Clean branch and PR flow creates a dedicated
migrate/openai-responses-<timestamp>branch and can open a pull request via the GitHub CLI when it finishes. - •Dry-run and full-auto modes
--dry-runprints a unified diff with zero writes;--full-autoruns unattended with workspace-write access and on-failure approvals. - •Approval policies for Codex choose
untrusted,on-request,on-failure, orneverto control how much the agent can do without asking first.
Getting started:
Run the one-liner straight from GitHub: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/openai/completions-responses-migration-pack/main/scripts/completions-to-responses-upgrade.sh)", or clone the repo and run bash scripts/completions-to-responses-upgrade.sh --repo /path/to/repo --dry-run first to see the plan before any files change. It requires the Codex CLI installed and authenticated, plus macOS or Linux (Windows users need WSL2).
Limitations:
The script needs the Codex CLI as its automation engine, so it is not a standalone codemod you can run without that dependency. It targets macOS and Linux natively, with Windows support only through WSL2. Development has been quiet since the September 2025 release, with no formal GitHub release tags, so the version tracked in assets/VERSION is the reference rather than a browsable release history. Full automation (--full-auto, --dangerous) bypasses approval prompts, which is convenient for CI but means trusting an agent with direct write access to your codebase.
Our Verdict
OpenAI shipped this migration pack itself, and it lands as a scripted answer to a real deadline: the Assistants API sunsets on August 26, 2026, and Responses is the API surface OpenAI is steering every new integration toward.
For developers maintaining a production app still calling /v1/completions or /v1/chat/completions, this handles the tedious part: it finds every call site, rewrites the endpoint, parameters, and client calls to match the Responses shape, then re-runs your tests and opens a PR you can review line by line. The dry-run flag shows the entire diff before a single file changes, which matters when the codebase touches money or user data.
For a vibe builder who shipped something on the old Completions API early and hasn't touched the codebase since, this is a faster path than re-reading OpenAI's migration docs and hand-editing every request, provided the Codex CLI is already part of the workflow.
Skip if your app never called the raw Completions or Chat Completions endpoints directly, if you are not comfortable running an AI agent with write access to your repo even in dry-run-first mode, or if you are on Windows without WSL2 set up.
Frequently Asked Questions
What does the OpenAI Completions to Responses Migration Pack actually do?
It is an official shell-based CLI toolkit from OpenAI that scans a codebase for legacy Completions and Chat Completions API calls, then uses OpenAI's own Codex CLI to propose and apply the edits needed to run on the Responses API instead. It updates endpoints, request parameters, and client initialization, re-runs your existing tests, and can open a pull request with the finished branch so the change goes through normal code review before merging.
Is the OpenAI Completions API actually being deprecated in 2026?
Yes. OpenAI has set August 26, 2026 as the sunset date for the Assistants API and is directing new development toward the Responses API, which OpenAI's own documentation describes as the consolidated path forward for text, tool calls, and streaming. Chat Completions itself remains supported for now, but OpenAI recommends every new project build on Responses, which is exactly the migration this repo automates.
Do I need OpenAI's Codex CLI installed to use this migration pack?
Yes, the script is built around Codex CLI as its automation engine: it authenticates Codex, then runs it in automation mode with a structured prompt that finds and edits your legacy API calls. Without Codex CLI installed and authenticated, the script has nothing to drive the actual code changes, so this is not a standalone regex-based codemod you can run in isolation.
Is it safe to run this migration script on a production codebase?
The script defaults to write mode but supports a dry-run flag that prints a full unified diff with zero file changes, so you can review every proposed edit before anything runs for real. It also supports approval policies from untrusted through never, no API keys are written to disk, and every run creates its own timestamped git branch rather than editing in place, which keeps a production codebase reviewable and reversible.
Is the OpenAI Responses migration pack free and open source?
Yes, it is released under the MIT license directly from OpenAI's own GitHub organization, with over 100 stars and 15 forks as of 2026. Being an official OpenAI repo rather than a community reimplementation means the endpoint and parameter mappings it applies match OpenAI's own migration guidance exactly.
What is completions-responses-migration-pack?
The Completions to Responses Migration Pack is an official shell-based CLI toolkit from OpenAI that automates upgrading an app's Chat Completions calls to the unified Responses API. It scripts the whole move: detect, edit, test, and open a pull request, so you are not hand-rewriting every call site.
How do I install completions-responses-migration-pack?
Visit the GitHub repository at https://github.com/openai/completions-responses-migration-pack for installation instructions.
What license does completions-responses-migration-pack use?
completions-responses-migration-pack uses the MIT license.
What are alternatives to completions-responses-migration-pack?
Explore related tools and alternatives on My AI Guide.
Open source & community-verified
MIT licensed: free to use in any project, no strings attached. 106 developers have starred this, meaning the community has reviewed and trusted it.
Reviewed by My AI Guide for relevance, quality, and active maintenance before listing.
