Implementation:Openai Openai node Migration Config
| Knowledge Sources | |
|---|---|
| Domains | SDK, Migration, Configuration |
| Last Updated | 2026-02-15 12:00 GMT |
Overview
JSON configuration file consumed by the `openai migrate` CLI tool. It defines method renaming and parameter signature changes required when upgrading between major versions of the `openai` Node.js SDK.
Description
bin/migration-config.json is a 1038-line declarative configuration that drives the automated migration codemod. The top-level structure contains:
- pkg -- the NPM package name (`openai`)
- githubRepo -- the canonical repository URL
- clientClass -- the root client class name (`OpenAI`)
- methods -- an array of method migration descriptors
Each entry in the `methods` array describes a single API method that has changed between SDK versions. The migration tool uses this data to rewrite user code automatically.
Method Descriptor Schema
Every method entry may contain the following fields:
| Field | Type | Description |
|---|---|---|
| `base` | string | The new resource path (e.g. `chat.completions`, `vectorStores.files`) |
| `name` | string | The new method name |
| `oldName` | string (optional) | The previous method name if it was renamed (e.g. `del` to `delete`) |
| `oldBase` | string (optional) | The previous resource path if the method moved namespaces (e.g. from `beta.chat.completions` to `chat.completions`) |
| `params` | array (optional) | The new parameter signature |
| `oldParams` | array (optional) | The old parameter signature, used to detect and rewrite call sites |
Categories of Changes
The config encodes three categories of breaking changes:
- Method renames -- Methods renamed from `del` to `delete` across many resources (`chat.completions`, `files`, `models`, `vectorStores`, `beta.assistants`, `beta.threads`, `responses`, `evals`, `containers`)
- Namespace promotions -- Methods moved from `beta.*` to top-level namespaces (e.g. `beta.chat.completions.stream` promoted to `chat.completions.stream`; also `parse` and `runTools`)
- Parameter signature changes -- Methods where parent resource IDs were removed from the parameter list (e.g. `vectorStores.files.retrieve` no longer takes `vector_store_id` as a separate positional parameter)
Affected API Resources
The configuration covers migrations for the following resource namespaces:
- `chat.completions` -- delete, stream, parse, runTools
- `files`, `models` -- delete
- `fineTuning.checkpoints.permissions` -- delete (with parameter changes)
- `vectorStores`, `vectorStores.files`, `vectorStores.fileBatches` -- multiple methods with parameter signature changes
- `beta.assistants`, `beta.threads`, `beta.threads.runs`, `beta.threads.runs.steps`, `beta.threads.messages` -- delete, retrieve, update, cancel, submitToolOutputs, list
- `responses`, `evals`, `evals.runs`, `evals.runs.outputItems` -- delete, retrieve, cancel, list
- `containers`, `containers.files`, `containers.files.content` -- delete, retrieve
- `skills.versions`, `skills.versions.content` -- retrieve, delete
Code Reference
Source Location
- Repository: openai-node
- File: bin/migration-config.json
- Lines: 1038