Skip to content

feat(openai): add GPT-5.2 Codex model#107

Merged
Kamilbenkirane merged 3 commits into
mainfrom
model/gpt-5.2-codex
Jan 15, 2026
Merged

feat(openai): add GPT-5.2 Codex model#107
Kamilbenkirane merged 3 commits into
mainfrom
model/gpt-5.2-codex

Conversation

@Kamilbenkirane

Copy link
Copy Markdown
Member

Summary

  • Add GPT-5.2 Codex model with 128k max output tokens
  • Reasoning effort options: low, medium, high, xhigh
  • Supports structured outputs

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@claude

claude Bot commented Jan 15, 2026

Copy link
Copy Markdown

PR Review: feat(openai): add GPT-5.2 Codex model

Overview

This PR adds the GPT-5.2 Codex model to the OpenAI provider. The changes are minimal and follow the existing pattern in the codebase.


Code Quality and Best Practices ✅

Positive aspects:

  • Follows the existing code structure and conventions consistently
  • Properly placed in alphabetical/version order within the models list
  • Uses the same parameter pattern as other GPT-5.2 models
  • Clean, readable implementation

Observations:

  1. Parameter consistency issue: The new model uses options=["low", "medium", "high", "xhigh"] for THINKING_BUDGET, but this differs from the existing gpt-5.1-codex model (line 143-156), which includes "minimal" as an option: options=["minimal", "low", "medium", "high"].

    Recommendation: Verify whether GPT-5.2 Codex intentionally drops "minimal" or if this is an oversight. For consistency:

    • If GPT-5.2 models don't support "minimal", this is correct
    • If they do, it should be: options=["minimal", "low", "medium", "high", "xhigh"]
  2. Missing VERBOSITY parameter: The gpt-5.1-codex model includes a VERBOSITY parameter (line 152-154), but the new gpt-5.2-codex model doesn't. Is this intentional?

    Comparison:

    • gpt-5.2-pro (line 97-99): Has VERBOSITY ✅
    • gpt-5.1-codex (line 152-154): Has VERBOSITY ✅
    • gpt-5.2-codex (line 113): No VERBOSITY ❓

    Recommendation: Confirm whether GPT-5.2 Codex should support verbosity control. If it's a code-focused model that doesn't need verbosity, this is fine. Otherwise, consider adding it for consistency with other Codex models.


Potential Bugs or Issues ⚠️

Medium priority:

  • The parameter differences mentioned above could lead to inconsistent behavior between model versions
  • Users upgrading from gpt-5.1-codex to gpt-5.2-codex might expect similar parameter support

Performance Considerations ✅

No performance concerns:

  • Static model definition with no runtime overhead
  • Appropriate max_tokens constraint (128000) matches other GPT-5.2 models

Security Concerns ✅

No security issues identified:

  • Model definition is declarative and doesn't introduce security vulnerabilities
  • Parameter constraints properly define boundaries

Test Coverage ❓

Observation:

  • No tests were added for the new model
  • The existing test file (tests/unit_tests/test_models.py) focuses on registry functionality rather than model-specific tests

Recommendation:
Consider adding a test case to verify:

  • The model is properly registered
  • Parameter constraints are correctly defined
  • The model is listed in the OpenAI provider's models

Example test location: Create or update tests specific to OpenAI models that verify all models in MODELS list are valid.


Summary

Approval Status: ✅ Approve with minor suggestions

The PR is functionally correct and follows the codebase conventions. The main concerns are:

  1. Clarify whether the THINKING_BUDGET options are intentionally different from other models
  2. Confirm whether VERBOSITY parameter should be included
  3. Consider adding basic test coverage

These are minor clarifications rather than blocking issues. The code is ready to merge if the parameter differences are intentional design decisions based on OpenAI's API specifications.


Questions for the author:

  1. Can you confirm the THINKING_BUDGET options are correct per OpenAI's API docs?
  2. Is the absence of VERBOSITY intentional for the Codex variant?
  3. Do you have documentation or references for the GPT-5.2 Codex model specifications?

