GPT-5.4 leaves Codex on August 31: migration to GPT-5.6 Terra and Luna, pricing, limits and a safe transition checklist Skip to content

GPT-5.4 leaves Codex on August 31: migration to GPT-5.6 Terra and Luna, pricing, limits and a safe transition checklist

Verified guide to the August 31, 2026 retirement of GPT-5.4 and GPT-5.4 mini from Codex when signed in with ChatGPT. Migration to GPT-5.6 Terra and Luna, model differences, API and Codex pricing, limits, reasoning, Enterprise configuration, automations and deployment checklist.

Published Written by Reading time 16 min read

Verified guide to the August 31, 2026 retirement of GPT-5.4 and GPT-5.4 mini from Codex when signed in with ChatGPT. Migration to GPT-5.6 Terra and Luna, model differences, API and Codex pricing, limits, reasoning, Enterprise configuration, automations and deployment checklist.

On this page
  1. 1TL;DR
  2. 2What exactly is OpenAI retiring?
  3. 3The official migration map
  4. 4What is NOT affected?
  5. 5Should you still migrate API workloads from GPT-5.4?
  6. 6GPT-5.4 vs GPT-5.6 Terra
  7. 7GPT-5.4 mini vs GPT-5.6 Luna
  8. 8API price and Codex plan limits are different systems
  9. 9Business and Enterprise credit rates also change
  10. 10The most important migration trap: reasoning defaults
  11. 11Codex workspace defaults are not necessarily API defaults
  12. 12requirements.toml takes precedence over workspace defaults
  13. 13What exactly should be inventoried?
  14. 14How to find GPT-5.4 references in a repository
  15. 15Do not perform blind global search-and-replace
  16. 16Be careful with the gpt-5.6 alias
  17. 17Example API migration to Terra
  18. 18Example high-volume migration to Luna
  19. 19Do not change prompt and model at the same time
  20. 20How should reasoning be tuned after migration?
  21. 21Terra or Luna?
  22. 22When should Sol be considered instead of Terra?
  23. 23Context: Terra preserves 1.05M, Luna jumps from 400K to 1.05M
  24. 24Long context has separate API pricing consequences
  25. 25A newer knowledge cutoff does not replace tools
  26. 26GPT-5.6 availability in Codex depends on plan
  27. 27Migrating automations matters more than the visible model selector
  28. 28Enterprise: audit all three configuration layers
  29. 29How to run a useful migration eval
  30. 30One-day minimum migration plan
  31. 31What should you avoid?
  32. 32Production migration checklist
  33. 33POLPROG verdict

On August 31, 2026, OpenAI is retiring GPT-5.4 and GPT-5.4 mini from Codex for users who sign in to Codex with a ChatGPT account. The official migration path is explicit: replace GPT-5.4 with GPT-5.6 Terra, and replace GPT-5.4 mini with GPT-5.6 Luna.[1]

The most important nuance is easy to miss: this is not a retirement of GPT-5.4 from the OpenAI API. OpenAI explicitly says the change does not affect the API or Codex usage with your own API key.[1]

So the simplified statement:

GPT-5.4 was retired on August 31, 2026.

is inaccurate.

The precise version is:

GPT-5.4 and GPT-5.4 mini are being retired from Codex
when users authenticate with ChatGPT.
The API and Codex with your own API key are not affected by this change.

For teams using Codex, the work is broader than changing a model selector. OpenAI specifically tells users to update workspace defaults, saved model settings, managed configurations and automations before August 31.[1]

The migration also brings technical advantages. GPT-5.6 Terra keeps the 1,050,000-token context window of GPT-5.4, reduces standard API pricing from $2.50/$15 to $2/$12 per million input/output tokens, and has a newer knowledge cutoff. GPT-5.6 Luna is much cheaper and increases context from GPT-5.4 mini's 400K to 1.05M.[6][7][8][9]

That does not make the move a zero-risk drop-in replacement. GPT-5.6 adds max reasoning, has different documented API model defaults for reasoning, and introduces capabilities not present in the 5.4 generation. OpenAI recommends running evals on representative workloads rather than assuming identical behavior.[10]

Information status: August 31, 2026. The cited OpenAI documentation gives the retirement date but not a specific cutoff hour, so this article does not invent a local-time midnight deadline.

TL;DR

QuestionVerified answer
What happens on August 31, 2026?GPT-5.4 and GPT-5.4 mini leave Codex when signed in with ChatGPT
GPT-5.4 replacementGPT-5.6 Terra
GPT-5.4 mini replacementGPT-5.6 Luna
Does the OpenAI API lose GPT-5.4?Not as part of this change
Is Codex with your own API key affected?No
What should be audited?workspace defaults, saved model settings, managed configs, automations
Can Enterprise config enforce the model?Yes. Managed requirements.toml takes priority over workspace defaults
GPT-5.4 context1.05M
GPT-5.6 Terra context1.05M
GPT-5.4 mini context400K
GPT-5.6 Luna context1.05M
Terra/Luna max output128K
Terra/Luna knowledge cutoffFebruary 16, 2026
GPT-5.4 API price$2.50 input / $0.25 cached / $15 output per 1M tokens
Terra API price$2.00 / $0.20 / $12.00
GPT-5.4 mini API price$0.75 / $0.075 / $4.50
Luna API price$0.20 / $0.02 / $1.20
Terra/Luna reasoningnone, low, medium, high, xhigh, max
Terra/Luna documented API defaultmedium
GPT-5.4 / mini reasoningnone, low, medium, high, xhigh
GPT-5.4 / mini documented API defaultnone
Does gpt-5.6 mean Terra?No. The gpt-5.6 alias routes to GPT-5.6 Sol
Does API pricing equal Codex plan limits?No
Key migration rulechange the model, pin reasoning, run evals, then tune prompts

What exactly is OpenAI retiring?

OpenAI says GPT-5.4 and GPT-5.4 mini will no longer be available in Codex when you sign in with a ChatGPT account on August 31, 2026.[1]

Codex can be accessed through several surfaces, including:

  • the ChatGPT desktop app in Codex mode,
  • Codex CLI,
  • the Codex IDE extension,
  • Codex on the web.[1]

This should not be interpreted as a full retirement of those models across every OpenAI product.

The official migration map

OpenAI gives two explicit replacements:[1]

GPT-5.4       → GPT-5.6 Terra
GPT-5.4 mini  → GPT-5.6 Luna

This is a product-specific Codex migration mapping, not a claim that the new names map one-to-one to older architectural tiers.

OpenAI positions Terra as the GPT-5.6 model that balances intelligence and cost, and Luna as the cost-sensitive, high-volume option.[5][6][7]

What is NOT affected?

OpenAI names two unaffected scenarios:[1]

OpenAI API
Codex used with your own API key

If a production application currently calls:

gpt-5.4

through the OpenAI API, the August 31 Codex notice does not by itself mean that request stops working on that date.

The same applies to Codex used in BYOK mode.

Should you still migrate API workloads from GPT-5.4?

Possibly, but that is a separate decision.

OpenAI's current model guidance recommends the GPT-5.6 family as the current direction for new and migrated workloads. When migrating from GPT-5.4, OpenAI recommends starting with the same reasoning setting and then testing one level lower on representative tasks.[10]

The GPT-5.6 family was previewed with GPT-5.6 Sol on June 26, followed by the broader GPT-5.6 launch announced by OpenAI on July 9, 2026.[11][12]

That is optimization guidance, not an API retirement deadline.

GPT-5.4 vs GPT-5.6 Terra

ParameterGPT-5.4GPT-5.6 Terra
Context window1,050,0001,050,000
Max output128,000128,000
Knowledge cutoffAug 31, 2025Feb 16, 2026
API input / 1M$2.50$2.00
Cached input / 1M$0.25$0.20
API output / 1M$15.00$12.00
Reasoningnone, low, medium, high, xhighnone, low, medium, high, xhigh, max
Documented API default reasoningnonemedium

[6][8]

At standard token rates, Terra is 20% cheaper than GPT-5.4 for input, cached input and output.

GPT-5.4 mini vs GPT-5.6 Luna

ParameterGPT-5.4 miniGPT-5.6 Luna
Context window400,0001,050,000
Max output128,000128,000
Knowledge cutoffAug 31, 2025Feb 16, 2026
API input / 1M$0.75$0.20
Cached input / 1M$0.075$0.02
API output / 1M$4.50$1.20
Reasoningnone, low, medium, high, xhighnone, low, medium, high, xhigh, max
Documented API default reasoningnonemedium

[7][9]

Luna's standard API token rates are roughly 73% lower than GPT-5.4 mini's.

Its documented context window is also 2.625× larger.

API price and Codex plan limits are different systems

This is one of the easiest comparison mistakes to make.

A price such as:

$ / 1M tokens

is not the same metric as:

how many Codex messages do I get on Plus or Pro?

The Codex pricing page currently shows approximate local-message ranges within a five-hour usage window. In one of the plan views it lists:[2]

GPT-5.4:       20–100 local messages / 5h
GPT-5.6 Terra: 20–110 local messages / 5h
GPT-5.4 mini:  60–350 local messages / 5h
GPT-5.6 Luna:  50–280 local messages / 5h

Those are ranges, not guarantees. OpenAI says actual usage depends on task size, complexity and model, and additional weekly limits may apply.[2]

So a model can be much cheaper per API token without the bundled Codex message limit increasing in the same ratio.

Business and Enterprise credit rates also change

The current credit-based rate card for supported Work and Codex activity lists:[3]

ModelInput credits / 1MCached / 1MOutput / 1M
GPT-5.462.56.25375
GPT-5.6 Terra505300
GPT-5.4 mini18.751.875113
GPT-5.6 Luna50.530

OpenAI says these rates apply to supported Codex and Work activity and actual charges depend on token consumption.[3]

The most important migration trap: reasoning defaults

The API model pages for GPT-5.4 and GPT-5.4 mini document none as the default reasoning effort.[8][9]

The Terra and Luna model pages document medium as the default.[6][7]

If you migrate your own API workload and simultaneously:

change the model
+
do not explicitly set reasoning.effort

you may change not only the model but also latency, token use and behavioral profile.

That is why OpenAI recommends using the existing reasoning level as the initial migration baseline.[10]

Codex workspace defaults are not necessarily API defaults

Codex workspace administrators and owners can configure:

  • starting model,
  • reasoning level,
  • speed,
  • Fast Mode availability,
  • new-chat behavior.[1]

So the documented API default must not be assumed to describe every Codex session.

Managed environments should inspect their effective workspace configuration.

requirements.toml takes precedence over workspace defaults

OpenAI documents this control hierarchy for managed workspaces:[1]

managed requirements.toml
→ workspace starting defaults
→ member's local starting choice

Changing only the model default in the UI may therefore be insufficient if an enforced managed requirement still references or restricts models differently.

What exactly should be inventoried?

OpenAI explicitly lists four areas:[1]

workspace defaults
saved model settings
managed configurations
automations

In practice, POLPROG also recommends auditing:

  • local Codex profiles,
  • CLI launch scripts,
  • CI/CD,
  • team documentation,
  • project templates,
  • environment variables,
  • internal wrappers,
  • onboarding instructions.

Those additional items are practical engineering recommendations, not OpenAI requirements.

How to find GPT-5.4 references in a repository

On macOS or Linux, a useful first pass is:

rg -n --hidden \
  -g '!node_modules' \
  -g '!.git' \
  'gpt-5\.4(-mini)?|GPT-5\.4( mini)?' .

If user-level Codex configuration matters too:

rg -n 'gpt-5\.4(-mini)?' ~/.codex 2>/dev/null

This is not an official OpenAI migration command. It is a normal text audit to find hard-coded model references.

Do not perform blind global search-and-replace

Replacing:

gpt-5.4 → gpt-5.6-terra

can be correct in a model configuration.

But the same text may also appear in:

  • historical documentation,
  • snapshot tests,
  • articles,
  • logs,
  • migration examples,
  • changelogs.

Blind replacement can destroy historical meaning.

Be careful with the gpt-5.6 alias

OpenAI's current model documentation says:

gpt-5.6 → GPT-5.6 Sol

[5][10]

Therefore, if you specifically intend the official Codex replacement Terra, using:

gpt-5.6

in the API does not select Terra.

Use the explicit IDs:

gpt-5.6-terra

or:

gpt-5.6-luna

as appropriate.[6][7]

Example API migration to Terra

The August 31 Codex deadline does not require this API change. But if you intentionally migrate your API workload, pin both model and reasoning.

from openai import OpenAI

client = OpenAI()

response = client.responses.create(
    model="gpt-5.6-terra",
    reasoning={"effort": "medium"},
    input="Review this pull request and identify correctness regressions."
)

print(response.output_text)

OpenAI recommends the Responses API for GPT-5.6 reasoning, tool-calling and multi-turn workflows.[10]

Example high-volume migration to Luna

from openai import OpenAI

client = OpenAI()

response = client.responses.create(
    model="gpt-5.6-luna",
    reasoning={"effort": "low"},
    input="Classify this issue and return the owning engineering team."
)

print(response.output_text)

Luna is positioned for cost-sensitive, high-volume workloads.[7]

Do not change prompt and model at the same time

OpenAI's migration guidance recommends changing the model while keeping prompts functionally stable first, then tuning prompts based on eval results.[10]

This preserves the ability to answer:

Did the regression come from the model,
or from the prompt rewrite?

Changing everything at once destroys that baseline.

How should reasoning be tuned after migration?

A practical workflow aligned with OpenAI guidance is:[10]

old effort
→ same effort on GPT-5.6
→ repeat the eval one level lower
→ compare quality, latency and cost

GPT-5.6 supports:

none
low
medium
high
xhigh
max

Reserve max for the hardest quality-first workloads where evals show a measurable benefit.[10]

Terra or Luna?

Choose Terra if:

  • you used GPT-5.4 in Codex,
  • tasks involve multi-file changes,
  • you need a balance of capability and cost,
  • the agent follows complex instructions,
  • you need a strong general coding model.

Choose Luna if:

  • you used GPT-5.4 mini,
  • the workload is high-volume and repetitive,
  • cost and throughput matter most,
  • tasks are smaller or tightly scoped,
  • the model acts as a subagent or classifier.

This follows OpenAI's official Codex migration map and current model positioning.[1][5][6][7]

When should Sol be considered instead of Terra?

OpenAI positions GPT-5.6 Sol as the flagship model for complex professional work and coding.[5]

However, the official replacement for GPT-5.4 in the Codex retirement notice is Terra, not Sol.[1]

Moving to Sol should therefore be treated as a separate quality-versus-cost decision, not as a required migration step.

Context: Terra preserves 1.05M, Luna jumps from 400K to 1.05M

GPT-5.4 and Terra:

1.05M → 1.05M

GPT-5.4 mini and Luna:

400K → 1.05M

[6][7][8][9]

A larger context window can matter for repo-level coding, but nominal context size does not guarantee perfect whole-repository reasoning.

Teams should still test retrieval, context selection and agent behavior on real codebases.

Long context has separate API pricing consequences

For Terra and Luna, OpenAI states that prompts above 272K input tokens are priced at:

2× input price
1.5× output price

for the full request.[6][7]

A bigger context window is therefore not a reason to inject an entire monorepo without context discipline.

A newer knowledge cutoff does not replace tools

GPT-5.4 and GPT-5.4 mini:

Aug 31, 2025 cutoff

Terra and Luna:

Feb 16, 2026 cutoff

[6][7][8][9]

That improves base model recency, but it does not replace web search, repository context, file search or actual project documentation.

GPT-5.6 availability in Codex depends on plan

OpenAI's current availability documentation says:[4]

  • Free and Go receive limited Terra access through Work/Codex,
  • Plus, Pro, Business and Enterprise have broader access to the GPT-5.6 family depending on product and plan,
  • Luna is broadly available within the GPT-5.6 product family.

Exact product limits should always be checked against current pricing because those limits can change.[2][4]

Migrating automations matters more than the visible model selector

A user notices a missing model selector immediately.

An automation may run unattended:

nightly refactor
scheduled code review
maintenance task
dependency update
repository audit

