Skip to content

FEAT: Supporting Converter Configuration on REST API - #2536

Open
Richard Lundeen (rlundeen2) wants to merge 1 commit into
microsoft:mainfrom
rlundeen2:rlundeen2-chat-converter-pipelines
Open

FEAT: Supporting Converter Configuration on REST API#2536
Richard Lundeen (rlundeen2) wants to merge 1 commit into
microsoft:mainfrom
rlundeen2:rlundeen2-chat-converter-pipelines

Conversation

@rlundeen2

Copy link
Copy Markdown
Contributor

Description

Adds REST support for ordered, registry-backed request and response converter configurations without changing the PromptNormalizer contract.

  • Preserves converter order, piece-index selectors, and prompt data-type selectors.
  • Resolves registry IDs once before message persistence and reuses the resolved configurations for converter tracking.
  • Keeps the legacy global converter_ids request pipeline for compatibility and emits a deprecation warning for removal in PyRIT 1.3.0.
  • Rejects conflicting legacy and structured request fields, invalid selectors, and converter configurations when send=False.
  • Excludes only client-preconverted pieces from request conversion while retaining conversion for other eligible pieces.

Tests and Documentation

  • Added backend service and route coverage for ordering, targeting, response forwarding, legacy compatibility and warnings, validation, missing registry IDs, metadata tracking, and preconverted pieces.
  • Ran UV_NO_SYNC=1 uv run --no-sync python -m pytest tests/unit/backend/test_attack_service.py tests/unit/backend/test_api_routes.py -q (206 passed).
  • Ran UV_NO_SYNC=1 uv run --no-sync pre-commit run --all-files (all hooks passed).
  • Updated REST model and route descriptions. JupyText is not applicable.

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

Copilot-Session: dad4cb22-3dd3-41d5-b874-2df319502396
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.

1 participant