Skip to content

Commit

Permalink
Fix openai regression (#1758)
Browse files Browse the repository at this point in the history
this impacts custom openai providers, not wave proxy
  • Loading branch information
esimkowitz authored Jan 17, 2025
1 parent 1cd1744 commit f35375e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/waveai/openaibackend.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
1 change: 0 additions & 1 deletion pkg/waveai/waveai.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f35375e

Please sign in to comment.