From bd09c0bf09f10ccad7ee45ba1dd4aed1eef3d770 Mon Sep 17 00:00:00 2001 From: Thai Nguyen Hung Date: Wed, 1 Apr 2026 10:04:38 +0700 Subject: [PATCH] feat(registry): add gpt-5.4-mini model to GitHub Copilot registry --- internal/registry/model_definitions.go | 13 ++++++++++++ .../executor/github_copilot_executor_test.go | 21 +++++++++++++++---- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/internal/registry/model_definitions.go b/internal/registry/model_definitions.go index 9299ca22..f074316c 100644 --- a/internal/registry/model_definitions.go +++ b/internal/registry/model_definitions.go @@ -477,6 +477,19 @@ func GetGitHubCopilotModels() []*ModelInfo { SupportedEndpoints: []string{"/responses"}, Thinking: &ThinkingSupport{Levels: []string{"none", "low", "medium", "high", "xhigh"}}, }, + { + ID: "gpt-5.4-mini", + Object: "model", + Created: now, + OwnedBy: "github-copilot", + Type: "github-copilot", + DisplayName: "GPT-5.4 mini", + Description: "OpenAI GPT-5.4 mini via GitHub Copilot", + ContextLength: 200000, + MaxCompletionTokens: 32768, + SupportedEndpoints: []string{"/responses"}, + Thinking: &ThinkingSupport{Levels: []string{"none", "low", "medium", "high", "xhigh"}}, + }, { ID: "claude-haiku-4.5", Object: "model", diff --git a/internal/runtime/executor/github_copilot_executor_test.go b/internal/runtime/executor/github_copilot_executor_test.go index dfc332f2..c320bccc 100644 --- a/internal/runtime/executor/github_copilot_executor_test.go +++ b/internal/runtime/executor/github_copilot_executor_test.go @@ -76,6 +76,9 @@ func TestUseGitHubCopilotResponsesEndpoint_RegistryResponsesOnlyModel(t *testing if !useGitHubCopilotResponsesEndpoint(sdktranslator.FromString("openai"), "gpt-5.4") { t.Fatal("expected responses-only registry model to use /responses") } + if !useGitHubCopilotResponsesEndpoint(sdktranslator.FromString("openai"), "gpt-5.4-mini") { + t.Fatal("expected responses-only registry model to use /responses") + } } func TestUseGitHubCopilotResponsesEndpoint_DynamicRegistryWinsOverStatic(t *testing.T) { @@ -83,15 +86,25 @@ func TestUseGitHubCopilotResponsesEndpoint_DynamicRegistryWinsOverStatic(t *test reg := registry.GetGlobalRegistry() clientID := "github-copilot-test-client" - reg.RegisterClient(clientID, "github-copilot", []*registry.ModelInfo{{ - ID: "gpt-5.4", - SupportedEndpoints: []string{"/chat/completions", "/responses"}, - }}) + reg.RegisterClient(clientID, "github-copilot", []*registry.ModelInfo{ + { + ID: "gpt-5.4", + SupportedEndpoints: []string{"/chat/completions", "/responses"}, + }, + { + ID: "gpt-5.4-mini", + SupportedEndpoints: []string{"/chat/completions", "/responses"}, + }, + }) defer reg.UnregisterClient(clientID) if useGitHubCopilotResponsesEndpoint(sdktranslator.FromString("openai"), "gpt-5.4") { t.Fatal("expected dynamic registry definition to take precedence over static fallback") } + + if useGitHubCopilotResponsesEndpoint(sdktranslator.FromString("openai"), "gpt-5.4-mini") { + t.Fatal("expected dynamic registry definition to take precedence over static fallback") + } } func TestUseGitHubCopilotResponsesEndpoint_DefaultChat(t *testing.T) {