If the old model is persisted in automation configuration, the issue may surface only at the next scheduled run.

That is why OpenAI explicitly lists automations among the items to update.[1]

Enterprise: audit all three configuration layers

Managed requirements

Centrally enforced and highest priority.[1]

Workspace defaults

Starting model and reasoning configured by admins.[1]

Local choice

A member's starting selection, where policy permits it.[1]

A complete audit must cover all three.

How to run a useful migration eval

Build a set of 20–50 representative tasks, for example:

  • fix a real bug,
  • refactor several files,
  • add tests,
  • migrate a dependency,
  • diagnose a regression,
  • implement a small feature,
  • review a pull request,
  • write technical documentation.

Measure:

task success rate
test pass rate
post-review corrections
diff size
out-of-scope changes
tool calls
latency
token usage
credit usage
retry rate

Do not reduce the comparison to which model “sounds smarter”.

One-day minimum migration plan

Step 1

Inventory every GPT-5.4 and GPT-5.4 mini reference.

Step 2

For Codex with ChatGPT authentication:

GPT-5.4      → GPT-5.6 Terra
GPT-5.4 mini → GPT-5.6 Luna

Step 3

Check workspace defaults and managed configuration.

Step 4

Update automations.

Step 5

Pin reasoning where behavior stability matters.

Step 6

Run smoke tests on representative repositories.

Step 7

Only then optimize reasoning, prompts and cost.

What should you avoid?

  • Do not say GPT-5.4 is “gone from the API”.
  • Do not assume gpt-5.6 means Terra.
  • Do not equate API token price with Codex plan limits.
  • Do not change model, prompt and reasoning together without a baseline.
  • Do not forget automations.
  • Do not assume a larger context window automatically means better results.
  • Do not publish an unverified retirement hour.
  • Do not present Sol as the official GPT-5.4 replacement in this Codex notice.

Production migration checklist

Inventory

  • Found all gpt-5.4 references.
  • Found all gpt-5.4-mini references.
  • Checked workspace defaults.
  • Checked saved model settings.
  • Checked managed configurations.
  • Checked automations.
  • Checked CLI scripts.
  • Checked CI/CD.

Configuration

  • Replaced GPT-5.4 with Terra for Codex/ChatGPT auth.
  • Replaced GPT-5.4 mini with Luna.
  • Checked requirements.toml.
  • Checked workspace starting model.
  • Checked reasoning level.
  • Checked Fast Mode policy.
  • Did not use gpt-5.6 alias when Terra is required.
  • Used explicit model IDs in API workloads where stability matters.

Evals

  • Preserved the old prompt as baseline.
  • Tested the same reasoning effort.
  • Tested one effort level lower.
  • Measured test pass rate.
  • Measured retry rate.
  • Measured latency.
  • Measured token usage.
  • Measured credit usage.
  • Reviewed out-of-scope changes.
  • Tested long agent sessions.

Operations

  • Updated team documentation.
  • Updated onboarding.
  • Updated repository templates.
  • Updated scheduled tasks.
  • Added post-migration error monitoring.
  • Defined a fallback model.
  • Checked current Codex pricing.
  • Checked current plan limits.

POLPROG verdict

The August 31, 2026 change matters, but it is narrower than the headline “OpenAI retires GPT-5.4” would suggest.

The facts are:

GPT-5.4 and GPT-5.4 mini
↓
retire in Codex when authenticated with ChatGPT

GPT-5.4      → GPT-5.6 Terra
GPT-5.4 mini → GPT-5.6 Luna

OpenAI API → not affected by this specific change
Codex + your own API key → not affected by this specific change

[1]

Technically, the new mapping is attractive.

Terra preserves GPT-5.4's 1.05M context window, has a newer cutoff and 20% lower standard API token prices.[6][8]

Luna raises context from GPT-5.4 mini's 400K to 1.05M and lowers standard token rates by roughly 73%.[7][9]

The operational change is more important than the model name itself.

Teams must verify:

model selection
reasoning defaults
managed policy
automations
limits
cost model
evals

The safest migration is therefore:

Change the model according to OpenAI's official mapping, keep the current prompt and reasoning level as your baseline, run evals, and only then optimize cost and latency.

That avoids turning a seemingly simple GPT-5.4 to GPT-5.6 migration into an uncontrolled simultaneous change to model, reasoning, cost, agent behavior and test outcomes.

OpenAI Codex GPT-5.4 GPT-5.4 mini GPT-5.6 Terra GPT-5.6 Luna GPT-5.6 AI coding AI model migration Codex CLI OpenAI API

Frequently asked questions

When does GPT-5.4 leave Codex?

OpenAI names August 31, 2026 as the retirement date for GPT-5.4 and GPT-5.4 mini in Codex when signed in with ChatGPT.

Is GPT-5.4 leaving the OpenAI API?

Not as part of this change. OpenAI explicitly says API access is unaffected.

Does Codex with my own API key lose GPT-5.4?

Not under this August 31 notice.

What replaces GPT-5.4 in Codex?

GPT-5.6 Terra.

What replaces GPT-5.4 mini?

GPT-5.6 Luna.

Should I replace gpt-5.4 with gpt-5.6 in the API?

Not if you specifically want Terra. The gpt-5.6 alias routes to GPT-5.6 Sol. Use gpt-5.6-terra.

Does Terra have the same context window as GPT-5.4?

Yes. Both are documented at 1.05M tokens.

Does Luna have more context than GPT-5.4 mini?

Yes. GPT-5.4 mini has 400K; Luna has 1.05M.

Is Terra cheaper than GPT-5.4 in the API?

Yes. Standard prices move from $2.50/$15 to $2/$12 per 1M input/output tokens.

Is Luna cheaper than GPT-5.4 mini?

Yes. $0.20/$1.20 versus $0.75/$4.50 per 1M input/output tokens.

Does lower API pricing mean a higher Codex message limit?

Not necessarily. Codex plan limits and API token pricing are different systems.

What about reasoning?

OpenAI recommends first preserving the existing effort, then testing one level lower.

Does GPT-5.6 support max reasoning?

Yes. Terra and Luna support none, low, medium, high, xhigh and max.

What takes highest priority in a managed Codex workspace?

Managed requirements in requirements.toml, followed by workspace starting defaults, then the member's local starting choice.

What should I update before migration?

At minimum workspace defaults, saved model settings, managed configurations and automations. In practice, also check CLI scripts, CI/CD and documentation.

Did OpenAI publish the exact shutdown hour?

The sources used here state August 31, 2026 but this article does not claim an unverified specific hour.

Sources and footnotes

  1. OpenAI Help Center, Using Codex with your ChatGPT plan, checked August 31, 2026. Official retirement notice, Terra/Luna replacement map, and clarification that the API and BYOK are unaffected.1234567891011121314151617
  2. OpenAI, Codex Pricing, checked August 31, 2026. Current Codex usage ranges and five-hour window details.123
  3. OpenAI Help Center, ChatGPT Rate Card — Business, Enterprise/Edu credit-based pricing, checked August 31, 2026.12
  4. OpenAI Help Center, GPT-5.6 in ChatGPT, checked August 31, 2026. Product and plan availability for Sol, Terra and Luna.12
  5. OpenAI API, Models, checked August 31, 2026.1234
  6. OpenAI API, GPT-5.6 Terra Model, checked August 31, 2026.12345678910
  7. OpenAI API, GPT-5.6 Luna Model, checked August 31, 2026.1234567891011
  8. OpenAI API, GPT-5.4 Model, checked August 31, 2026.123456
  9. OpenAI API, GPT-5.4 Mini Model, checked August 31, 2026.123456
  10. OpenAI API, Model guidance — GPT-5.6 migration and prompting, checked August 31, 2026.12345678
  11. OpenAI, GPT-5.6: Frontier intelligence that scales with your ambition, July 9, 2026, checked August 31, 2026.
  12. OpenAI, Previewing GPT-5.6 Sol: a next-generation model, June 26, 2026, checked August 31, 2026.

Was this helpful?

Get new articles by email

One short email per new Learning article. No spam, unsubscribe in one click.

We only use your email to send new articles. No third-party sharing.

Back to Learning