GPT-5.4 Migration Guide
GPT-5.4 Migration Guide
Support the phase field for GPT-5.3 Codex, GPT-5.4, and GPT-5.4 Pro
GPT-5.4 Migration Guide
Support the phase field for GPT-5.3 Codex, GPT-5.4, and GPT-5.4 Pro
GPT-5.4, GPT-5.4 Pro, and GPT-5.3 Codex introduce the
phase field on
assistant messages. This field is critical for multi-turn
agentic workflows — it tells the model whether an assistant
message is intermediate commentary or the final answer.
OpenRouter supports phase in the
Responses API.
phase is not available in the Chat Completions API.
The Chat Completions format cannot represent multiple
output items with distinct phases in a single response.
Use the Responses API for full phase support.
phase Fieldphase appears on assistant output messages and has three
possible values:
phase is only valid on assistant messages.
Do not add phase to user or system messages.
For models like gpt-5.3-codex, gpt-5.4, and
gpt-5.4-pro, correctly
preserving phase on assistant messages is required
for optimal performance. If phase metadata is dropped
when reconstructing conversation history, significant
performance degradation can occur — including early
stopping on longer-running tasks.
When using the Responses API, assistant output items
include phase. You must persist these items verbatim
and pass them back in subsequent requests.
The response will include phase on assistant output
messages:
For follow-up requests, include the assistant output
items with their phase intact:
The Chat Completions API does not support phase in
responses. A single chat completion response can only
contain one message per choice, so there is no way to
represent the separate commentary and final answer output
items that models like GPT-5.4 produce.
If you need phase support for multi-turn agentic
workflows, use the
Responses API
instead.
When building an integration with the Responses API,
persist your output items verbatim, including phase
on assistant messages:
phase, store it and send
it back on subsequent requests.phase is
only valid on assistant messages. The Responses API
will silently ignore phase on user messages.phase from
assistant messages in multi-turn conversations will
degrade model performance.phase requires the
Responses API. The Chat Completions API cannot
represent multi-phase output.Passing phase to OpenAI models that don’t support it
(like gpt-4o) is safe — OpenAI silently ignores the
field. You do not need to filter phase based on the
model.
None. The phase field is additive:
phase continue to work
on all modelsphase silently ignore it