Skip to content

MAINT: Remove the deprecated converter_ids field from AddMessageRequest - #4430

Merged
Roman Lutz (romanlutz) merged 4 commits into
microsoft:mainfrom
khushi-git-7:maint/4392-add-message-converter-ids
Nov 21, 2026
Merged

Roman Lutz (romanlutz) merged 4 commits into
microsoft:mainfrom
khushi-git-7:maint/4392-add-message-converter-ids

Conversation

@khushi-git-7

@khushi-git-7 Khushi (khushi-git-7) commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Description

Removes the deprecated top-level converter_ids field from AddMessageRequest, due in 1.3.0, and makes clients that still send it fail loudly. Closes #4392.

  • Model: removes the field and its two uses in _validate_converter_configurations. A mode="before" validator rejects any request that still has a top-level converter_ids key (HTTP 422) with a message pointing to request_converter_configurations, so an old client can't have its message sent without converters. converter_ids on ConverterConfigurationRequest and on the preview request, and applied_converter_ids, are untouched.
  • Service: _resolve_request_converter_configs loses its legacy branch and the warning. I kept it as a one-line method rather than inlining it, because a test in test_message_send_service.py patches request and response resolution separately through it.
  • The route docstring and the frontend AddMessageRequest type no longer mention the field.
  • Tests: removes the three legacy tests, adds a route test that converter_ids (a list, [] or null) returns 422 without reaching the service, switches the send=False route test to request_converter_configurations, and drops the converter_ids cases from the conflict and size-limit tests.
  • The e2e message mock in frontend/e2e/converters.spec.ts no longer falls back to a top-level converter_ids.

Copilot AI balanced review requested due to automatic review settings November 19, 2026 15:29

Copilot AI left a comment

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.

🟢 Approval recommended

No active review issues are identified for the removal of the deprecated top-level converter_ids field.

No open issues 🎉

What changed in this PR

Removes the deprecated top-level converter_ids field from the message-send API for 1.3.0, addressing #4392. Nested converter IDs, preview requests, and applied-converter metadata remain unchanged.

Changes:

  • Rejects legacy input with HTTP 422 and guidance to use request_converter_configurations, including empty lists and null.
  • Removes legacy converter resolution, the frontend field, and outdated route documentation.
  • Updates tests to cover rejection and retain structured-configuration validation.
File Description
tests/​unit/​backend/​test_message_send_service.py Removes obsolete legacy-converter compatibility tests.
tests/​unit/​backend/​test_common_models.py Removes the obsolete top-level converter size-limit case.
tests/​unit/​backend/​test_api_routes.py Adds legacy-input rejection coverage and updates validation cases.
pyrit/​backend/​services/​message_send_service.py Removes legacy converter resolution and its deprecation warning.
pyrit/​backend/​routes/​attacks.py Removes the deprecated pipeline description from the route docstring.
pyrit/​backend/​models/​attacks.py Removes the field and explicitly rejects requests containing it.
frontend/​src/​types/​index.ts Removes the field from the frontend request interface.

Review effort: Balanced

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Nov 21, 2026
Merged via the queue into microsoft:main with commit bba0338 Nov 21, 2026
65 checks passed
@khushi-git-7

Copy link
Copy Markdown
Contributor Author

Thanks for the review, the test cleanup and the merge, Roman Lutz (@romanlutz).

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.

MAINT: Remove the deprecated converter_ids field from AddMessageRequest (due in 1.3.0)

3 participants