Skip to content

Python: list FOUNDRY_* settings in the multimodal input sample README - #9757

Closed
NingLin Liu (ninglinLiu) wants to merge 1 commit into
microsoft:mainfrom
ninglinLiu:docs/multimodal-foundry-env
Closed

NingLin Liu (ninglinLiu) wants to merge 1 commit into
microsoft:mainfrom
ninglinLiu:docs/multimodal-foundry-env

Conversation

@ninglinLiu

Copy link
Copy Markdown
Contributor

Motivation & Context

The multimodal input README tells users to set AZURE_OPENAI_ENDPOINT and AZURE_OPENAI_MODEL (listed twice) for the Azure samples, plus optional AZURE_OPENAI_API_VERSION / AZURE_OPENAI_API_KEY. But azure_chat_multimodal.py and azure_responses_multimodal.py both build FoundryChatClient(credential=AzureCliCredential()), which reads its settings with env_prefix="FOUNDRY_" (FOUNDRY_PROJECT_ENDPOINT, FOUNDRY_MODEL) and takes no API key or API version. Following the README leaves the sample failing with Model is required. Set via 'model' parameter or 'FOUNDRY_MODEL' environment variable. The in-code comments in both samples also say Requires AZURE_OPENAI_ENDPOINT and FOUNDRY_MODEL.

Description & Review Guide

  • What are the major changes?
    • python/samples/02-agents/multimodal_input/README.md: the Azure section now lists FOUNDRY_PROJECT_ENDPOINT and FOUNDRY_MODEL (the settings FoundryChatClient reads) and notes the az login requirement, replacing the duplicated AZURE_OPENAI_MODEL lines and the API version/key options the client does not use.
    • azure_chat_multimodal.py, azure_responses_multimodal.py: the comment now says Requires FOUNDRY_PROJECT_ENDPOINT and FOUNDRY_MODEL.
  • What is the impact of these changes? Documentation/comments only; sample behavior is unchanged.
  • What do you want reviewers to focus on? RawFoundryChatClient.__init__ in packages/foundry/agent_framework_foundry/_chat_client.py (env_prefix="FOUNDRY_", the FOUNDRY_MODEL error). The OpenAI section of the README is unchanged and still correct (openai_chat_multimodal.py passes the model explicitly).

Related Issue

N/A - trivial change. Stale environment-variable names in one sample README and two comments; the correction follows what the samples already read, with no behavior change.

AI Assistance

  • No material AI assistance was used.
  • This is an AI-assisted contribution. I reviewed, understood, and verified all submitted content and accept responsibility for it.

AI assistance details: finding the mismatch (README variables vs. the client settings the samples use), the documentation edit, and this PR description.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR links to an agreed issue with no competing open PR, or the Related Issue section documents a trivial-change or repository-automation exception.
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The documentation-only changes match the samples’ configuration and authentication requirements, with no unresolved findings.

No open issues 🎉

What changed in this PR

This PR corrects configuration guidance for the Python multimodal input samples to match their use of FoundryChatClient. Changes are limited to documentation and comments; runtime behavior is unchanged.

Changes:

  • Replace obsolete Azure OpenAI settings with FOUNDRY_PROJECT_ENDPOINT and FOUNDRY_MODEL.
  • Document the az login prerequisite for AzureCliCredential.
  • Correct environment-variable names in both Azure sample comments.
File Description
python/​samples/​02-agents/​multimodal_input/​README.md Correct required settings and authentication guidance.
python/​samples/​02-agents/​multimodal_input/​azure_responses_multimodal.py Correct the endpoint variable in a configuration comment.
python/​samples/​02-agents/​multimodal_input/​azure_chat_multimodal.py Correct the endpoint variable in a configuration comment.

Review effort: Balanced

@eavanvalkenburg

Copy link
Copy Markdown
Member

Thanks for correcting the sample setup, NingLin Liu (@ninglinLiu). Earlier open #9735 already makes the same Foundry environment-variable correction for these multimodal samples. The authentication note and adjacent comment updates here are part of that same setup fix, so I'm closing this newer PR as a duplicate to keep the fix and review in one place.

This branch was previously deployed

1 inactive deployment
github-app-auth — 3bceb3dd Deployed Oct 27, 2026 by ninglinLiu via add_label #26288
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants