Skip to content

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

Closed

Description

@romanlutz

AddMessageRequest (the backend request model for sending a message) still accepts a top-level converter_ids list. It was replaced by request_converter_configurations, and using it prints a deprecation warning that says it will be removed in 1.3.0. main is at 1.3.0.dev0, so it has to go before the release. The GUI already sends the new field (useChatSend.ts).

What to change

  • pyrit/backend/models/attacks.py: remove the converter_ids field from AddMessageRequest, and its two uses in the model validator (L912-L916).
  • pyrit/backend/services/message_send_service.py: _resolve_request_converter_configs loses its legacy branch and the warning. What is left is a one-line call to _resolve_converter_configs, so consider inlining it.
  • pyrit/backend/routes/attacks.py: remove the sentence in the route docstring about the deprecated pipeline.
  • frontend/src/types/index.ts: remove the optional converter_ids from the AddMessageRequest interface.
  • Tests: remove the deprecation tests in tests/unit/backend/test_message_send_service.py, and update any backend or frontend test that builds an AddMessageRequest with a top-level converter_ids.

Watch out for

  • Only the top-level field on AddMessageRequest goes. converter_ids is also a current, non-deprecated field on ConverterConfigurationRequest and on the converter preview request, and message pieces have applied_converter_ids. Leave all of those alone.
  • Old clients must fail loudly. Pydantic ignores unknown fields by default, so after the removal a client that still sends converter_ids would have its message sent without converters and without any error. Make such a request fail validation (HTTP 422) with a message that points to request_converter_configurations, and add a test for it.

Done when

  • AddMessageRequest has no converter_ids field in the backend model or the frontend type.
  • A request with a top-level converter_ids is rejected rather than silently sent unconverted.
  • Backend unit tests, frontend tests (npm test, npm run lint) and pre-commit pass.

How to contribute

  • Claim it first. Before you start, comment on this issue to say you are taking it.
  • First comment wins. If yours is the first claim comment, go ahead and open a PR; you do not need to wait for a reply. If someone has already commented, this issue is taken, so please pick a different one.
  • Link this issue in your PR description.

Activity

  1. khushi-git-7 commented on Nov 18, 2026

    @khushi-git-7
    Contributor

    I'm taking this one: removing converter_ids from AddMessageRequest, its validator uses and the legacy branch in _resolve_request_converter_configs, with the tests updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

help wantedExtra attention is needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions