Skip to content

Conversation

Copy link

Copilot AI commented Jul 7, 2025

The Azure AI evaluation generated client was using incorrect header format for client request IDs. The headers were using client_request_id instead of the Azure standard x-ms-client-request-id format.

Changes Made

Updated the header key format in _generated_rai_client.py:

Before:

headers={"client_request_id": scan_session_id}

After:

headers={"x-ms-client-request-id": scan_session_id}

Files Modified

  • sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/simulator/_model_tools/_generated_rai_client.py
    • Line 127: Fixed header in get_attack_objectives method
    • Line 149: Fixed header in get_jailbreak_prefixes method

Impact

This ensures that the Azure AI evaluation client now uses the correct Azure standard request ID header format, which is expected by Azure services for proper request tracking and correlation.

Fixes #4.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] Update the request id for red team agent scan Fix client request ID header format in Azure AI evaluation generated client Jul 7, 2025
Copilot AI requested a review from nagkumar91 July 7, 2025 18:08
@nagkumar91
Copy link
Owner

@copilot what about this file sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/rai_service.py ?
Can you make the change here as well?

Copy link
Author

Copilot AI commented Jul 7, 2025

@copilot what about this file sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/rai_service.py ?
Can you make the change here as well?

Fixed the header format in rai_service.py as well. Updated line 293 from client_request_id to x-ms-client-request-id to match the Azure standard. Commit: aad48df

@nagkumar91 nagkumar91 marked this pull request as ready for review July 7, 2025 18:33
@nagkumar91 nagkumar91 merged commit db75552 into main Jul 10, 2025
1 check passed
@nagkumar91 nagkumar91 deleted the copilot/fix-4 branch July 10, 2025 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update the request id for red team agent scan

2 participants