mirror of
https://github.com/alibaba/higress.git
synced 2026-06-09 04:37:31 +08:00
ai proxy support passthrough path when api name is unknown (#1754)
This commit is contained in:
@@ -265,9 +265,6 @@ type ProviderConfig struct {
|
||||
// @Title zh-CN 额外支持的ai能力
|
||||
// @Description zh-CN 开放的ai能力和urlpath映射,例如: {"openai/v1/chatcompletions": "/v1/chat/completions"}
|
||||
capabilities map[string]string
|
||||
// @Title zh-CN 是否开启透传
|
||||
// @Description zh-CN 如果是插件不支持的API,是否透传请求, 默认为false
|
||||
passthrough bool
|
||||
}
|
||||
|
||||
func (c *ProviderConfig) GetId() string {
|
||||
@@ -453,10 +450,6 @@ func (c *ProviderConfig) ReplaceByCustomSettings(body []byte) ([]byte, error) {
|
||||
return ReplaceByCustomSettings(body, c.customSettings)
|
||||
}
|
||||
|
||||
func (c *ProviderConfig) PassthroughUnsupportedAPI() bool {
|
||||
return c.passthrough
|
||||
}
|
||||
|
||||
func CreateProvider(pc ProviderConfig) (Provider, error) {
|
||||
initializer, has := providerInitializers[pc.typ]
|
||||
if !has {
|
||||
|
||||
Reference in New Issue
Block a user