mirror of
https://github.com/router-for-me/CLIProxyAPIPlus.git
synced 2026-05-13 23:41:36 +00:00
feat(registry): add gpt-5.4-mini model to GitHub Copilot registry
This commit is contained in:
@@ -477,6 +477,19 @@ func GetGitHubCopilotModels() []*ModelInfo {
|
|||||||
SupportedEndpoints: []string{"/responses"},
|
SupportedEndpoints: []string{"/responses"},
|
||||||
Thinking: &ThinkingSupport{Levels: []string{"none", "low", "medium", "high", "xhigh"}},
|
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",
|
ID: "claude-haiku-4.5",
|
||||||
Object: "model",
|
Object: "model",
|
||||||
|
|||||||
@@ -76,6 +76,9 @@ func TestUseGitHubCopilotResponsesEndpoint_RegistryResponsesOnlyModel(t *testing
|
|||||||
if !useGitHubCopilotResponsesEndpoint(sdktranslator.FromString("openai"), "gpt-5.4") {
|
if !useGitHubCopilotResponsesEndpoint(sdktranslator.FromString("openai"), "gpt-5.4") {
|
||||||
t.Fatal("expected responses-only registry model to use /responses")
|
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) {
|
func TestUseGitHubCopilotResponsesEndpoint_DynamicRegistryWinsOverStatic(t *testing.T) {
|
||||||
@@ -83,15 +86,25 @@ func TestUseGitHubCopilotResponsesEndpoint_DynamicRegistryWinsOverStatic(t *test
|
|||||||
|
|
||||||
reg := registry.GetGlobalRegistry()
|
reg := registry.GetGlobalRegistry()
|
||||||
clientID := "github-copilot-test-client"
|
clientID := "github-copilot-test-client"
|
||||||
reg.RegisterClient(clientID, "github-copilot", []*registry.ModelInfo{{
|
reg.RegisterClient(clientID, "github-copilot", []*registry.ModelInfo{
|
||||||
ID: "gpt-5.4",
|
{
|
||||||
SupportedEndpoints: []string{"/chat/completions", "/responses"},
|
ID: "gpt-5.4",
|
||||||
}})
|
SupportedEndpoints: []string{"/chat/completions", "/responses"},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ID: "gpt-5.4-mini",
|
||||||
|
SupportedEndpoints: []string{"/chat/completions", "/responses"},
|
||||||
|
},
|
||||||
|
})
|
||||||
defer reg.UnregisterClient(clientID)
|
defer reg.UnregisterClient(clientID)
|
||||||
|
|
||||||
if useGitHubCopilotResponsesEndpoint(sdktranslator.FromString("openai"), "gpt-5.4") {
|
if useGitHubCopilotResponsesEndpoint(sdktranslator.FromString("openai"), "gpt-5.4") {
|
||||||
t.Fatal("expected dynamic registry definition to take precedence over static fallback")
|
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) {
|
func TestUseGitHubCopilotResponsesEndpoint_DefaultChat(t *testing.T) {
|
||||||
|
|||||||
Reference in New Issue
Block a user