Azure / Azure/azure-sdk-for-python

Python: RedTeam - (UserError) RedTeam target is invalid

Aperta
#41,561 2 commenti 0 reazioni 1 assegnatario Rivendicata da @singankit Vedi su GitHub
AI Projects Client customer-reported needs-team-attention question Service Attention
Lingua principale
Python
Stelle
5.6k
Fork
3.4k
Merge medio
2g
PR unite (30g)
217

Descrizione

- **Package Name**: azure-ai-projects
- **Package Version**: 1.0.0b11
- **Operating System**: Windows
- **Python Version**: 3.13.3

**Describe the bug**
Creating a redteam run returns error:
_HttpResponseError: (UserError) RedTeam target is invalid
Code: UserError
Message: RedTeam target is invalid_

**To Reproduce**
Steps to reproduce the behavior:
following the official doc: [https://learn.microsoft.com/en-us/azure/ai-foundry/how-to/develop/run-ai-red-teaming-cloud?tabs=python](url) to config and create a redteam class
1. setup the project client on a Foundry Project based project, like _https://my-foundryproject-resource.services.ai.azure.com/api/projects/my-foundryproject_
2. configure model_endpoint as the Azure AI Foundry resource in the Foundry Project, as described in the doc, like: _https://my-foundryproject-resource.services.ai.azure.com_
3. set model_api_key as the key of the Azure AI Foundry resource on which the project is automatically linked
4. set model_deployment_name as one of the deployment available

**Expected behavior**
redteam run created and running

**Additional context**
Class RedTeam is referenced here: [https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py](url).
Tried also with Azure OpenAI Resource directly connected to the project, got same error

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.