mirror of
https://github.com/alibaba/higress.git
synced 2026-06-09 20:57:32 +08:00
ai-proxy: support custom openai provider (#1176)
Co-authored-by: Kent Dong <ch3cho@qq.com>
This commit is contained in:
@@ -26,6 +26,9 @@ func (m *moonshotProviderInitializer) ValidateConfig(config ProviderConfig) erro
|
||||
if config.moonshotFileId != "" && config.context != nil {
|
||||
return errors.New("moonshotFileId and context cannot be configured at the same time")
|
||||
}
|
||||
if config.apiTokens == nil || len(config.apiTokens) == 0 {
|
||||
return errors.New("no apiToken found in provider config")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user