Showing the changes to internal/runtime/executor/github_copilot_executor_test.go (1 of 2 files). Show all
Unified · Split
| @@ -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 | ||
| 81 | func TestUseGitHubCopilotResponsesEndpoint_DynamicRegistryWinsOverStatic(t *testing.T) { | 84 | func 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 | ||
| 97 | func TestUseGitHubCopilotResponsesEndpoint_DefaultChat(t *testing.T) { | 110 | func TestUseGitHubCopilotResponsesEndpoint_DefaultChat(t *testing.T) { |