🐛 fix: Do not modify Provider parameters
This commit is contained in:
parent
8f77924946
commit
ee662fda04
@ -111,13 +111,14 @@ func (p *OpenAIProvider) GetFullRequestURL(requestURL string, modelName string)
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else if p.Channel.Type == config.ChannelTypeCustom && p.Channel.Other != "" {
|
} else if p.Channel.Type == config.ChannelTypeCustom && p.Channel.Other != "" {
|
||||||
if p.Channel.Other == "disable" {
|
replaceValue := p.Channel.Other
|
||||||
p.Channel.Other = ""
|
if replaceValue == "disable" {
|
||||||
|
replaceValue = ""
|
||||||
} else {
|
} else {
|
||||||
p.Channel.Other = "/" + p.Channel.Other
|
replaceValue = "/" + replaceValue
|
||||||
}
|
}
|
||||||
|
|
||||||
requestURL = strings.Replace(requestURL, "/v1", p.Channel.Other, 1)
|
requestURL = strings.Replace(requestURL, "/v1", replaceValue, 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
if strings.HasPrefix(baseURL, "https://gateway.ai.cloudflare.com") {
|
if strings.HasPrefix(baseURL, "https://gateway.ai.cloudflare.com") {
|
||||||
|
Loading…
Reference in New Issue
Block a user