Repository navigation
Python: use FOUNDRY_* settings in the red teaming sample README - #9781
NingLin Liu (ninglinLiu) wants to merge 1 commit into
Conversation
e52b228 to
3d930b3
Compare
|
NingLin Liu (@ninglinLiu) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
1 similar comment
|
NingLin Liu (@ninglinLiu) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
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
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.