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] 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.