Description
python/samples/04-hosting/azure_functions/02_multi_agent/ has two related mismatches that will cause a beginner to configure the wrong environment variables and use the wrong package:
1. local.settings.json.template has wrong env vars
The template contains:
"FOUNDRY_PROJECT_ENDPOINT": "<FOUNDRY_PROJECT_ENDPOINT>",
"FOUNDRY_MODEL": "<FOUNDRY_MODEL>"
But function_app.py uses OpenAIChatCompletionClient which reads AZURE_OPENAI_ENDPOINT and AZURE_OPENAI_MODEL. The docstring itself says: "Prerequisites: set AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_MODEL".
A beginner following the template will set the wrong env vars and get a silent configuration failure.
2. requirements.txt references wrong package
Same issue as durabletask/02 — the code imports agent_framework.openai but requirements.txt installs packages/foundry:
-e ../../../../packages/foundry ← should be packages/openai
Suggested Fix
local.settings.json.template: Replace FOUNDRY_PROJECT_ENDPOINT/FOUNDRY_MODEL with AZURE_OPENAI_ENDPOINT/AZURE_OPENAI_MODEL
requirements.txt: Replace packages/foundry with packages/openai and update the commented PyPI line
Environment
- Python 3.13.13, Windows 11
Description
python/samples/04-hosting/azure_functions/02_multi_agent/has two related mismatches that will cause a beginner to configure the wrong environment variables and use the wrong package:1.
local.settings.json.templatehas wrong env varsThe template contains:
But
function_app.pyusesOpenAIChatCompletionClientwhich readsAZURE_OPENAI_ENDPOINTandAZURE_OPENAI_MODEL. The docstring itself says: "Prerequisites: setAZURE_OPENAI_ENDPOINT,AZURE_OPENAI_MODEL".A beginner following the template will set the wrong env vars and get a silent configuration failure.
2.
requirements.txtreferences wrong packageSame issue as durabletask/02 — the code imports
agent_framework.openaibut requirements.txt installspackages/foundry:Suggested Fix
local.settings.json.template: ReplaceFOUNDRY_PROJECT_ENDPOINT/FOUNDRY_MODELwithAZURE_OPENAI_ENDPOINT/AZURE_OPENAI_MODELrequirements.txt: Replacepackages/foundrywithpackages/openaiand update the commented PyPI lineEnvironment