Kamilbenkirane and others added 2 commits January 15, 2026 09:08
- celeste-ai: 0.3.8 → 0.3.9
- celeste-text-generation: 0.3.7 → 0.3.8

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@claude

claude Bot commented Jan 15, 2026

Copy link
Copy Markdown

Code Review: Add GPT-5.2 Codex Model

Summary

This PR adds support for the GPT-5.2 Codex model with 128k max output tokens and reasoning effort options. The changes are minimal and follow the existing patterns in the codebase.


✅ Positive Observations

Code Quality & Consistency

  • The model definition follows the established pattern used by other models in the file
  • Proper use of TextGenerationParameter.THINKING_BUDGET and TextGenerationParameter.OUTPUT_SCHEMA constraints
  • Version bumps are appropriate (0.3.7 → 0.3.8 for the package, 0.3.8 → 0.3.9 for the main project)
  • Code is clean, readable, and well-structured

Follows Existing Patterns

  • The new model is consistent with gpt-5.1-codex (lines 143-157), which has a similar structure
  • Reasoning effort options align with other GPT-5.2 models in the file

🔍 Issues & Concerns

1. Inconsistent Reasoning Effort Options ⚠️

The gpt-5.2-codex model defines reasoning effort options as:

options=["low", "medium", "high", "xhigh"]

However, this is inconsistent with:

  • gpt-5.2 (lines 75-86): Uses ["minimal", "low", "medium", "high", "xhigh"]
  • gpt-5.2-pro (lines 88-102): Uses ["minimal", "low", "medium", "high", "xhigh"]
  • gpt-5.1-codex (lines 143-157): Uses ["minimal", "low", "medium", "high"]

Question: Is the omission of "minimal" intentional for the codex variant? If this is based on OpenAI's API specification, it's correct. Otherwise, consider adding "minimal" for consistency.

2. Missing VERBOSITY Parameter

The gpt-5.2-codex model does not include the VERBOSITY parameter, while:

  • gpt-5.2-pro includes VERBOSITY with options ["low", "medium", "high"]
  • gpt-5.1-codex includes VERBOSITY with options ["low", "medium", "high"]

Question: Should gpt-5.2-codex also support the VERBOSITY parameter? If codex models are intended for code generation, verbosity control might be useful.

3. Model Verification

I cannot verify if gpt-5.2-codex is an actual OpenAI model or if these are the correct parameters. Please ensure:

  • The model ID gpt-5.2-codex matches OpenAI's official documentation
  • The parameter constraints (max tokens, reasoning effort options) match the actual API specification
  • The model actually supports 128k max output tokens

🧪 Test Coverage

Missing Tests:

  • No new tests were added for the gpt-5.2-codex model
  • The existing test file (tests/unit_tests/test_models.py) tests the model registry system but doesn't validate individual model configurations

Recommendations:

  • Consider adding integration tests that validate the model can be retrieved and used correctly
  • If parameter validation is critical, add tests that verify the constraints are enforced

🔒 Security Considerations

No security concerns identified. The changes are purely declarative model definitions with no executable logic or external inputs.


⚡ Performance Considerations

No performance impact. This is a static model definition that gets loaded once at runtime.


📋 Recommendations

  1. Clarify Reasoning Effort Options: Verify if "minimal" should be included based on OpenAI's API specification for this model
  2. Consider Adding VERBOSITY: Evaluate if verbosity control is needed for consistency with other codex models
  3. Add Model Documentation: Consider documenting what makes the codex variant different from the standard models
  4. Verify Model Existence: Ensure the model ID and parameters match OpenAI's official API documentation

🎯 Overall Assessment

The code is well-written and follows existing patterns. The main concerns are:

  1. Potential inconsistency in parameter options compared to similar models
  2. Missing VERBOSITY parameter compared to gpt-5.1-codex

If these parameter differences are intentional and match OpenAI's API specification, the PR is ready to merge. Otherwise, please clarify or adjust the parameters for consistency.

@claude

claude Bot commented Jan 15, 2026

Copy link
Copy Markdown

Code Review: feat(openai): add GPT-5.2 Codex model

Overview

This PR adds the GPT-5.2 Codex model to the OpenAI provider with 128k max output tokens and reasoning effort options. The implementation follows existing patterns but has a critical inconsistency that should be addressed.


🔴 Critical Issue: Missing VERBOSITY Parameter

The new gpt-5.2-codex model is missing the VERBOSITY parameter that is present in:

  • gpt-5.2-pro (lines 97-99): Has VERBOSITY: Choice(options=["low", "medium", "high"])
  • gpt-5.1-codex (lines 152-154): Has VERBOSITY: Choice(options=["low", "medium", "high"])

According to the PR description, GPT-5.2 Codex supports "reasoning effort options: low, medium, high, xhigh" but the code implementation shows THINKING_BUDGET without VERBOSITY.

Impact: This inconsistency means:

  1. Users upgrading from gpt-5.1-codex will lose access to verbosity control
  2. The model has different capabilities than gpt-5.2-pro without clear justification
  3. The PR description mentions features not reflected in the code

Recommendation: Add the VERBOSITY parameter for consistency with other Codex and Pro models:

TextGenerationParameter.VERBOSITY: Choice(
    options=["low", "medium", "high"]
),

⚠️ Moderate Issue: THINKING_BUDGET Options Inconsistency

The THINKING_BUDGET parameter uses:

options=["low", "medium", "high", "xhigh"]

However, other GPT-5.2 models include "minimal":

  • gpt-5.2 (line 82): ["minimal", "low", "medium", "high", "xhigh"]
  • gpt-5.2-pro (line 95): ["minimal", "low", "medium", "high", "xhigh"]

While gpt-5.1-codex doesn't have "xhigh":

  • gpt-5.1-codex (line 153): ["minimal", "low", "medium", "high"]

Questions:

  1. Is the omission of "minimal" intentional for GPT-5.2 Codex based on OpenAI's API specs?
  2. If so, please document why Codex models have different reasoning effort options

✅ Positive Aspects

Code Quality:

  • Clean implementation following existing patterns
  • Proper model structure with all required fields
  • Correct MAX_TOKENS constraint (128000) matching other GPT-5.2 models
  • Appropriate version bumps (0.3.7 → 0.3.8 for package, 0.3.8 → 0.3.9 for main)

Best Practices:

  • Uses proper constraint types (Range, Choice, Schema)
  • Follows alphabetical/version ordering in the models list
  • Consistent naming conventions

🧪 Test Coverage

Observation: No tests were added for the new model.

Recommendation: Consider adding tests to verify:

  • Model is correctly registered and retrievable
  • Parameter constraints are properly enforced
  • Model can be instantiated with valid parameters

🔒 Security & Performance

Security: ✅ No security concerns - this is a declarative model definition
Performance: ✅ No performance impact - static model definition loaded once at startup


📋 Action Items

Before merging:

  1. Critical: Add VERBOSITY parameter (or document why it's intentionally omitted)
  2. Important: Clarify/document why THINKING_BUDGET options differ from other models
  3. Recommended: Verify all parameters match OpenAI's official API specification for GPT-5.2 Codex

Optional:

  • Add test coverage for the new model
  • Update documentation explaining the differences between Codex, Pro, and standard variants

🎯 Recommendation

Status: ⚠️ Request Changes

The code structure is solid, but the missing VERBOSITY parameter appears to be an oversight given:

  1. The PR description doesn't mention its removal
  2. Both gpt-5.2-pro and gpt-5.1-codex include it
  3. There's no clear reason why a Codex model wouldn't support verbosity control

Please confirm whether this omission is intentional and document the decision, or add the parameter for consistency.

@Kamilbenkirane Kamilbenkirane merged commit eaf6375 into main Jan 15, 2026
11 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.

1 participant