Repository navigation
Python: use FOUNDRY_* settings in the red teaming sample README - #9781
Open
NingLin Liu (ninglinLiu) wants to merge 12 commits into
Open
NingLin Liu (ninglinLiu) wants to merge 12 commits into
NingLin Liu (ninglinLiu) wants to merge 12 commits into
Conversation
NingLin Liu (ninglinLiu)
requested review from
SergeyMenshykh and
Eduard van Valkenburg (eavanvalkenburg)
as code owners
October 28, 2026 06:39
NingLin Liu (ninglinLiu)
temporarily deployed
to
github-app-auth
October 28, 2026 06:39 — with
GitHub Actions
Inactive
NingLin Liu (ninglinLiu)
requested review from
Roger Barreto (rogerbarreto) and
westey (westey-m)
as code owners
October 28, 2026 06:39
NingLin Liu (ninglinLiu)
requested review from
Darren Cohen (dargilco),
Jose Alvarez (jpalvarezl) and
sophia-ramsey
as code owners
October 28, 2026 06:39
NingLin Liu (ninglinLiu)
force-pushed
the
docs/red-teaming-foundry-env
branch
from
October 28, 2026 06:39
e52b228 to
3d930b3
Compare
NingLin Liu (ninglinLiu)
temporarily deployed
to
github-app-auth
October 28, 2026 06:39 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the documentation and comment updates aligning the sample’s setup with Foundry configuration.
No open issues 🎉
What changed in this PR
This PR aligns the Python red teaming sample’s setup instructions with the FOUNDRY_* settings used by FoundryChatClient. Changes are limited to documentation and comments; runtime behavior is unchanged.
Changes:
- Replace stale
AZURE_OPENAI_*settings withFOUNDRY_PROJECT_ENDPOINTandFOUNDRY_MODEL. - Document the Foundry project endpoint format and Azure CLI authentication.
- Update prerequisites and the constructor comment to match the existing client.
| File | Description |
|---|---|
python/samples/05-end-to-end/evaluation/red_teaming/red_team_agent_sample.py |
Corrects the environment-variable names in the constructor comment. |
python/samples/05-end-to-end/evaluation/red_teaming/README.md |
Aligns setup instructions and prerequisites with Foundry configuration. |
python/samples/05-end-to-end/evaluation/red_teaming/.env.example |
Provides the required Foundry settings and endpoint template. |
Review effort: Balanced
Contributor
Author
|
@microsoft-github-policy-service agree |
NingLin Liu (ninglinLiu)
temporarily deployed
to
github-app-auth
October 30, 2026 08:41 — with
GitHub Actions
Inactive
NingLin Liu (ninglinLiu)
temporarily deployed
to
github-app-auth
October 30, 2026 08:48 — with
GitHub Actions
Inactive
NingLin Liu (ninglinLiu)
temporarily deployed
to
github-app-auth
October 30, 2026 09:12 — with
GitHub Actions
Inactive
NingLin Liu (ninglinLiu)
temporarily deployed
to
github-app-auth
October 30, 2026 11:35 — with
GitHub Actions
Inactive
NingLin Liu (ninglinLiu)
temporarily deployed
to
github-app-auth
October 30, 2026 12:08 — with
GitHub Actions
Inactive
NingLin Liu (ninglinLiu)
temporarily deployed
to
github-app-auth
October 30, 2026 14:05 — with
GitHub Actions
Inactive
NingLin Liu (ninglinLiu)
temporarily deployed
to
github-app-auth
October 30, 2026 16:05 — with
GitHub Actions
Inactive
NingLin Liu (ninglinLiu)
temporarily deployed
to
github-app-auth
October 30, 2026 17:20 — with
GitHub Actions
Inactive
NingLin Liu (ninglinLiu)
temporarily deployed
to
github-app-auth
October 30, 2026 17:22 — with
GitHub Actions
Inactive
NingLin Liu (ninglinLiu)
temporarily deployed
to
github-app-auth
October 30, 2026 17:40 — with
GitHub Actions
Inactive
NingLin Liu (ninglinLiu)
temporarily deployed
to
github-app-auth
October 30, 2026 19:33 — with
GitHub Actions
Inactive
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation & Context
The red teaming sample (
python/samples/05-end-to-end/evaluation/red_teaming) builds its agent withFoundryChatClient(credential=credential)and passes no model. That client readsFOUNDRY_PROJECT_ENDPOINTandFOUNDRY_MODEL(env_prefix="FOUNDRY_") and ignoresAZURE_OPENAI_*. The README,.env.exampleand the comment above the constructor still ask forAZURE_OPENAI_ENDPOINT,AZURE_OPENAI_MODELand an optionalAZURE_OPENAI_API_KEY, and never mentionFOUNDRY_MODEL. Following them fails at startup withModel is required. Set via 'model' parameter or 'FOUNDRY_MODEL' environment variable.Description & Review Guide
README.md: the environment section listsFOUNDRY_PROJECT_ENDPOINT(used by both the agent andRedTeam) andFOUNDRY_MODEL, with thehttps://<resource>.services.ai.azure.com/api/projects/<project>endpoint format used by the other Foundry samples; the prerequisites and "The sample will" list describe a model deployed in the Foundry project /FoundryChatClientinstead of Azure OpenAI..env.example: same variables.red_team_agent_sample.py: the comment now says the constructor readsFOUNDRY_PROJECT_ENDPOINT, FOUNDRY_MODEL.RawFoundryChatClient.__init__inpackages/foundry/agent_framework_foundry/_chat_client.py(env_prefix="FOUNDRY_", theFOUNDRY_MODELerror).Related Issue
N/A - trivial change. Stale environment-variable names in one sample's README,
.env.exampleand a comment; the correction follows what the sample already reads, with no behavior change.AI Assistance
AI assistance details: finding the mismatch (README variables vs. the client settings the sample uses), the documentation edit, and this PR description.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.