feat(provider): support chat completions for openai providers

This commit is contained in:
lpf
2026-05-11 18:14:43 +08:00
parent c1cbec551b
commit 78d546989c
12 changed files with 106 additions and 5 deletions

View File

@@ -11,6 +11,9 @@ func TestNormalizedViewProjectsCoreAndRuntime(t *testing.T) {
MaxTokens: 12288,
Temperature: 0.35,
TimeoutSec: 90,
Responses: ProviderResponsesConfig{
API: "chat_completions",
},
}
cfg.Agents.Subagents["coder"] = SubagentConfig{
Enabled: true,
@@ -40,4 +43,7 @@ func TestNormalizedViewProjectsCoreAndRuntime(t *testing.T) {
if got := view.Runtime.Providers["openai"].Temperature; got != 0.35 {
t.Fatalf("expected provider temperature in normalized runtime view, got %v", got)
}
if got := view.Runtime.Providers["openai"].Responses.API; got != "chat_completions" {
t.Fatalf("expected provider responses.api in normalized runtime view, got %q", got)
}
}