File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,9 +84,9 @@ Example of LCS config section:
8484
8585``` yaml
8686azure_entra_id :
87- tenant_id : ${env.AZURE_TENANT_ID }
88- client_id : ${env.AZURE_CLIENT_ID }
89- client_secret : ${env.AZURE_CLIENT_SECRET }
87+ tenant_id : ${env.TENANT_ID }
88+ client_id : ${env.CLIENT_ID }
89+ client_secret : ${env.CLIENT_SECRET }
9090 # scope: "https://cognitiveservices.azure.com/.default" # optional, this is the default
9191```
9292
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ dependencies = [
6060 " urllib3==2.6.2" ,
6161 # Used for agent card configuration
6262 " PyYAML>=6.0.0" ,
63+ # Used for Azure Entra ID token managment
6364 " azure-core" ,
6465 " azure-identity" ,
6566]
Original file line number Diff line number Diff line change @@ -12,24 +12,24 @@ ENV_FILE="/opt/app-root/.env"
1212# Enrich config if lightspeed config exists
1313if [ -f " $LIGHTSPEED_CONFIG " ]; then
1414 echo " Enriching llama-stack config..."
15+ ENRICHMENT_FAILED=0
1516 python3 /opt/app-root/llama_stack_configuration.py \
1617 -c " $LIGHTSPEED_CONFIG " \
1718 -i " $INPUT_CONFIG " \
1819 -o " $ENRICHED_CONFIG " \
19- -e " $ENV_FILE " 2>&1 || true
20+ -e " $ENV_FILE " 2>&1 || ENRICHMENT_FAILED=1
2021
2122 # Source .env if generated (contains AZURE_API_KEY)
2223 if [ -f " $ENV_FILE " ]; then
2324 # shellcheck source=/dev/null
2425 set -a && . " $ENV_FILE " && set +a
2526 fi
2627
27- if [ -f " $ENRICHED_CONFIG " ]; then
28+ if [ -f " $ENRICHED_CONFIG " ] && [ " $ENRICHMENT_FAILED " -eq 0 ] ; then
2829 echo " Using enriched config: $ENRICHED_CONFIG "
2930 exec llama stack run " $ENRICHED_CONFIG "
3031 fi
3132fi
3233
3334echo " Using original config: $INPUT_CONFIG "
3435exec llama stack run " $INPUT_CONFIG "
35-
Original file line number Diff line number Diff line change @@ -46,10 +46,6 @@ async def lifespan(_app: FastAPI) -> AsyncIterator[None]:
4646 AzureEntraIDManager ().set_config (azure_config )
4747 try :
4848 await AzureEntraIDManager ().refresh_token ()
49- os .environ ["AZURE_API_KEY" ] = (
50- AzureEntraIDManager ().access_token .get_secret_value ()
51- )
52- logger .info ("Azure Entra ID token set in environment" )
5349 except ValueError as e :
5450 logger .error ("Failed to refresh Azure token: %s" , e )
5551
Original file line number Diff line number Diff line change @@ -143,10 +143,10 @@ def construct_vector_dbs_section(
143143 for brag in byok_rag :
144144 output .append (
145145 {
146- "vector_db_id" : brag .get ("vector_db_id" ),
146+ "vector_db_id" : brag .get ("vector_db_id" , "" ),
147147 "provider_id" : "byok_" + brag .get ("vector_db_id" , "" ),
148- "embedding_model" : brag .get ("embedding_model" , "all-MiniLM-L6-v2 " ),
149- "embedding_dimension" : brag .get ("embedding_dimension" , 384 ),
148+ "embedding_model" : brag .get ("embedding_model" , "" ),
149+ "embedding_dimension" : brag .get ("embedding_dimension" ),
150150 }
151151 )
152152 logger .info (
You can’t perform that action at this time.
0 commit comments