use-cases/api-integration-migrations.md +97 −0 added
1# Upgrade your API integration | Codex use cases
2
3[← All use cases](https://developers.openai.com/codex/use-cases)
4
5Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/api-integration-migrations/?export=pdf)
6
7Use Codex to update your existing OpenAI API integration to the latest recommended models and API features, while checking for regressions before you ship.
8
9Intermediate
10
111h
12
13Related links
14
15[Latest model guide](https://developers.openai.com/api/docs/guides/latest-model) [Prompt guidance](https://developers.openai.com/api/docs/guides/prompt-guidance) [OpenAI Docs MCP](/learn/docs-mcp) [Evals guide](https://developers.openai.com/api/docs/guides/evals)
16
17## Best for
18
19 - Teams upgrading from older models or API surfaces
20 - Repos that need behavior-preserving migrations with explicit validation
21
22## Skills & Plugins
23
24- [OpenAI Docs](https://github.com/openai/skills/tree/main/skills/.curated/openai-docs)
25
26 Pull the current model, migration, and API guidance before Codex makes edits to your implementation.
27
28| Skill | Why use it |
29| --- | --- |
30| [OpenAI Docs](https://github.com/openai/skills/tree/main/skills/.curated/openai-docs) | Pull the current model, migration, and API guidance before Codex makes edits to your implementation. |
31
32## Starter prompt
33
34Use $openai-docs to upgrade this OpenAI integration to the latest recommended model and API features.
35Specifically, look for the latest model and prompt guidance for this specific model.
36 Requirements:
37- Start by inventorying the current models, endpoints, and tool assumptions in the repo.
38- Identify the smallest migration plan that gets us onto the latest supported path.
39 - Preserve behavior unless a change is required by the new API or model.
40 - Update prompts using the latest model prompt guidance.
41- Call out any prompt, tool, or response-shape changes we need to review manually.
42
43Use $openai-docs to upgrade this OpenAI integration to the latest recommended model and API features.
44Specifically, look for the latest model and prompt guidance for this specific model.
45 Requirements:
46- Start by inventorying the current models, endpoints, and tool assumptions in the repo.
47- Identify the smallest migration plan that gets us onto the latest supported path.
48 - Preserve behavior unless a change is required by the new API or model.
49 - Update prompts using the latest model prompt guidance.
50- Call out any prompt, tool, or response-shape changes we need to review manually.
51
52## Introduction
53
54As we release new models and API features, we recommend upgrading your integration to benefit from the latest improvements.
55Changing from one model to another is often not as simple as just updating the model name.
56
57There might be changes to the API–for example, for the GPT-5.4 model, we added a new `phase` parameter to the assistant message that is important to include in your integration–but most importantly, model behavior can be different and require changes to your existing prompts.
58
59When migrating to a new model, you should make sure to not only make the necessary code changes, but also evaluate the impact on your workflows.
60
61## Leverage the OpenAI Docs skill
62
63All the specifics about the new API features and model behavior are documented in our docs, in the [latest model](https://developers.openai.com/api/docs/guides/latest-model) and [prompt guidance](https://developers.openai.com/api/docs/guides/prompt-guidance) guides.
64
65The OpenAI Docs skill also includes [specific guidance](https://github.com/openai/codex/blob/6323f0104d17d211029faab149231ba787f7da37/codex-rs/skills/src/assets/samples/openai-docs/references/upgrading-to-gpt-5p4.md) as reference, codifying how to upgrade to the latest model–currently [GPT-5.4](https://developers.openai.com/api/docs/models/gpt-5.4).
66
67Codex now automatically comes with the OpenAI Docs skill, so make sure to mention it in your prompt to access all the latest documentation and guidance when building with the OpenAI API.
68
69## Build a robust evals pipeline
70
71Codex can automatically update your prompts based on the latest prompt guidance, but you should have a way to automate verifying your integration is working as expected.
72
73Make sure to build an evals pipeline that you can run every time you make changes to your integration, to verify there is no regression in behavior.
74
75This [cookbook guide](https://developers.openai.com/cookbook/examples/evaluation/building_resilient_prompts_using_an_evaluation_flywheel) covers in detail how to do this using our [Evals API](https://developers.openai.com/api/docs/guides/evals).
76
77## Related use cases
78
79[
80
81### Add Mac telemetry
82
83Use Codex and the Build macOS Apps plugin to add a few high-signal `Logger` events around...
84
85macOS Code](https://developers.openai.com/codex/use-cases/macos-telemetry-logs)[
86
87### Create a CLI Codex can use
88
89Ask Codex to create a composable CLI it can run from any folder, combine with repo scripts...
90
91Engineering Code](https://developers.openai.com/codex/use-cases/agent-friendly-clis)[
92
93### Create browser-based games
94
95Use Codex to turn a game brief into first a well-defined plan, and then a real browser-based...
96
97Engineering Code](https://developers.openai.com/codex/use-cases/browser-games)