From f91807b6b915ce174ab7672cd82dc2396f8c6074 Mon Sep 17 00:00:00 2001 From: LMark <2312936963@qq.com> Date: Sat, 21 Feb 2026 01:41:01 +0800 Subject: [PATCH 1/2] Add GPT-4o model variants while keeping Gemini 3.1 Pro preview --- internal/registry/model_definitions.go | 55 ++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/internal/registry/model_definitions.go b/internal/registry/model_definitions.go index 86d119fa..5f0ccccf 100644 --- a/internal/registry/model_definitions.go +++ b/internal/registry/model_definitions.go @@ -141,6 +141,61 @@ func GetGitHubCopilotModels() []*ModelInfo { ContextLength: 128000, MaxCompletionTokens: 16384, }, + { + ID: "gpt-4o-2024-11-20", + Object: "model", + Created: now, + OwnedBy: "github-copilot", + Type: "github-copilot", + DisplayName: "GPT-4o (2024-11-20)", + Description: "OpenAI GPT-4o 2024-11-20 via GitHub Copilot", + ContextLength: 128000, + MaxCompletionTokens: 16384, + }, + { + ID: "gpt-4o-2024-08-06", + Object: "model", + Created: now, + OwnedBy: "github-copilot", + Type: "github-copilot", + DisplayName: "GPT-4o (2024-08-06)", + Description: "OpenAI GPT-4o 2024-08-06 via GitHub Copilot", + ContextLength: 128000, + MaxCompletionTokens: 16384, + }, + { + ID: "gpt-4o-2024-05-13", + Object: "model", + Created: now, + OwnedBy: "github-copilot", + Type: "github-copilot", + DisplayName: "GPT-4o (2024-05-13)", + Description: "OpenAI GPT-4o 2024-05-13 via GitHub Copilot", + ContextLength: 128000, + MaxCompletionTokens: 16384, + }, + { + ID: "gpt-4o", + Object: "model", + Created: now, + OwnedBy: "github-copilot", + Type: "github-copilot", + DisplayName: "GPT-4o", + Description: "OpenAI GPT-4o via GitHub Copilot", + ContextLength: 128000, + MaxCompletionTokens: 16384, + }, + { + ID: "gpt-4-o-preview", + Object: "model", + Created: now, + OwnedBy: "github-copilot", + Type: "github-copilot", + DisplayName: "GPT-4-o Preview", + Description: "OpenAI GPT-4-o Preview via GitHub Copilot", + ContextLength: 128000, + MaxCompletionTokens: 16384, + }, { ID: "gpt-5", Object: "model", From 740277a9f25a1eb79fab015d71f138c11f83ae98 Mon Sep 17 00:00:00 2001 From: LMark <2312936963@qq.com> Date: Sat, 21 Feb 2026 02:32:06 +0800 Subject: [PATCH 2/2] refactor(registry): deduplicate GitHub Copilot GPT-4o model definitions --- internal/registry/model_definitions.go | 76 +++++++++----------------- 1 file changed, 25 insertions(+), 51 deletions(-) diff --git a/internal/registry/model_definitions.go b/internal/registry/model_definitions.go index 5f0ccccf..1b69021d 100644 --- a/internal/registry/model_definitions.go +++ b/internal/registry/model_definitions.go @@ -129,7 +129,19 @@ func LookupStaticModelInfo(modelID string) *ModelInfo { // These models are available through the GitHub Copilot API at api.githubcopilot.com. func GetGitHubCopilotModels() []*ModelInfo { now := int64(1732752000) // 2024-11-27 - return []*ModelInfo{ + gpt4oEntries := []struct { + ID string + DisplayName string + Description string + }{ + {ID: "gpt-4o-2024-11-20", DisplayName: "GPT-4o (2024-11-20)", Description: "OpenAI GPT-4o 2024-11-20 via GitHub Copilot"}, + {ID: "gpt-4o-2024-08-06", DisplayName: "GPT-4o (2024-08-06)", Description: "OpenAI GPT-4o 2024-08-06 via GitHub Copilot"}, + {ID: "gpt-4o-2024-05-13", DisplayName: "GPT-4o (2024-05-13)", Description: "OpenAI GPT-4o 2024-05-13 via GitHub Copilot"}, + {ID: "gpt-4o", DisplayName: "GPT-4o", Description: "OpenAI GPT-4o via GitHub Copilot"}, + {ID: "gpt-4-o-preview", DisplayName: "GPT-4-o Preview", Description: "OpenAI GPT-4-o Preview via GitHub Copilot"}, + } + + models := []*ModelInfo{ { ID: "gpt-4.1", Object: "model", @@ -141,61 +153,23 @@ func GetGitHubCopilotModels() []*ModelInfo { ContextLength: 128000, MaxCompletionTokens: 16384, }, - { - ID: "gpt-4o-2024-11-20", + } + + for _, entry := range gpt4oEntries { + models = append(models, &ModelInfo{ + ID: entry.ID, Object: "model", Created: now, OwnedBy: "github-copilot", Type: "github-copilot", - DisplayName: "GPT-4o (2024-11-20)", - Description: "OpenAI GPT-4o 2024-11-20 via GitHub Copilot", + DisplayName: entry.DisplayName, + Description: entry.Description, ContextLength: 128000, MaxCompletionTokens: 16384, - }, - { - ID: "gpt-4o-2024-08-06", - Object: "model", - Created: now, - OwnedBy: "github-copilot", - Type: "github-copilot", - DisplayName: "GPT-4o (2024-08-06)", - Description: "OpenAI GPT-4o 2024-08-06 via GitHub Copilot", - ContextLength: 128000, - MaxCompletionTokens: 16384, - }, - { - ID: "gpt-4o-2024-05-13", - Object: "model", - Created: now, - OwnedBy: "github-copilot", - Type: "github-copilot", - DisplayName: "GPT-4o (2024-05-13)", - Description: "OpenAI GPT-4o 2024-05-13 via GitHub Copilot", - ContextLength: 128000, - MaxCompletionTokens: 16384, - }, - { - ID: "gpt-4o", - Object: "model", - Created: now, - OwnedBy: "github-copilot", - Type: "github-copilot", - DisplayName: "GPT-4o", - Description: "OpenAI GPT-4o via GitHub Copilot", - ContextLength: 128000, - MaxCompletionTokens: 16384, - }, - { - ID: "gpt-4-o-preview", - Object: "model", - Created: now, - OwnedBy: "github-copilot", - Type: "github-copilot", - DisplayName: "GPT-4-o Preview", - Description: "OpenAI GPT-4-o Preview via GitHub Copilot", - ContextLength: 128000, - MaxCompletionTokens: 16384, - }, + }) + } + + return append(models, []*ModelInfo{ { ID: "gpt-5", Object: "model", @@ -477,7 +451,7 @@ func GetGitHubCopilotModels() []*ModelInfo { MaxCompletionTokens: 16384, SupportedEndpoints: []string{"/chat/completions", "/responses"}, }, - } + }...) } // GetKiroModels returns the Kiro (AWS CodeWhisperer) model definitions