Fix openai regression (#1758)

this impacts custom openai providers, not wave proxy
This commit is contained in:
Evan Simkowitz 2025-01-16 18:02:18 -08:00 committed by GitHub
parent 1cd1744317
commit f35375ee1a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View File

@ -29,7 +29,7 @@ func defaultAzureMapperFn(model string) string {
func setApiType(opts *wshrpc.WaveAIOptsType, clientConfig *openaiapi.ClientConfig) error {
ourApiType := strings.ToLower(opts.APIType)
if ourApiType == "" || ourApiType == strings.ToLower(string(openaiapi.APITypeOpenAI)) {
if ourApiType == "" || ourApiType == APIType_OpenAI || ourApiType == strings.ToLower(string(openaiapi.APITypeOpenAI)) {
clientConfig.APIType = openaiapi.APITypeOpenAI
return nil
} else if ourApiType == strings.ToLower(string(openaiapi.APITypeAzure)) {

View File

@ -75,7 +75,6 @@ func RunAICommand(ctx context.Context, request wshrpc.WaveAIStreamRequest) chan
request.Opts.Model = "default"
backend = WaveAICloudBackend{}
} else {
request.Opts.APIType = APIType_OpenAI
backend = OpenAIBackend{}
}
if backend == nil {