From 393e38f2c0cc97b5cbb591b7f219dace022320df Mon Sep 17 00:00:00 2001 From: hkfires <10558748+hkfires@users.noreply.github.com> Date: Thu, 18 Dec 2025 13:18:15 +0800 Subject: [PATCH 1/3] chore: ignore gemini metadata files --- .dockerignore | 1 + .gitignore | 1 + 2 files changed, 2 insertions(+) diff --git a/.dockerignore b/.dockerignore index 6117d7d8..411f4d12 100644 --- a/.dockerignore +++ b/.dockerignore @@ -27,6 +27,7 @@ config.yaml bin/* .claude/* .vscode/* +.gemini/* .serena/* .agent/* .bmad/* diff --git a/.gitignore b/.gitignore index 8ee4275f..d99cd0c3 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ GEMINI.md # Tooling metadata .vscode/* .claude/* +.gemini/* .serena/* .agent/* .bmad/* From fa70b220e9ab71c67136e64e04dee475751bd0f8 Mon Sep 17 00:00:00 2001 From: hkfires <10558748+hkfires@users.noreply.github.com> Date: Fri, 19 Dec 2025 09:53:03 +0800 Subject: [PATCH 2/3] feat(registry): add gpt 5.2 codex model definition --- internal/registry/model_definitions.go | 14 ++++++++++++++ .../gemini/claude/gemini_claude_response.go | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/internal/registry/model_definitions.go b/internal/registry/model_definitions.go index 20f9b0a0..fe0f85cb 100644 --- a/internal/registry/model_definitions.go +++ b/internal/registry/model_definitions.go @@ -627,6 +627,20 @@ func GetOpenAIModels() []*ModelInfo { SupportedParameters: []string{"tools"}, Thinking: &ThinkingSupport{Levels: []string{"none", "low", "medium", "high", "xhigh"}}, }, + { + ID: "gpt-5.2-codex", + Object: "model", + Created: 1765440000, + OwnedBy: "openai", + Type: "openai", + Version: "gpt-5.2", + DisplayName: "GPT 5.2 Codex", + Description: "Stable version of GPT 5.2 Codex, The best model for coding and agentic tasks across domains.", + ContextLength: 400000, + MaxCompletionTokens: 128000, + SupportedParameters: []string{"tools"}, + Thinking: &ThinkingSupport{Levels: []string{"low", "medium", "high", "xhigh"}}, + }, } } diff --git a/internal/translator/gemini/claude/gemini_claude_response.go b/internal/translator/gemini/claude/gemini_claude_response.go index 379f137c..d56b78e4 100644 --- a/internal/translator/gemini/claude/gemini_claude_response.go +++ b/internal/translator/gemini/claude/gemini_claude_response.go @@ -25,7 +25,7 @@ type Params struct { HasFirstResponse bool ResponseType int ResponseIndex int - HasContent bool // Tracks whether any content (text, thinking, or tool use) has been output + HasContent bool // Tracks whether any content (text, thinking, or tool use) has been output } // toolUseIDCounter provides a process-wide unique counter for tool use identifiers. From ca09db21ff56982674482788cc39858a984e3fb7 Mon Sep 17 00:00:00 2001 From: Luis Pater Date: Fri, 19 Dec 2025 11:39:51 +0800 Subject: [PATCH 3/3] feat(codex): add gpt-5.2 codex prompt handling This change introduces specific logic to load and use instructions for the 'gpt-5.2-codex' model variant by recognizing the 'gpt-5.2-codex_prompt.md' filename. This ensures the correct prompts are used when the '5.2-codex' model is identified, complementing the recent addition of its definition. --- internal/misc/codex_instructions.go | 5 + ...1-f084e5264b1b0ae9eb8c63c950c0953f40966fed | 1453 +++++++++++++++++ 2 files changed, 1458 insertions(+) create mode 100644 internal/misc/codex_instructions/gpt-5.2-codex_prompt.md-001-f084e5264b1b0ae9eb8c63c950c0953f40966fed diff --git a/internal/misc/codex_instructions.go b/internal/misc/codex_instructions.go index b47ebf27..17130cbe 100644 --- a/internal/misc/codex_instructions.go +++ b/internal/misc/codex_instructions.go @@ -20,6 +20,7 @@ func CodexInstructionsForModel(modelName, systemInstructions string) (bool, stri lastCodexMaxPrompt := "" last51Prompt := "" last52Prompt := "" + last52CodexPrompt := "" // lastReviewPrompt := "" for _, entry := range entries { content, _ := codexInstructionsDir.ReadFile("codex_instructions/" + entry.Name()) @@ -36,12 +37,16 @@ func CodexInstructionsForModel(modelName, systemInstructions string) (bool, stri last51Prompt = string(content) } else if strings.HasPrefix(entry.Name(), "gpt_5_2_prompt.md") { last52Prompt = string(content) + } else if strings.HasPrefix(entry.Name(), "gpt-5.2-codex_prompt.md") { + last52CodexPrompt = string(content) } else if strings.HasPrefix(entry.Name(), "review_prompt.md") { // lastReviewPrompt = string(content) } } if strings.Contains(modelName, "codex-max") { return false, lastCodexMaxPrompt + } else if strings.Contains(modelName, "5.2-codex") { + return false, last52CodexPrompt } else if strings.Contains(modelName, "codex") { return false, lastCodexPrompt } else if strings.Contains(modelName, "5.1") { diff --git a/internal/misc/codex_instructions/gpt-5.2-codex_prompt.md-001-f084e5264b1b0ae9eb8c63c950c0953f40966fed b/internal/misc/codex_instructions/gpt-5.2-codex_prompt.md-001-f084e5264b1b0ae9eb8c63c950c0953f40966fed new file mode 100644 index 00000000..8a1dd912 --- /dev/null +++ b/internal/misc/codex_instructions/gpt-5.2-codex_prompt.md-001-f084e5264b1b0ae9eb8c63c950c0953f40966fed @@ -0,0 +1,1453 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + codex/codex-rs/core/gpt-5.2-codex_prompt.md at f084e5264b1b0ae9eb8c63c950c0953f40966fed · openai/codex · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +
+ Skip to content + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+ + + + + +
+ + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+
+ + + + +
+ +
+ +
+
+ +
+ +
+

Footer

+ + + + +
+
+ + + + + © 2025 GitHub, Inc. + +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + +
+
+
+ + +