microsoft / microsoft/agent-framework
Python: [Samples][Python] azure_functions/02_multi_agent — config template and requirements.txt mismatch (Foundry vs OpenAI)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.6k
- Forks
- 2.3k
- Avg merge
- 2d 45m
- Merged PRs (30d)
- 358
Description
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: ReplaceFOUNDRY_PROJECT_ENDPOINT/FOUNDRY_MODELwithAZURE_OPENAI_ENDPOINT/AZURE_OPENAI_MODELrequirements.txt: Replacepackages/foundrywithpackages/openaiand update the commented PyPI line
Environment
- Python 3.13.13, Windows 11
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.