File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
providers/azure-ai-inference Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -866,6 +866,7 @@ export function constructConfigFromRequestHeaders(
866866 azureEntraClientSecret :
867867 requestHeaders [ `x-${ POWERED_BY } -azure-entra-client-secret` ] ,
868868 azureEntraTenantId : requestHeaders [ `x-${ POWERED_BY } -azure-entra-tenant-id` ] ,
869+ azureEntraScope : requestHeaders [ `x-${ POWERED_BY } -azure-entra-scope` ] ,
869870 } ;
870871
871872 const awsConfig = {
Original file line number Diff line number Diff line change @@ -65,10 +65,15 @@ const AzureAIInferenceAPI: ProviderAPIConfig = {
6565 }
6666
6767 if ( azureAuthMode === 'entra' ) {
68- const { azureEntraTenantId, azureEntraClientId, azureEntraClientSecret } =
69- providerOptions ;
68+ const {
69+ azureEntraTenantId,
70+ azureEntraClientId,
71+ azureEntraClientSecret,
72+ azureEntraScope,
73+ } = providerOptions ;
7074 if ( azureEntraTenantId && azureEntraClientId && azureEntraClientSecret ) {
71- const scope = 'https://cognitiveservices.azure.com/.default' ;
75+ const scope =
76+ azureEntraScope ?? 'https://cognitiveservices.azure.com/.default' ;
7277 const accessToken = await getAccessTokenFromEntraId (
7378 azureEntraTenantId ,
7479 azureEntraClientId ,
Original file line number Diff line number Diff line change @@ -157,6 +157,9 @@ export interface Options {
157157
158158 /** Cortex specific fields */
159159 snowflakeAccount ?: string ;
160+
161+ /** Azure entra scope */
162+ azureEntraScope ?: string ;
160163}
161164
162165/**
You can’t perform that action at this time.
0 commit comments