microsoft / microsoft/agent-framework

Python: [Samples][Python] azure_functions/02_multi_agent — config template and requirements.txt mismatch (Foundry vs OpenAI)

Open
#5,398 0 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

documentation python
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

  1. local.settings.json.template: Replace FOUNDRY_PROJECT_ENDPOINT/FOUNDRY_MODEL with AZURE_OPENAI_ENDPOINT/AZURE_OPENAI_MODEL
  2. requirements.txt: Replace packages/foundry with packages/openai and update the commented PyPI line

Environment

  • Python 3.13.13, Windows 11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.