Skip to content

Python: RedTeam - (UserError) RedTeam target is invalid #41561

Open
@angandin

Description

@angandin
  • 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 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.
Tried also with Azure OpenAI Resource directly connected to the project, got same error

Metadata

Metadata

Assignees

Labels

AI ProjectsClientThis issue points to a problem in the data-plane of the library.Service AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions