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

@@ -112,6 +112,18 @@ func (p *HTTPProvider) useOpenAICompatChatUpstream() bool {
}
}
func (p *HTTPProvider) useConfiguredOpenAICompatChat() bool {
if p == nil {
return false
}
switch strings.ToLower(strings.TrimSpace(p.responsesAPI)) {
case "chat_completions":
return true
default:
return false
}
}
func (p *HTTPProvider) compatBase() string {
switch p.oauthProvider() {
case defaultQwenOAuthProvider: