Skip to content

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

@leestott

Description

@leestott

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

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationpython

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions