Python: [BREAKING] Remove deprecated Python OpenAI/Azure AI surfaces (#4990)

* [BREAKING] Remove deprecated Python OpenAI/Azure AI surfaces

Also clean up follow-on docs, environment guidance, package metadata, and lab test stability.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix deleted semantic-kernel sample links

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address PR review feedback

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* improve foundry language

* Fix A2A Foundry sample regression

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Eduard van Valkenburg
2026-03-31 20:36:21 +00:00
committed by GitHub
co-authored by Copilot
parent a5eacbbe65
commit 3a49b1d6dd
144 changed files with 669 additions and 18739 deletions
@@ -5,4 +5,4 @@ AZURE_OPENAI_DEPLOYMENT_NAME=gpt-4o
# Azure AI Project Configuration (for red teaming)
# Create these resources at: https://portal.azure.com
AZURE_AI_PROJECT_ENDPOINT=your-ai-project-name
FOUNDRY_PROJECT_ENDPOINT=your-ai-project-name
@@ -11,7 +11,7 @@ For more details on the Red Team setup see [the Azure AI Foundry docs](https://l
A focused sample demonstrating Azure AI's RedTeam functionality to assess the safety and resilience of Agent Framework agents against adversarial attacks.
**What it demonstrates:**
1. Creating a financial advisor agent inline using `AzureOpenAIChatClient`
1. Creating a financial advisor agent inline using `FoundryChatClient`
2. Setting up an async callback to interface the agent with RedTeam evaluator
3. Running comprehensive evaluations with 11 different attack strategies:
- Basic: EASY and MODERATE difficulty levels
@@ -47,7 +47,7 @@ AZURE_OPENAI_DEPLOYMENT_NAME=gpt-4o
# AZURE_OPENAI_API_KEY is optional if using Azure CLI authentication
# Azure AI Project (for red teaming)
AZURE_AI_PROJECT_ENDPOINT=https://your-project.api.azureml.ms
FOUNDRY_PROJECT_ENDPOINT=https://your-project.api.azureml.ms
```
See `.env.example` for a template.
@@ -113,7 +113,7 @@ async def main() -> None:
credential = AzureCliCredential()
# 2. Create agent inline
agent = AzureOpenAIChatClient(credential=credential).as_agent(
agent = FoundryChatClient(credential=credential).as_agent(
model="gpt-4o",
instructions="You are a helpful financial advisor..."
)
@@ -125,7 +125,7 @@ async def main() -> None:
# 4. Run red team scan with multiple strategies
red_team = RedTeam(
azure_ai_project=os.environ["AZURE_AI_PROJECT_ENDPOINT"],
azure_ai_project=os.environ["FOUNDRY_PROJECT_ENDPOINT"],
credential=credential
)
results = await red_team.scan(