Skip to content

Add GPT-5 ~ GPT-5.4 stable models#948

Merged
PeterDaveHello merged 1 commit intoChatGPTBox-dev:masterfrom
PeterDaveHello:Add-GPT-5-Stable-Models
Mar 6, 2026
Merged

Add GPT-5 ~ GPT-5.4 stable models#948
PeterDaveHello merged 1 commit intoChatGPTBox-dev:masterfrom
PeterDaveHello:Add-GPT-5-Stable-Models

Conversation

@PeterDaveHello
Copy link
Member

@PeterDaveHello PeterDaveHello commented Mar 5, 2026

Add built-in ChatGPT API presets for gpt-5, gpt-5.1, gpt-5.2, and gpt-5.4 alongside the existing chat-latest entries.

Summary by CodeRabbit

  • New Features

    • Added support for new ChatGPT API model variants: GPT-5, GPT-5.1, GPT-5.2, and GPT-5.4. These additional model options are now available for selection and integration.
  • Tests

    • Expanded test coverage to validate the new model variants and their proper configuration handling.

Add built-in ChatGPT API presets for gpt-5, gpt-5.1, gpt-5.2, and
gpt-5.4 alongside the existing chat-latest entries.
@PeterDaveHello PeterDaveHello requested a review from Copilot March 5, 2026 21:08
@qodo-code-review
Copy link
Contributor

Review Summary by Qodo

Add GPT-5 stable model presets (5, 5.1, 5.2, 5.4)

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Add GPT-5, GPT-5.1, GPT-5.2, GPT-5.4 stable model presets
• Register new models in configuration and model keys array
• Add unit tests for new GPT-5 stable model detection
• Add unit tests for GPT-5 stable model name descriptions
Diagram
flowchart LR
  A["Config Index"] -->|"Add 4 new model entries"| B["Models Object"]
  A -->|"Register in model keys"| C["chatgptApiModelKeys Array"]
  B -->|"Enable detection"| D["Config Predicates Tests"]
  B -->|"Enable descriptions"| E["Model Name Convert Tests"]
Loading

Grey Divider

File Changes

1. src/config/index.mjs ⚙️ Configuration changes +8/-0

Register GPT-5 stable model presets in configuration

• Add 4 new stable GPT-5 model entries: chatgptApi5, chatgptApi5_1, chatgptApi5_2,
 chatgptApi5_4
• Map each model to corresponding API values: gpt-5, gpt-5.1, gpt-5.2, gpt-5.4
• Register all new models in chatgptApiModelKeys array for proper detection
• Maintain consistent naming pattern with existing latest model variants

src/config/index.mjs


2. tests/unit/config/config-predicates.test.mjs 🧪 Tests +4/-0

Test GPT-5 stable model detection in predicates

• Add 4 test assertions for new GPT-5 stable models in isUsingChatgptApiModel test
• Verify chatgptApi5, chatgptApi5_1, chatgptApi5_2, chatgptApi5_4 are correctly detected as
 ChatGPT API models

tests/unit/config/config-predicates.test.mjs


3. tests/unit/utils/model-name-convert.test.mjs 🧪 Tests +7/-0

Test GPT-5 stable model name descriptions

• Add new test case for GPT-5 stable model name descriptions
• Verify modelNameToDesc returns correct descriptions for all 4 new models
• Ensure descriptions match configuration: ChatGPT (GPT-5), ChatGPT (GPT-5.1), etc.

tests/unit/utils/model-name-convert.test.mjs


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Mar 5, 2026

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Remediation recommended

1. GPT-5.3 stable missing 🐞 Bug ✓ Correctness
Description
The configuration adds stable presets for 5/5.1/5.2/5.4 but leaves 5.3 as “chat-latest” only,
creating inconsistent version coverage and possibly conflicting with the PR title’s “GPT-5 ~ GPT-5.4
stable models” wording. If unintentional, users cannot pick a stable GPT‑5.3 preset even though
adjacent versions have stable options.
Code

src/config/index.mjs[R258-259]

  chatgptApi5_3Latest: { value: 'gpt-5.3-chat-latest', desc: 'ChatGPT (ChatGPT-5.3 latest)' },
+  chatgptApi5_4: { value: 'gpt-5.4', desc: 'ChatGPT (GPT-5.4)' },
Evidence
Models defines stable presets for 5/5.1/5.2 and adds 5.4 stable, but only defines
chatgptApi5_3Latest for 5.3 (no chatgptApi5_3 stable). The API model key list mirrors this: it
includes chatgptApi5, chatgptApi5_1, chatgptApi5_2, chatgptApi5_4, but not chatgptApi5_3.
This demonstrates the gap in the stable preset series.

src/config/index.mjs[47-71]
src/config/index.mjs[252-260]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The PR introduces stable presets for GPT-5/5.1/5.2/5.4 but leaves GPT-5.3 without a stable preset (`chatgptApi5_3`), even though `chatgptApi5_3Latest` exists. This creates inconsistent version coverage and may conflict with the PR title’s implied range.

### Issue Context
Model presets are driven by `chatgptApiModelKeys` and the `Models` map. Adding a missing stable preset requires updating both, plus updating unit tests that validate descriptions/predicates.

### Fix Focus Areas
- src/config/index.mjs[47-71]
- src/config/index.mjs[252-260]
- tests/unit/config/config-predicates.test.mjs[66-73]
- tests/unit/utils/model-name-convert.test.mjs[120-125]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the application's model configuration by integrating new stable versions of the GPT-5 series, specifically GPT-5, GPT-5.1, GPT-5.2, and GPT-5.4. This update provides users with more granular control and access to specific model iterations, ensuring the system accurately recognizes and describes these new AI capabilities. The changes are supported by corresponding unit tests to maintain code integrity and functionality.

Highlights

  • New GPT-5 Models Added: Introduced stable versions of GPT-5, GPT-5.1, GPT-5.2, and GPT-5.4 models, expanding the available ChatGPT API presets.
  • Configuration Update: Updated the chatgptApiModelKeys array and the Models object in src/config/index.mjs to include the new GPT-5 stable model definitions.
  • Unit Test Coverage: Added new unit tests to ensure that the isUsingChatgptApiModel predicate correctly identifies the new GPT-5 stable models and that modelNameToDesc returns the appropriate descriptions for them.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/config/index.mjs
    • Added new model keys for GPT-5, GPT-5.1, GPT-5.2, and GPT-5.4 to the chatgptApiModelKeys array.
    • Defined new Models entries with their respective values and descriptions for the stable GPT-5, GPT-5.1, GPT-5.2, and GPT-5.4 models.
  • tests/unit/config/config-predicates.test.mjs
    • Added assertions to verify that isUsingChatgptApiModel correctly identifies the newly introduced GPT-5, GPT-5.1, GPT-5.2, and GPT-5.4 stable models.
  • tests/unit/utils/model-name-convert.test.mjs
    • Introduced a new test case to confirm that modelNameToDesc accurately returns descriptions for the GPT-5, GPT-5.1, GPT-5.2, and GPT-5.4 stable presets.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 5, 2026

📝 Walkthrough

Walkthrough

This PR extends the ChatGPT API model configuration by introducing four new GPT-5 variant models (gpt-5, gpt-5.1, gpt-5.2, gpt-5.4) alongside corresponding model definitions and test assertions to validate the additions.

Changes

Cohort / File(s) Summary
Configuration
src/config/index.mjs
Added four new ChatGPT API model keys (chatgptApi5, chatgptApi5_1, chatgptApi5_2, chatgptApi5_4) to the chatgptApiModelKeys array and introduced corresponding public model definitions in the Models object with descriptive labels for each GPT-5 variant.
Config Predicate Tests
tests/unit/config/config-predicates.test.mjs
Expanded unit test coverage for isUsingChatgptApiModel predicate with four new assertions validating that the newly added GPT-5 model identifiers are correctly recognized as ChatGPT API models.
Model Name Conversion Tests
tests/unit/utils/model-name-convert.test.mjs
Added a new test case with four assertions verifying that GPT-5 model names map correctly to their expected descriptive labels via the modelNameToDesc function.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

Review effort 2/5

Suggested reviewers

  • kmk142789

Poem

🐰 Five little models, shiny and new,
GPT-5 variants, quite the crew!
From point-one to four-four they go,
Hopping through configs we now know.
A rabbit's delight, tests all pass,
New capabilities, first class! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly summarizes the main change: adding four new GPT-5 model variants (GPT-5, GPT-5.1, GPT-5.2, and GPT-5.4) to the configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@gemini-code-assist gemini-code-assist 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

This pull request adds support for several stable GPT-5 models, including gpt-5, gpt-5.1, gpt-5.2, and gpt-5.4, along with corresponding tests. The changes are generally good, but I've identified a few areas for improvement. There are some inconsistencies in the model definitions where gpt-5.3 is skipped and gpt-5.4 is added without its ...latest counterpart. I've also suggested refactoring the new tests to be more data-driven, which will improve their maintainability.

chatgptApi5_2Latest: { value: 'gpt-5.2-chat-latest', desc: 'ChatGPT (ChatGPT-5.2 latest)' },
chatgptApi5_2: { value: 'gpt-5.2', desc: 'ChatGPT (GPT-5.2)' },
chatgptApi5_3Latest: { value: 'gpt-5.3-chat-latest', desc: 'ChatGPT (ChatGPT-5.3 latest)' },
chatgptApi5_4: { value: 'gpt-5.4', desc: 'ChatGPT (GPT-5.4)' },

