Skip to content

Comments

feat(model): update default model to codex 5.3#110

Merged
tuannvm merged 2 commits intomainfrom
feat/codex-5.3
Feb 6, 2026
Merged

feat(model): update default model to codex 5.3#110
tuannvm merged 2 commits intomainfrom
feat/codex-5.3

Conversation

@tuannvm
Copy link
Owner

@tuannvm tuannvm commented Feb 6, 2026

Summary

Changes

Testing

  • Tests pass locally
  • New tests added (if applicable)

Related Issues

Summary by CodeRabbit

  • New Features

    • Default model updated to GPT-5.3-Codex for improved results
    • Reasoning effort options expanded to include "none" and "xhigh"
  • Documentation

    • Added comprehensive roadmap documenting planned features (Steer Mode, Collaboration Mode, Personality Mode) with priorities and statuses
    • Added user-facing guidance listing available models and model-selection notes

Signed-off-by: Tommy Nguyen <tuannvm@hotmail.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 6, 2026

Walkthrough

Updates the default Codex model to gpt-5.3-codex, centralizes model configuration/constants and descriptions, adjusts handler lookup to use the new constants/env var, updates tests to expect the new default, and adds a new docs/TODO.md describing unimplemented features and v1.3.4 notes.

Changes

Cohort / File(s) Summary
Documentation
docs/TODO.md
Adds a comprehensive TODO documenting unimplemented Codex CLI v0.98.0 features, implemented v1.3.4 items (default model change, reasoning effort options), and future considerations.
Model config & types
src/types.ts
Adds DEFAULT_CODEX_MODEL = 'gpt-5.3-codex', CODEX_DEFAULT_MODEL_ENV_VAR, AVAILABLE_CODEX_MODELS, and getModelDescription() to centralize model defaults, availability, and descriptions (new exported constants/util).
Tool definitions
src/tools/definitions.ts
Replaces hardcoded model description strings with calls to getModelDescription('codex') / getModelDescription('review') for dynamic descriptions.
Tool handlers
src/tools/handlers.ts
Changes model selection logic to use `model
Tests
src/__tests__/*
context-building.test.ts, default-model.test.ts, edge-cases.test.ts, error-scenarios.test.ts, index.test.ts, model-selection.test.ts, resume-functionality.test.ts
Updates test expectations and comments to reference gpt-5.3-codex instead of gpt-5.2-codex. Mostly string/comment updates; no logic changes.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 We hopped from 5.2 to shiny 5.3,
Constants sprouted where strings used to be,
Descriptions now tell which models roam,
Tests all chirp in their new comfy home,
A little rabbit cheers — tidy code, happy tree! 🌿

🚥 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 pull request title accurately describes the primary change: updating the default Codex model from version 5.2 to 5.3, which is reflected across all modified files including constants, tests, and tool definitions.
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 docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/codex-5.3

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

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/__tests__/default-model.test.ts (1)

31-41: ⚠️ Potential issue | 🟠 Major

CODEX_DEFAULT_MODEL is not cleared in beforeEach, risking test pollution.

Tests at Lines 43–131 assert the hardcoded default 'gpt-5.3-codex', but they'll break if CODEX_DEFAULT_MODEL is set in the environment (or leaks from a prior test). The env-var-specific tests (Lines 133–179) use try/finally, but beforeEach should still clean up for full isolation.

Suggested fix
   beforeEach(() => {
     sessionStorage = new InMemorySessionStorage();
     handler = new CodexToolHandler(sessionStorage);
     mockedExecuteCommand.mockClear();
     mockedExecuteCommand.mockResolvedValue({
       stdout: 'Test response',
       stderr: '',
     });
     process.env.STRUCTURED_CONTENT_ENABLED = '1';
     delete process.env.CODEX_MCP_CALLBACK_URI;
+    delete process.env.CODEX_DEFAULT_MODEL;
   });
src/__tests__/resume-functionality.test.ts (1)

31-37: ⚠️ Potential issue | 🟠 Major

Same env-var isolation gap: CODEX_DEFAULT_MODEL not cleared in beforeEach.

Same concern as in default-model.test.ts — tests asserting the hardcoded default (Lines 54, 159, 185) will fail if CODEX_DEFAULT_MODEL leaks from the environment.

Suggested fix
   beforeEach(() => {
     sessionStorage = new InMemorySessionStorage();
     handler = new CodexToolHandler(sessionStorage);
     mockedExecuteCommand.mockClear();
     process.env.STRUCTURED_CONTENT_ENABLED = '1';
     delete process.env.CODEX_MCP_CALLBACK_URI;
+    delete process.env.CODEX_DEFAULT_MODEL;
   });
🤖 Fix all issues with AI agents
In `@src/tools/handlers.ts`:
- Around line 1-4: Run Prettier on the file to fix the formatting error reported
by CI: reformat the import block that includes TOOLS, DEFAULT_CODEX_MODEL, and
CODEX_DEFAULT_MODEL_ENV_VAR (and the rest of src/tools/handlers.ts) using your
project's Prettier config (e.g., run prettier --write) so the import list and
surrounding whitespace match the project's style, then stage and commit the
resulting changes.
🧹 Nitpick comments (5)
src/__tests__/error-scenarios.test.ts (1)

158-164: Consider importing DEFAULT_CODEX_MODEL instead of hardcoding 'gpt-5.3-codex'.

Since this PR centralizes the default model into DEFAULT_CODEX_MODEL in src/types.ts, these test expectations could import and use that constant. This would eliminate the need to update every test file on the next model bump. The same applies to similar hardcoded expectations in model-selection.test.ts, context-building.test.ts, edge-cases.test.ts, and index.test.ts.

♻️ Example refactor for this file
+import { DEFAULT_CODEX_MODEL } from '../types.js';
+
 // ... in the test:
     expect(mockedExecuteCommand).toHaveBeenCalledWith('codex', [
       'exec',
       '--model',
-      'gpt-5.3-codex',
+      DEFAULT_CODEX_MODEL,
       '--skip-git-repo-check',
       longPrompt,
     ]);
src/tools/definitions.ts (1)

102-105: Review tool description omits the available models list.

The getModelDescription('review') returns only the default model info, while getModelDescription('codex') includes the available options. Since both tools reference the same AVAILABLE_CODEX_MODELS and DEFAULT_CODEX_MODEL constants, consider including the options list in the review description for consistency.

src/types.ts (2)

19-29: Consider validating model against AVAILABLE_CODEX_MODELS in the Zod schemas.

AVAILABLE_CODEX_MODELS is declared for documentation/reference, but the model field in CodexToolSchema (Line 102) and ReviewToolSchema (Line 117) is z.string().optional() — any string is accepted. If the intent is to guide users toward valid models while still allowing arbitrary strings, the current approach is fine. Otherwise, you could use z.enum(AVAILABLE_CODEX_MODELS).optional() for compile-time and runtime validation.

This is purely a design consideration — no action needed if flexibility is intentional.


31-38: Inconsistent detail between codex and review descriptions.

The 'codex' branch lists all available models, while the 'review' branch only mentions the default. If users of the review tool also benefit from seeing available options, consider including modelList in both branches.

Suggested change
   if (toolType === 'codex') {
     return `Specify which model to use (defaults to ${DEFAULT_CODEX_MODEL}). Options: ${modelList}`;
   }
-  return `Specify which model to use for the review (defaults to ${DEFAULT_CODEX_MODEL})`;
+  return `Specify which model to use for the review (defaults to ${DEFAULT_CODEX_MODEL}). Options: ${modelList}`;
 };
src/__tests__/resume-functionality.test.ts (1)

215-216: Fragile positional index for extracting the prompt argument.

call?.[1]?.[4] relies on exact argument ordering. If the command construction in the handler changes (e.g., a new flag is inserted), this silently reads the wrong value. Consider using Array.find or .includes() for a more resilient assertion, or at least assert the full args array.

This is pre-existing, not introduced by this PR, so no action required now.

Comment on lines 1 to +4
import {
TOOLS,
DEFAULT_CODEX_MODEL,
CODEX_DEFAULT_MODEL_ENV_VAR,
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix Prettier formatting to unblock CI.

The pipeline reports a Prettier style issue. Run prettier --write on this file to resolve.

🧰 Tools
🪛 GitHub Actions: CI

[warning] 1-1: Code style issues found by Prettier. Run 'prettier --write' to fix.

🤖 Prompt for AI Agents
In `@src/tools/handlers.ts` around lines 1 - 4, Run Prettier on the file to fix
the formatting error reported by CI: reformat the import block that includes
TOOLS, DEFAULT_CODEX_MODEL, and CODEX_DEFAULT_MODEL_ENV_VAR (and the rest of
src/tools/handlers.ts) using your project's Prettier config (e.g., run prettier
--write) so the import list and surrounding whitespace match the project's
style, then stage and commit the resulting changes.

Signed-off-by: Tommy Nguyen <tuannvm@hotmail.com>
@tuannvm tuannvm merged commit 420cb81 into main Feb 6, 2026
6 of 7 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