Skip to content

feat(llm): add gpt-5.2-codex to verified models#1893

Merged
juanmichelini merged 1 commit intoOpenHands:mainfrom
juanmichelini:add-gpt-5.2-codex-support
Feb 4, 2026
Merged

feat(llm): add gpt-5.2-codex to verified models#1893
juanmichelini merged 1 commit intoOpenHands:mainfrom
juanmichelini:add-gpt-5.2-codex-support

Conversation

@juanmichelini
Copy link
Collaborator

Add gpt-5.2-codex to both VERIFIED_OPENAI_MODELS and VERIFIED_OPENHANDS_MODELS to enable support in the OpenHands provider interface.

Changes

  • Added gpt-5.2-codex to VERIFIED_OPENAI_MODELS
  • Added gpt-5.2-codex to VERIFIED_OPENHANDS_MODELS
  • Added comprehensive tests for gpt-5.2-codex:
    • Prompt cache retention support
    • Reasoning effort support
    • Responses API support

This completes the gpt-5.2 family support alongside the existing gpt-5.2 model.

Related to OpenHands/OpenHands#12720

Add gpt-5.2-codex to both VERIFIED_OPENAI_MODELS and VERIFIED_OPENHANDS_MODELS
to enable support in the OpenHands provider interface.

Also add comprehensive tests for gpt-5.2-codex:
- Prompt cache retention support
- Reasoning effort support
- Responses API support

This completes the gpt-5.2 family support alongside the existing gpt-5.2 model.

Related to OpenHands/OpenHands#12720

Co-authored-by: openhands <[email protected]>
@juanmichelini juanmichelini requested a review from enyst February 4, 2026 02:55
@juanmichelini juanmichelini marked this pull request as ready for review February 4, 2026 02:55
Copy link
Collaborator

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review complete. Found one ordering inconsistency between the two verified model lists that should be addressed for maintainability. Test coverage looks comprehensive.

"gpt-5.2-codex",
"gpt-5.1-codex-max",
"gpt-5.1-codex",
"gpt-5.1",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Important: Model ordering is inconsistent between VERIFIED_OPENAI_MODELS and VERIFIED_OPENHANDS_MODELS.

In VERIFIED_OPENAI_MODELS (lines 2-6):

  • gpt-5.2
  • gpt-5.2-codex
  • gpt-5.1 ← base model comes before codex variants
  • gpt-5.1-codex-max
  • gpt-5.1-codex

In VERIFIED_OPENHANDS_MODELS (lines 49-53):

  • gpt-5.2
  • gpt-5.2-codex
  • gpt-5.1-codex-max ← codex variants come before base model
  • gpt-5.1-codex
  • gpt-5.1

This inconsistency could lead to maintenance confusion. Consider reordering VERIFIED_OPENHANDS_MODELS to match the pattern in VERIFIED_OPENAI_MODELS for consistency.

@@ -1,5 +1,6 @@
VERIFIED_OPENAI_MODELS = [
"gpt-5.2",
"gpt-5.2-codex",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Suggestion: The gpt-5.1 family includes gpt-5.1-codex-max (line 5). Should the gpt-5.2 family also include gpt-5.2-codex-max for consistency?

If this variant does not exist in the OpenAI API, this is fine. Otherwise, consider adding it for completeness.

("gemini-3-flash-preview", True),
# GPT-5 family
("gpt-5.2", True),
("gpt-5.2-codex", True),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Nit: Excellent test coverage! The new model is tested across all three feature areas:

  • Reasoning effort support (line 41)
  • Responses API support (line 229)
  • Extended retention support (line 264)

This ensures feature parity with gpt-5.2.

@juanmichelini juanmichelini merged commit 6092a7e into OpenHands:main Feb 4, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants