Skip to content

Preserve tool and developer roles in conversation context#1510

Open
biefan wants to merge 1 commit intomicrosoft:mainfrom
biefan:fix-conversation-context-role-labels
Open

Preserve tool and developer roles in conversation context#1510
biefan wants to merge 1 commit intomicrosoft:mainfrom
biefan:fix-conversation-context-role-labels

Conversation

@biefan
Copy link
Copy Markdown
Contributor

@biefan biefan commented Mar 17, 2026

Summary

  • preserve tool and developer role labels in ConversationContextNormalizer
  • keep existing User and Assistant formatting for current API-compatible roles
  • add regression tests covering tool and developer messages in context output

Testing

  • .venv/bin/pytest tests/unit/message_normalizer -q
  • .venv/bin/ruff check pyrit/message_normalizer/conversation_context_normalizer.py tests/unit/message_normalizer/test_conversation_context_normalizer.py

...
"""

_ROLE_LABELS = {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use ChatMessageRole from pyrit.models.literals

@hannahwestra25 hannahwestra25 self-assigned this Mar 20, 2026
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.

2 participants