Skip to content

FEAT add TargetConfiguration & pieces#1573

Merged
hannahwestra25 merged 14 commits intomicrosoft:mainfrom
hannahwestra25:hawestra/add_target_config_pieces
Apr 8, 2026
Merged

FEAT add TargetConfiguration & pieces#1573
hannahwestra25 merged 14 commits intomicrosoft:mainfrom
hannahwestra25:hawestra/add_target_config_pieces

Conversation

@hannahwestra25
Copy link
Copy Markdown
Contributor

Description

This PR is 2 of ~5 PRs to introduce/integrate TargetConfiguration. This PR adds TargetConfiguration and the necessary pieces within it. This will replace the current pattern where capability checks, normalization, and error handling are scattered across targets, attacks, converters, and scorers.
NOTE: this just adds the classes, does not replace any of the current logic nor is it used anywhere in this PR
New classes:

  1. UnsupportedCapabilityBehavior: ADAPT or RAISE per missing capability
  2. CapabilityHandlingPolicy: Frozen dataclass mapping capabilities to UnsupportedCapabilityBehavior
  3. ConversationNormalizationPipeline: Resolves capability gaps into an ordered normalizer tuple used before the conversation is sent to the target to produce a conversation which the target can handle

Full spec: https://microsoft-my.sharepoint.com/:w:/p/hannahwestra/cQoo3V80Zd4FTafKPqjDmr4vEgUCBfTfToMrXUEegSaVhFPj2A

Tests and Documentation

added tests

@hannahwestra25 hannahwestra25 marked this pull request as ready for review April 6, 2026 21:27
Copy link
Copy Markdown
Contributor

@behnam-o behnam-o left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Copy Markdown
Contributor

@jsong468 jsong468 left a comment

Choose a reason for hiding this comment

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

Thanks for a great design spec and clean implementation :)

Copy link
Copy Markdown
Contributor

@romanlutz romanlutz left a comment

Choose a reason for hiding this comment

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

Great work!

@hannahwestra25 hannahwestra25 merged commit 3186982 into microsoft:main Apr 8, 2026
37 checks passed
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.

4 participants