Skip to content

Python: Point Foundry-migrated sample READMEs at the settings the code reads - #9759

Draft
Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
microsoft:mainfrom
1aifanatic:contrib/python-sample-readme-foundry-settings
Draft

Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
microsoft:mainfrom
1aifanatic:contrib/python-sample-readme-foundry-settings

Conversation

@1aifanatic

Copy link
Copy Markdown
Contributor

Motivation & Context

These Python samples moved to FoundryChatClient in the Foundry migration (#6557), but their READMEs still tell readers to set AZURE_OPENAI_* names that the code never reads. This is the Python counterpart of #9600 for .NET.

README asks for the sample reads following the README
02-agents/devui/agent_content_understanding AZURE_OPENAI_RESPONSES_DEPLOYMENT_NAME FOUNDRY_MODEL KeyError: 'FOUNDRY_MODEL' at import
02-agents/devui/agent_content_understanding_file_search_azure_openai same FOUNDRY_MODEL same
02-agents/context_providers (azure_ai_foundry_memory.py) AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME AZURE_OPENAI_EMBEDDING_MODEL KeyError
02-agents/skills/file_based_skill, mixed_skills AZURE_OPENAI_MODEL FOUNDRY_MODEL, default gpt-4o-mini the configured model is silently ignored
05-end-to-end/chatkit-integration AZURE_OPENAI_ENDPOINT / _API_VERSION / _MODEL FoundryChatClient (FOUNDRY_PROJECT_ENDPOINT, FOUNDRY_MODEL) ValueError: Model is required. Set via 'model' parameter or 'FOUNDRY_MODEL' environment variable.

Two READMEs also show a FOUNDRY_PROJECT_ENDPOINT that is not a Foundry project endpoint: https://your-project.api.azureml.ms and https://your-project.openai.azure.com/.

Description & Review Guide

  • What are the major changes? README text only:
    • Use the variable names each sample reads.
    • Show the https://<account>.services.ai.azure.com/api/projects/<project> endpoint format that the sibling READMEs use.
    • In the ChatKit README, the prerequisites and component description now say the server uses FoundryChatClient.
  • What is the impact of these changes? Documentation only.
  • What do you want reviewers to focus on? Nothing special.

I found these by comparing the environment variables each sample README names with the names its Python files and .env templates reference. The rows above with errors were reproduced by setting only the README's variables. The other matches from that comparison are variables the OpenAI/Azure clients read implicitly, such as AZURE_OPENAI_API_KEY in the chat-client README, so they are correct and unchanged.

Related Issue

N/A - trivial change: the READMEs are corrected to the variable names the samples already read.

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: Claude Code helped compare README variables with what each sample reads, reproduce the failures, make the edits, and draft this 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.

🤖 Generated with Claude Code

…e reads

These samples read FOUNDRY_PROJECT_ENDPOINT / FOUNDRY_MODEL (and
AZURE_OPENAI_EMBEDDING_MODEL for Foundry memory), but their READMEs still
ask for AZURE_OPENAI_* names from before the Foundry migration, so a reader
following the README hits a KeyError. Also show the Foundry project
endpoint format where a README showed an Azure ML or Azure OpenAI host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 27, 2026 12:51
@agent-framework-automation agent-framework-automation Bot added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python labels Oct 27, 2026

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 narrow documentation corrections match the sample configuration contracts, with no unresolved issues identified.

No open issues 🎉

What changed in this PR

Updates six Python sample READMEs to document the settings their existing Foundry-based implementations read. These are documentation-only corrections; runtime behavior is unchanged.

Changes:

  • Replace outdated model and embedding environment variable names.
  • Correct two Foundry project endpoint examples.
  • Align ChatKit prerequisites and component descriptions with FoundryChatClient.
File Description
python/​samples/​05-end-to-end/​chatkit-integration/​README.md Documents Foundry configuration, prerequisites, and client usage.
python/​samples/​02-agents/​skills/​mixed_skills/​README.md Corrects the project endpoint and model variable.
python/​samples/​02-agents/​skills/​file_based_skill/​README.md Uses FOUNDRY_MODEL for model configuration.
python/​samples/​02-agents/​devui/​agent_content_understanding/​README.md Corrects the project endpoint and model variable.
python/​samples/​02-agents/​devui/​agent_content_understanding_file_search_azure_openai/​README.md Uses FOUNDRY_MODEL for model configuration.
python/​samples/​02-agents/​context_providers/​README.md Corrects the embedding model variable.

Review effort: Balanced

This branch was previously deployed

1 inactive deployment
github-app-auth — 7a931ea6 Deployed Oct 27, 2026 by 1aifanatic via team_check #7693
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