Merge branch 'router-for-me:main' into main

This commit is contained in:
Luis Pater
2025-12-19 11:40:52 +08:00
committed by GitHub
6 changed files with 1475 additions and 1 deletions
+1
View File
@@ -27,6 +27,7 @@ config.yaml
bin/* bin/*
.claude/* .claude/*
.vscode/* .vscode/*
.gemini/*
.serena/* .serena/*
.agent/* .agent/*
.bmad/* .bmad/*
+1
View File
@@ -31,6 +31,7 @@ GEMINI.md
# Tooling metadata # Tooling metadata
.vscode/* .vscode/*
.claude/* .claude/*
.gemini/*
.serena/* .serena/*
.agent/* .agent/*
.bmad/* .bmad/*
+5
View File
@@ -20,6 +20,7 @@ func CodexInstructionsForModel(modelName, systemInstructions string) (bool, stri
lastCodexMaxPrompt := "" lastCodexMaxPrompt := ""
last51Prompt := "" last51Prompt := ""
last52Prompt := "" last52Prompt := ""
last52CodexPrompt := ""
// lastReviewPrompt := "" // lastReviewPrompt := ""
for _, entry := range entries { for _, entry := range entries {
content, _ := codexInstructionsDir.ReadFile("codex_instructions/" + entry.Name()) content, _ := codexInstructionsDir.ReadFile("codex_instructions/" + entry.Name())
@@ -36,12 +37,16 @@ func CodexInstructionsForModel(modelName, systemInstructions string) (bool, stri
last51Prompt = string(content) last51Prompt = string(content)
} else if strings.HasPrefix(entry.Name(), "gpt_5_2_prompt.md") { } else if strings.HasPrefix(entry.Name(), "gpt_5_2_prompt.md") {
last52Prompt = string(content) 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") { } else if strings.HasPrefix(entry.Name(), "review_prompt.md") {
// lastReviewPrompt = string(content) // lastReviewPrompt = string(content)
} }
} }
if strings.Contains(modelName, "codex-max") { if strings.Contains(modelName, "codex-max") {
return false, lastCodexMaxPrompt return false, lastCodexMaxPrompt
} else if strings.Contains(modelName, "5.2-codex") {
return false, last52CodexPrompt
} else if strings.Contains(modelName, "codex") { } else if strings.Contains(modelName, "codex") {
return false, lastCodexPrompt return false, lastCodexPrompt
} else if strings.Contains(modelName, "5.1") { } else if strings.Contains(modelName, "5.1") {
File diff suppressed because one or more lines are too long
+14
View File
@@ -627,6 +627,20 @@ func GetOpenAIModels() []*ModelInfo {
SupportedParameters: []string{"tools"}, SupportedParameters: []string{"tools"},
Thinking: &ThinkingSupport{Levels: []string{"none", "low", "medium", "high", "xhigh"}}, 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"}},
},
} }
} }
@@ -25,7 +25,7 @@ type Params struct {
HasFirstResponse bool HasFirstResponse bool
ResponseType int ResponseType int
ResponseIndex 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. // toolUseIDCounter provides a process-wide unique counter for tool use identifiers.