1.16.6 (2026-04-27)
Bugs Fixed
- Fixed evaluation token usage not being emitted in the genai evaluation event, causing token consumption metrics to be missing from telemetry.
- Fixed multi-turn red team attacks(
RedTeamingAttack-based strategies likeMultiTurn) failing silently with PyRIT 0.11. Two bugs were patched at the SDK level: (1)RedTeamingAttack._setup_asyncraisedRuntimeError: Conversation already existsbecause it seeded prepended conversation messages before callingset_system_prompt; now patched per-instance on the adversarial chat target to tolerate existing conversation history. (2)RedTeamingAttack._generate_next_prompt_asyncreturnedcontext.next_messagewithout calling.duplicate_message(), causingsqlite3.IntegrityError: UNIQUE constraint failed: PromptMemoryEntries.idon the second turn; now patched at module load with an idempotent wrapper that duplicates the message before returning. - Fixed
sensitive_data_leakagered team attacks producing 100% false-pass rates._extract_context_itemsin the Foundry execution path only handledlistordictshapes formessages[0].context; pre-curated SDL attack objectives store the document text as astrwith siblingcontext_type/tool_namefields, so the document was silently dropped and a fallback synthesized a context item from the user prompt. The agent never received the sensitive document content and could not leak it, causing the evaluator to score every attempt as a pass. Addedstrhandling (both message-level and top-level), normalized raw string entries inside list-shaped context, and gated thecontext_typefallback so it only runs when no usable context was extracted (including thecontext: nullcase).