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

Showing the changes to internal/runtime/executor/github_copilot_executor_test.go (1 of 2 files). Show all

Unified · Split

internal/runtime/executor/github_copilot_executor_test.go+17−4
@@ -76,6 +76,9 @@ func TestUseGitHubCopilotResponsesEndpoint_RegistryResponsesOnlyModel(t *testing · 75 unmodified lines
76 if !useGitHubCopilotResponsesEndpoint(sdktranslator.FromString("openai"), "gpt-5.4") {76 if !useGitHubCopilotResponsesEndpoint(sdktranslator.FromString("openai"), "gpt-5.4") {
77 t.Fatal("expected responses-only registry model to use /responses")77 t.Fatal("expected responses-only registry model to use /responses")
78 }78 }
79 if !useGitHubCopilotResponsesEndpoint(sdktranslator.FromString("openai"), "gpt-5.4-mini") {
80 t.Fatal("expected responses-only registry model to use /responses")
81 }
79}82}
80 83
81func TestUseGitHubCopilotResponsesEndpoint_DynamicRegistryWinsOverStatic(t *testing.T) {84func TestUseGitHubCopilotResponsesEndpoint_DynamicRegistryWinsOverStatic(t *testing.T) {
@@ -83,15 +86,25 @@ func TestUseGitHubCopilotResponsesEndpoint_DynamicRegistryWinsOverStatic(t *test · 1 unmodified line
83 86
84 reg := registry.GetGlobalRegistry()87 reg := registry.GetGlobalRegistry()
85 clientID := "github-copilot-test-client"88 clientID := "github-copilot-test-client"
86 reg.RegisterClient(clientID, "github-copilot", []*registry.ModelInfo{{89 reg.RegisterClient(clientID, "github-copilot", []*registry.ModelInfo{
87 ID: "gpt-5.4",90 {
88 SupportedEndpoints: []string{"/chat/completions", "/responses"},91 ID: "gpt-5.4",
89 }})92 SupportedEndpoints: []string{"/chat/completions", "/responses"},
93 },
94 {
95 ID: "gpt-5.4-mini",
96 SupportedEndpoints: []string{"/chat/completions", "/responses"},
97 },
98 })
90 defer reg.UnregisterClient(clientID)99 defer reg.UnregisterClient(clientID)
91 100
92 if useGitHubCopilotResponsesEndpoint(sdktranslator.FromString("openai"), "gpt-5.4") {101 if useGitHubCopilotResponsesEndpoint(sdktranslator.FromString("openai"), "gpt-5.4") {
93 t.Fatal("expected dynamic registry definition to take precedence over static fallback")102 t.Fatal("expected dynamic registry definition to take precedence over static fallback")
94 }103 }
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 }
95}108}
96 109
97func TestUseGitHubCopilotResponsesEndpoint_DefaultChat(t *testing.T) {110func 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