Skip to content

Models/OpenAI Codex: add gpt-5.4 forward-compat and xhigh support#36731

Closed
wsjwong wants to merge 1 commit intoopenclaw:mainfrom
wsjwong:fix/codex-gpt-5-4-xhigh-support
Closed

Models/OpenAI Codex: add gpt-5.4 forward-compat and xhigh support#36731
wsjwong wants to merge 1 commit intoopenclaw:mainfrom
wsjwong:fix/codex-gpt-5-4-xhigh-support

Conversation

@wsjwong
Copy link
Copy Markdown

@wsjwong wsjwong commented Mar 5, 2026

Summary

  • add a forward-compat catalog fallback so openai-codex/gpt-5.4 shows up in model discovery/listing when gpt-5.3-codex is available
  • add forward-compat resolution for openai-codex/gpt-5.4
  • allow xhigh thinking for openai-codex/gpt-5.4
  • include gpt-5.4 in modern-model filtering and regression coverage

Why

OpenAI Codex OAuth is already accepting gpt-5.4, but current OpenClaw builds still lag behind the upstream registry/capability tables:

  • models list does not surface openai-codex/gpt-5.4
  • configured openai-codex/gpt-5.4 can be treated as missing without forward-compat fallback
  • /thinking xhigh rejects openai-codex/gpt-5.4 even though the model works end-to-end

This makes the new Codex model harder to discover/use until the underlying registries catch up.

Validation

Targeted tests

corepack pnpm exec vitest run \
  src/agents/model-catalog.test.ts \
  src/agents/model-compat.test.ts \
  src/agents/pi-embedded-runner/model.forward-compat.test.ts \
  src/agents/pi-embedded-runner/model.test.ts \
  src/auto-reply/thinking.test.ts \
  src/commands/models/list.list-command.forward-compat.test.ts

Manual runtime verification

Validated locally against an installed OpenClaw + OpenAI Codex OAuth setup:

  • openclaw models list --all --provider openai-codex --plain surfaces openai-codex/gpt-5.4
  • openclaw agent --local --agent main --message "Reply with exactly: GPT54_OK" succeeds on openai-codex/gpt-5.4
  • openclaw agent --local --agent main --message "Reply with exactly: XHIGH_54_OK" --thinking xhigh succeeds on openai-codex/gpt-5.4

@openclaw-barnacle openclaw-barnacle bot added commands Command implementations agents Agent runtime and tooling size: S labels Mar 5, 2026
@wsjwong wsjwong changed the title Models: add OpenAI Codex gpt-5.4 forward compat Models/OpenAI Codex: add gpt-5.4 forward-compat and xhigh support Mar 5, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 5, 2026

Greptile Summary

This PR adds forward-compatibility support for openai-codex/gpt-5.4 across model discovery, resolution, and xhigh thinking, mirroring existing patterns for earlier Codex versions. The new catalog injection and XHIGH_MODEL_REFS entry are correct.

One item warrants attention:

  • Lost test regression coverage for gpt-5.3-codex in the list command: list.list-command.forward-compat.test.ts replaced the existing gpt-5.3-codex forward-compat scenario with gpt-5.4 rather than extending it. Since the gpt-5.3-codex forward-compat behavior in the list command is unchanged, the previous test case should be preserved alongside the new one to maintain proper regression coverage.

Confidence Score: 4/5

  • Safe to merge; feature implementation is solid with only a minor test coverage regression.
  • The core forward-compat logic for gpt-5.4 is correct and well-implemented. The refactored resolveOpenAICodexForwardCompatModel properly handles both gpt-5.3-codex and gpt-5.4 with appropriate template fallbacks and provider eligibility checks. The only issue is a test coverage regression: the dedicated test for gpt-5.3-codex forward-compat in the list command was replaced rather than extended, which reduces visibility into regressions for that unchanged path.
  • src/commands/models/list.list-command.forward-compat.test.ts (add back test coverage for gpt-5.3-codex scenario)

Comments Outside Diff (1)

  1. src/commands/models/list.list-command.forward-compat.test.ts, line 79-95 (link)

    The previous test verified that a configured openai-codex/gpt-5.3-codex is not marked as missing when resolveForwardCompatModel can build a fallback. That entire scenario was replaced by the parallel gpt-5.4 scenario rather than being extended.

    Since gpt-5.3-codex forward-compat behavior in the list command is unchanged, consider preserving the original test case alongside the new one to maintain regression coverage:

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Last reviewed commit: b609b0d

@wsjwong
Copy link
Copy Markdown
Author

wsjwong commented Mar 5, 2026

Closing in favor of #36590, which already covers the same openai-codex/gpt-5.4 / xhigh support plus the broader openai/gpt-5.4 work.

I also independently validated on a live local OpenClaw install that openai-codex/gpt-5.4 works end-to-end and accepts --thinking xhigh with OpenAI Codex OAuth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling commands Command implementations size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant