File tree Expand file tree Collapse file tree
api/server/services/Files/Audio Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -227,7 +227,6 @@ class STTService {
227227 }
228228
229229 const headers = {
230- 'Content-Type' : 'multipart/form-data' ,
231230 ...( apiKey && { 'api-key' : apiKey } ) ,
232231 } ;
233232
Original file line number Diff line number Diff line change @@ -25,6 +25,12 @@ export const genAzureEndpoint = ({
2525 azureOpenAIApiInstanceName : string ;
2626 azureOpenAIApiDeploymentName : string ;
2727} ) : string => {
28+ // Support both old (.openai.azure.com) and new (.cognitiveservices.azure.com) endpoint formats
29+ // If instanceName already includes a full domain, use it as-is
30+ if ( azureOpenAIApiInstanceName . includes ( '.azure.com' ) ) {
31+ return `https://${ azureOpenAIApiInstanceName } /openai/deployments/${ azureOpenAIApiDeploymentName } ` ;
32+ }
33+ // Legacy format for backward compatibility
2834 return `https://${ azureOpenAIApiInstanceName } .openai.azure.com/openai/deployments/${ azureOpenAIApiDeploymentName } ` ;
2935} ;
3036
You can’t perform that action at this time.
0 commit comments