Is your feature request related to a problem? Please describe.
The custom-scenario flow needs a simple scorer choice. PyRIT already has ScorerRegistry and ScorerInitializer presets, but the GUI currently has no read API for choosing configured objective-scorer instances.
Work item 12 of 17 in #2744. This is now available for contributions as an independent API track, in parallel with the main explorer sequence (currently #2748). It uses the existing scorer registry and initializer and does not depend on dataset browsing, the explorer UI, or provider loading. Integration into the scenario flow remains a later step in #2757.
Describe the solution you'd like
Expose a small typed API for initialized, compatible objective-scorer presets from ScorerRegistry.instances.
- Return stable registry names, useful descriptions, scorer/result family, relevant tags, compatibility/prerequisite information, and the compatible configured default_objective_scorer selection.
- Offer ready instances, not just buildable class names. Listing must not instantiate scorers, invoke targets, or manufacture credential-backed configuration.
- Reuse existing presets/composites where available, such as inverted_refusal, task-achieved variants, acs_with_refusal, and scale_and_refusal. Availability depends on initialized targets and ScorerInitializer.
- Preserve objective-result meaning. Raw refusal=true means refusal and must not be exposed as attack success; use an appropriate existing inverter/composite or clearly validated objective preset.
- Report an empty/unusable registry clearly so the GUI can guide setup. Do not silently choose an incompatible default or expose secrets through identifiers/configuration metadata.
Acceptance criteria:
Describe alternatives you've considered, if relevant
Do not create a hardcoded frontend scorer list, a general scorer builder, a new scorer registry, or an unscored scenario mode. One selected objective scorer may already be a composite; arbitrary multi-scorer aggregation is out of scope.
Additional context
Start with pyrit\registry\components\scorer_registry.py, pyrit\setup\initializers\scorers.py, and Scenario._get_default_objective_scorer(). The existing /scores routes concern score operations, not a configured-scorer catalog. Follow model/Python/scorer/test instructions and keep registry responsibility separate from service DTOs.
Is your feature request related to a problem? Please describe.
The custom-scenario flow needs a simple scorer choice. PyRIT already has ScorerRegistry and ScorerInitializer presets, but the GUI currently has no read API for choosing configured objective-scorer instances.
Work item 12 of 17 in #2744. This is now available for contributions as an independent API track, in parallel with the main explorer sequence (currently #2748). It uses the existing scorer registry and initializer and does not depend on dataset browsing, the explorer UI, or provider loading. Integration into the scenario flow remains a later step in #2757.
Describe the solution you'd like
Expose a small typed API for initialized, compatible objective-scorer presets from ScorerRegistry.instances.
Acceptance criteria:
Describe alternatives you've considered, if relevant
Do not create a hardcoded frontend scorer list, a general scorer builder, a new scorer registry, or an unscored scenario mode. One selected objective scorer may already be a composite; arbitrary multi-scorer aggregation is out of scope.
Additional context
Start with pyrit\registry\components\scorer_registry.py, pyrit\setup\initializers\scorers.py, and Scenario._get_default_objective_scorer(). The existing /scores routes concern score operations, not a configured-scorer catalog. Follow model/Python/scorer/test instructions and keep registry responsibility separate from service DTOs.