Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/config/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,13 @@ export const chatgptApiModelKeys = [
'chatgptApi35_0125',
'chatgptApi4o_128k',
'chatgptApi5Latest',
'chatgptApi5',
'chatgptApi5_1Latest',
'chatgptApi5_1',
'chatgptApi5_2Latest',
'chatgptApi5_2',
'chatgptApi5_3Latest',
'chatgptApi5_4',
Comment on lines 59 to +60
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.

'chatgptApi4oMini',
'chatgptApi4_8k',
'chatgptApi4_8k_0613',
Expand Down Expand Up @@ -246,9 +250,13 @@ export const Models = {
desc: 'ChatGPT (GPT-4-Turbo 128k 0125 Preview)',
},
chatgptApi5Latest: { value: 'gpt-5-chat-latest', desc: 'ChatGPT (ChatGPT-5 latest)' },
chatgptApi5: { value: 'gpt-5', desc: 'ChatGPT (GPT-5)' },
chatgptApi5_1Latest: { value: 'gpt-5.1-chat-latest', desc: 'ChatGPT (ChatGPT-5.1 latest)' },
chatgptApi5_1: { value: 'gpt-5.1', desc: 'ChatGPT (GPT-5.1)' },
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.


chatgptApi4_1: { value: 'gpt-4.1', desc: 'ChatGPT (GPT-4.1)' },
chatgptApi4_1_mini: { value: 'gpt-4.1-mini', desc: 'ChatGPT (GPT-4.1 mini)' },
Expand Down
4 changes: 4 additions & 0 deletions tests/unit/config/config-predicates.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ test('getNavigatorLanguage treats zh-Hant locale as zhHant', () => {

test('isUsingChatgptApiModel detects chatgpt API models and excludes custom model', () => {
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)
Comment on lines 67 to +71

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.`);
}

assert.equal(isUsingChatgptApiModel({ modelName: 'customModel' }), false)
})

Expand Down
7 changes: 7 additions & 0 deletions tests/unit/utils/model-name-convert.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ test('modelNameToDesc returns desc for a known model name without t function', (
assert.equal(desc, 'ChatGPT (Web)')
})

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)')
})
Comment on lines +120 to +125

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.`);
}
})


test('modelNameToDesc appends extraCustomModelName for customModel', () => {
const desc = modelNameToDesc('customModel', null, 'my-gpt')
assert.equal(desc, 'Custom Model (my-gpt)')
Expand Down