mirror of
https://github.com/alibaba/higress.git
synced 2026-06-02 17:17:27 +08:00
feat(ai-proxy): enable Qwen compatible mode by default and add missing API endpoints (#3032)
This commit is contained in:
@@ -447,7 +447,12 @@ func (c *ProviderConfig) FromJson(json gjson.Result) {
|
||||
c.qwenFileIds = append(c.qwenFileIds, fileId.String())
|
||||
}
|
||||
c.qwenEnableSearch = json.Get("qwenEnableSearch").Bool()
|
||||
c.qwenEnableCompatible = json.Get("qwenEnableCompatible").Bool()
|
||||
if compatible := json.Get("qwenEnableCompatible"); compatible.Exists() {
|
||||
c.qwenEnableCompatible = compatible.Bool()
|
||||
} else {
|
||||
// Default use official compatiable mode
|
||||
c.qwenEnableCompatible = true
|
||||
}
|
||||
c.qwenDomain = json.Get("qwenDomain").String()
|
||||
if c.qwenDomain != "" {
|
||||
// TODO: validate the domain, if not valid, set to default
|
||||
|
||||
@@ -74,6 +74,9 @@ func (m *qwenProviderInitializer) DefaultCapabilities(qwenEnableCompatible bool)
|
||||
string(ApiNameRetrieveFileContent): qwenCompatibleRetrieveFileContentPath,
|
||||
string(ApiNameBatches): qwenCompatibleBatchesPath,
|
||||
string(ApiNameRetrieveBatch): qwenCompatibleRetrieveBatchPath,
|
||||
string(ApiNameQwenAsyncAIGC): qwenAsyncAIGCPath,
|
||||
string(ApiNameQwenAsyncTask): qwenAsyncTaskPath,
|
||||
string(ApiNameQwenV1Rerank): qwenTextRerankPath,
|
||||
string(ApiNameAnthropicMessages): qwenAnthropicMessagesPath,
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -19,6 +19,7 @@ var basicQwenConfig = func() json.RawMessage {
|
||||
"modelMapping": map[string]string{
|
||||
"*": "qwen-turbo",
|
||||
},
|
||||
"qwenEnableCompatible": false,
|
||||
},
|
||||
})
|
||||
return data
|
||||
@@ -62,7 +63,8 @@ var qwenCustomDomainConfig = func() json.RawMessage {
|
||||
"modelMapping": map[string]string{
|
||||
"*": "qwen-turbo",
|
||||
},
|
||||
"qwenDomain": "custom.qwen.com",
|
||||
"qwenDomain": "custom.qwen.com",
|
||||
"qwenEnableCompatible": false,
|
||||
},
|
||||
})
|
||||
return data
|
||||
|
||||
Reference in New Issue
Block a user