Choose a reason for hiding this comment

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

medium

Similar to the chatgptApiModelKeys array, there's a corresponding inconsistency here in the Models object. An entry for chatgptApi5_3 is missing, and chatgptApi5_4 is added without a chatgptApi5_4Latest entry. Please add these for consistency.

Comment on lines 67 to +71
assert.equal(isUsingChatgptApiModel({ modelName: 'chatgptApi4oMini' }), true)
assert.equal(isUsingChatgptApiModel({ modelName: 'chatgptApi5' }), true)
assert.equal(isUsingChatgptApiModel({ modelName: 'chatgptApi5_1' }), true)
assert.equal(isUsingChatgptApiModel({ modelName: 'chatgptApi5_2' }), true)
assert.equal(isUsingChatgptApiModel({ modelName: 'chatgptApi5_4' }), true)

Choose a reason for hiding this comment

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

medium

To improve readability and make it easier to add more models in the future, you could refactor these repeated assertions into a loop. This avoids repeating assert.equal for each model and makes the test more maintainable.

Suggested change
assert.equal(isUsingChatgptApiModel({ modelName: 'chatgptApi4oMini' }), true)
assert.equal(isUsingChatgptApiModel({ modelName: 'chatgptApi5' }), true)
assert.equal(isUsingChatgptApiModel({ modelName: 'chatgptApi5_1' }), true)
assert.equal(isUsingChatgptApiModel({ modelName: 'chatgptApi5_2' }), true)
assert.equal(isUsingChatgptApiModel({ modelName: 'chatgptApi5_4' }), true)
const modelsToTest = ['chatgptApi4oMini', 'chatgptApi5', 'chatgptApi5_1', 'chatgptApi5_2', 'chatgptApi5_4'];
for (const modelName of modelsToTest) {
assert.equal(isUsingChatgptApiModel({ modelName }), true, `Model ${modelName} should be detected as a ChatGPT API model.`);
}

Comment on lines +120 to +125
test('modelNameToDesc returns desc for GPT-5 stable presets', () => {
assert.equal(modelNameToDesc('chatgptApi5'), 'ChatGPT (GPT-5)')
assert.equal(modelNameToDesc('chatgptApi5_1'), 'ChatGPT (GPT-5.1)')
assert.equal(modelNameToDesc('chatgptApi5_2'), 'ChatGPT (GPT-5.2)')
assert.equal(modelNameToDesc('chatgptApi5_4'), 'ChatGPT (GPT-5.4)')
})

Choose a reason for hiding this comment

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

medium

This is a good test case. To make it more concise and easier to extend with more models in the future, consider using a data-driven approach. You can iterate over a map of model names to their expected descriptions.

