History

feat(registry): add gpt-5.4-mini model to GitHub Copilot registry

Thai Nguyen Hung committed 7 months ago

Commit bd09c0b1 parent f8d1bc02 files · +30 −4Browse files

Unified · Split

2 files
  1. internal/registry/model_definitions.go +13 −0
  2. internal/runtime/executor/github_copilot_executor_test.go +17 −4
internal/registry/model_definitions.go+13−0
@@ -477,6 +477,19 @@ func GetGitHubCopilotModels() []*ModelInfo { · 476 unmodified lines
477477 SupportedEndpoints: []string{"/responses"},
478478 Thinking: &ThinkingSupport{Levels: []string{"none", "low", "medium", "high", "xhigh"}},
479479 },
480+ {
481+ ID: "gpt-5.4-mini",
482+ Object: "model",
483+ Created: now,
484+ OwnedBy: "github-copilot",
485+ Type: "github-copilot",
486+ DisplayName: "GPT-5.4 mini",
487+ Description: "OpenAI GPT-5.4 mini via GitHub Copilot",
488+ ContextLength: 200000,
489+ MaxCompletionTokens: 32768,
490+ SupportedEndpoints: []string{"/responses"},
491+ Thinking: &ThinkingSupport{Levels: []string{"none", "low", "medium", "high", "xhigh"}},
492+ },
480493 {
481494 ID: "claude-haiku-4.5",
482495 Object: "model",
internal/runtime/executor/github_copilot_executor_test.go+17−4
@@ -76,6 +76,9 @@ func TestUseGitHubCopilotResponsesEndpoint_RegistryResponsesOnlyModel(t *testing · 75 unmodified lines
7676 if !useGitHubCopilotResponsesEndpoint(sdktranslator.FromString("openai"), "gpt-5.4") {
7777 t.Fatal("expected responses-only registry model to use /responses")
7878 }
79+ if !useGitHubCopilotResponsesEndpoint(sdktranslator.FromString("openai"), "gpt-5.4-mini") {
80+ t.Fatal("expected responses-only registry model to use /responses")
81+ }
7982 }
8083
8184 func TestUseGitHubCopilotResponsesEndpoint_DynamicRegistryWinsOverStatic(t *testing.T) {
@@ -83,15 +86,25 @@ func TestUseGitHubCopilotResponsesEndpoint_DynamicRegistryWinsOverStatic(t *test · 1 unmodified line
8386
8487 reg := registry.GetGlobalRegistry()
8588 clientID := "github-copilot-test-client"
86− reg.RegisterClient(clientID, "github-copilot", []*registry.ModelInfo{{
87− ID: "gpt-5.4",
88− SupportedEndpoints: []string{"/chat/completions", "/responses"},
89− }})
89+ reg.RegisterClient(clientID, "github-copilot", []*registry.ModelInfo{
90+ {
91+ ID: "gpt-5.4",
92+ SupportedEndpoints: []string{"/chat/completions", "/responses"},
93+ },
94+ {
95+ ID: "gpt-5.4-mini",
96+ SupportedEndpoints: []string{"/chat/completions", "/responses"},
97+ },
98+ })
9099 defer reg.UnregisterClient(clientID)
91100
92101 if useGitHubCopilotResponsesEndpoint(sdktranslator.FromString("openai"), "gpt-5.4") {
93102 t.Fatal("expected dynamic registry definition to take precedence over static fallback")
94103 }
104+
105+ if useGitHubCopilotResponsesEndpoint(sdktranslator.FromString("openai"), "gpt-5.4-mini") {
106+ t.Fatal("expected dynamic registry definition to take precedence over static fallback")
107+ }
95108 }
96109
97110 func TestUseGitHubCopilotResponsesEndpoint_DefaultChat(t *testing.T) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t