Skip to content

Python: use FOUNDRY_MODEL in the Content Understanding DevUI sample READMEs - #9740

Open
NingLin Liu (ninglinLiu) wants to merge 10 commits into
microsoft:mainfrom
ninglinLiu:docs/cu-devui-foundry-model
Open

NingLin Liu (ninglinLiu) wants to merge 10 commits into
microsoft:mainfrom
ninglinLiu:docs/cu-devui-foundry-model

Conversation

@ninglinLiu

Copy link
Copy Markdown
Contributor

Motivation & Context

The setup steps in the two Content Understanding DevUI sample READMEs tell users to set AZURE_OPENAI_RESPONSES_DEPLOYMENT_NAME=gpt-4.1, but neither sample reads that variable. Both agent.py files build the client with model=os.environ["FOUNDRY_MODEL"] (and list FOUNDRY_MODEL in their docstrings), so a .env written from the README fails with KeyError: 'FOUNDRY_MODEL' when DevUI loads the agent.

Description & Review Guide

  • What are the major changes? Replace AZURE_OPENAI_RESPONSES_DEPLOYMENT_NAME with FOUNDRY_MODEL in the environment-variable block of:
    • python/samples/02-agents/devui/agent_content_understanding/README.md
    • python/samples/02-agents/devui/agent_content_understanding_file_search_azure_openai/README.md
  • What is the impact of these changes? Documentation only; the samples' code and behavior are unchanged.
  • What do you want reviewers to focus on? That FOUNDRY_MODEL is the variable the samples read: agent_content_understanding/agent.py line 49 and agent_content_understanding_file_search_azure_openai/agent.py line 62. No other variable in either block is affected (FOUNDRY_PROJECT_ENDPOINT and AZURE_CONTENTUNDERSTANDING_ENDPOINT match the code).

Related Issue

N/A - trivial change. A stale environment-variable name in two README setup blocks; the correction follows the variable the existing sample code already reads, 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. os.environ reads in the samples), 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

Both documentation corrections match the agents’ existing FOUNDRY_MODEL reads, with no unresolved issues.

No open issues 🎉

What changed in this PR

Corrects the setup instructions for two Content Understanding DevUI samples to match the environment variable their agents already read.

Changes:

  • Replaces AZURE_OPENAI_RESPONSES_DEPLOYMENT_NAME with FOUNDRY_MODEL in both README environment blocks.
  • Leaves sample code, model values, and other environment variables unchanged.
File Description
python/​samples/​02-agents/​devui/​agent_content_understanding/​README.md Corrects the model environment variable in setup instructions.
python/​samples/​02-agents/​devui/​agent_content_understanding_file_search_azure_openai/​README.md Applies the same correction to the file-search sample.

Review effort: Balanced

This branch was previously deployed

1 inactive deployment
github-app-auth — c5b24eb6 Deployed Oct 30, 2026 by ninglinLiu via add_label #26747
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.

2 participants