Add OpenAI's GPT-5.3-Codex model support (#11728)

* Add OpenAI's GPT-5.3-Codex model support

Reference:
- https://openai.com/index/introducing-gpt-5-3-codex/
- https://developers.openai.com/api/docs/models/gpt-5.3-codex

* chore: add changeset for GPT-5.3-Codex support

* fix: rename CodeAccordian to CodeAccordion in FileChangesPanel

---------

Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: Robot Tom <bot@example.com>
This commit is contained in:
Peter Dave Hello 2026-02-25 05:46:27 +08:00 committed by GitHub
parent d0e72b7b3e
commit 2541449924
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 39 additions and 3 deletions

View file

@ -0,0 +1,5 @@
---
"roo-cline": patch
---
Add OpenAI's GPT-5.3-Codex model support

View file

@ -63,6 +63,24 @@ export const openAiNativeModels = {
description:
"GPT-5.2 Codex: Our most intelligent coding model optimized for long-horizon, agentic coding tasks",
},
"gpt-5.3-codex": {
maxTokens: 128000,
contextWindow: 400000,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
promptCacheRetention: "24h",
supportsReasoningEffort: ["low", "medium", "high", "xhigh"],
reasoningEffort: "medium",
inputPrice: 1.75,
outputPrice: 14.0,
cacheReadsPrice: 0.175,
supportsTemperature: false,
tiers: [{ name: "priority", contextWindow: 400000, inputPrice: 3.5, outputPrice: 28.0, cacheReadsPrice: 0.35 }],
description:
"GPT-5.3 Codex: Our most intelligent coding model optimized for long-horizon, agentic coding tasks",
},
"gpt-5.2-chat-latest": {
maxTokens: 16_384,
contextWindow: 128_000,

View file

@ -236,6 +236,19 @@ describe("OpenAiNativeHandler", () => {
expect(modelInfo.info.contextWindow).toBe(1047576)
})
it("should return GPT-5.3 Codex model info when selected", () => {
const codexHandler = new OpenAiNativeHandler({
...mockOptions,
apiModelId: "gpt-5.3-codex",
})
const modelInfo = codexHandler.getModel()
expect(modelInfo.id).toBe("gpt-5.3-codex")
expect(modelInfo.info.maxTokens).toBe(128000)
expect(modelInfo.info.contextWindow).toBe(400000)
expect(modelInfo.info.supportsReasoningEffort).toEqual(["low", "medium", "high", "xhigh"])
})
it("should handle undefined model ID", () => {
const handlerWithoutModel = new OpenAiNativeHandler({
openAiNativeApiKey: "test-api-key",

View file

@ -25,7 +25,7 @@ vi.mock("react-i18next", () => ({
}))
// Lightweight mock so we don't pull in CodeBlock/DiffView
vi.mock("@src/components/common/CodeAccordian", () => ({
vi.mock("@src/components/common/CodeAccordion", () => ({
default: ({
path,
isExpanded,

View file

@ -10,7 +10,7 @@ import { cn } from "@/lib/utils"
import { vscode } from "@src/utils/vscode"
import { fileChangesFromMessages, type FileChangeEntry } from "./utils/fileChangesFromMessages"
import CodeAccordian from "../common/CodeAccordian"
import CodeAccordion from "../common/CodeAccordion"
interface FileChangesPanelProps {
clineMessages: ClineMessage[] | undefined
@ -151,7 +151,7 @@ const FileChangesPanel = memo(({ clineMessages, className }: FileChangesPanelPro
const isExpanded = expandedPaths.has(path)
return (
<div key={path} className="rounded border border-vscode-panel-border overflow-hidden">
<CodeAccordian
<CodeAccordion
path={path}
code={displayDiff}
language="diff"