Suggested change
test('modelNameToDesc returns desc for GPT-5 stable presets', () => {
assert.equal(modelNameToDesc('chatgptApi5'), 'ChatGPT (GPT-5)')
assert.equal(modelNameToDesc('chatgptApi5_1'), 'ChatGPT (GPT-5.1)')
assert.equal(modelNameToDesc('chatgptApi5_2'), 'ChatGPT (GPT-5.2)')
assert.equal(modelNameToDesc('chatgptApi5_4'), 'ChatGPT (GPT-5.4)')
})
test('modelNameToDesc returns desc for GPT-5 stable presets', () => {
const models = {
chatgptApi5: 'ChatGPT (GPT-5)',
chatgptApi5_1: 'ChatGPT (GPT-5.1)',
chatgptApi5_2: 'ChatGPT (GPT-5.2)',
chatgptApi5_4: 'ChatGPT (GPT-5.4)',
};
for (const [modelName, expectedDesc] of Object.entries(models)) {
assert.equal(modelNameToDesc(modelName), expectedDesc, `Description for ${modelName} is incorrect.`);
}
})

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/config/index.mjs`:
- Around line 59-60: Add the missing stable GPT‑5.3 model entry to the Models
object and include its key in chatgptApiModelKeys: insert a new Models entry
with key chatgptApi5_3 and value { value: 'gpt-5.3', desc: 'ChatGPT (GPT-5.3)' }
and add 'chatgptApi5_3' into the chatgptApiModelKeys array immediately after
'chatgptApi5_2' and before 'chatgptApi5_3Latest' so the stable and -Latest
variants are paired.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9ada50ea-d3c0-44c2-b9d8-f8a636753d71

📥 Commits

Reviewing files that changed from the base of the PR and between af20a11 and 5253590.

📒 Files selected for processing (3)
  • src/config/index.mjs
  • tests/unit/config/config-predicates.test.mjs
  • tests/unit/utils/model-name-convert.test.mjs

Comment on lines 59 to +60
'chatgptApi5_3Latest',
'chatgptApi5_4',
Copy link
Contributor

@coderabbitai coderabbitai bot Mar 5, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's examine the src/config/index.mjs file to see the models around lines 59-60
cd /repo && head -n 270 src/config/index.mjs | tail -n +50 | head -n 70

Repository: ChatGPTBox-dev/chatGPTBox

Length of output: 124


🌐 Web query:

OpenAI GPT-5 model versions available stable release 2026

💡 Result:

As of March 5, 2026, the stable GPT‑5 family model versions you can use are:

OpenAI API (developer model IDs)

  • gpt-5.4 and gpt-5.4-pro (released March 5, 2026) [1]
  • gpt-5.2 and gpt-5.2-pro (still listed as API models/pricing) [1]
  • gpt-5.3-chat-latest (GPT‑5.3 Instant in the API) [2]

ChatGPT (end-user model names)

  • GPT‑5.3 Instant (released March 3, 2026) [2]
  • GPT‑5.4 Thinking and GPT‑5.4 Pro (rolled out starting March 5, 2026) [1]
  • GPT‑5.2 is the default model for new messages since February 13, 2026 (and older “GPT‑5 Instant/Thinking” were retired from ChatGPT on that date). [3]

Sources: [1] [2] [3]


🏁 Script executed:

git ls-files src/config/index.mjs

Repository: ChatGPTBox-dev/chatGPTBox

Length of output: 89


🏁 Script executed:

# Get the actual content of the file around the flagged lines
head -n 270 src/config/index.mjs | tail -n +50

Repository: ChatGPTBox-dev/chatGPTBox

Length of output: 6640


Add missing chatgptApi5_3 model entry.

GPT-5.3 Instant was released on March 3, 2026 and is available via the API. The code includes chatgptApi5_3Latest mapping to 'gpt-5.3-chat-latest' but lacks the corresponding stable chatgptApi5_3 entry, breaking the established pattern where each -Latest variant has a paired stable version.

Add chatgptApi5_3: { value: 'gpt-5.3', desc: 'ChatGPT (GPT-5.3)' } to the Models object and 'chatgptApi5_3' to the chatgptApiModelKeys array (between 'chatgptApi5_2' and 'chatgptApi5_3Latest').

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/config/index.mjs` around lines 59 - 60, Add the missing stable GPT‑5.3
model entry to the Models object and include its key in chatgptApiModelKeys:
insert a new Models entry with key chatgptApi5_3 and value { value: 'gpt-5.3',
desc: 'ChatGPT (GPT-5.3)' } and add 'chatgptApi5_3' into the chatgptApiModelKeys
array immediately after 'chatgptApi5_2' and before 'chatgptApi5_3Latest' so the
stable and -Latest variants are paired.

Copy link
Member Author

Choose a reason for hiding this comment

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

Not true.

Copy link
Contributor

Choose a reason for hiding this comment

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

Question:

Not true.

Answer:

To reduce “confident but wrong” claims like this in /improve (e.g., asserting a model/version exists or that something is “missing”), add stricter instructions that force the agent to:

  • verify against the repo code only (no web lookups),
  • cite the exact evidence (existing keys/arrays) before proposing a change,
  • use uncertainty language when it can’t prove the claim from the diff.

Add to your .pr_agent.toml (or Wiki .pr_agent.toml) something like:

[pr_code_suggestions]
extra_instructions = """\
- Do not use web queries or external knowledge (release dates/model availability). Base findings only on the PR diff and repository files provided.
- Before claiming something is missing/incorrect, quote the exact existing pattern from the code (relevant keys/arrays/sections) and explain why it violates that pattern.
- If the evidence is insufficient, do not propose a fix; ask a clarifying question or label it as a hypothesis (e.g., "might be missing").
- Avoid absolute language ("Not true", "breaking") unless you can point to a concrete reference in the code showing the failure.
"""

If this is happening under /review rather than /improve, apply the same idea under [pr_reviewer].extra_instructions.

Relevant Sources:

Copy link
Contributor

Choose a reason for hiding this comment

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

Skipped: comment is from another GitHub bot.

Copy link
Contributor

Choose a reason for hiding this comment

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

@PeterDaveHello, you're right, I apologize for the incorrect suggestion. Looking at the OpenAI documentation, GPT‑5.3 Instant is available to developers in the API as gpt-5.3-chat-latest — there is no published stable gpt-5.3 API model ID. GPT-5.4 replaces the previous gpt-5.2 model in the API, meaning GPT-5.3 was never given a standalone stable alias like the other versions. The existing chatgptApi5_3Latest entry mapping to gpt-5.3-chat-latest is the correct and complete representation. My comment was wrong.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@PeterDaveHello PeterDaveHello merged commit 3361f3e into ChatGPTBox-dev:master Mar 6, 2026
7 checks passed
@PeterDaveHello PeterDaveHello deleted the Add-GPT-5-Stable-Models branch March 6, 2026 16:45
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.

2 participants