You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Target send forwards system prompts despite an explicit RAISE policy #3862
With supports_system_prompt=False, editable multi-turn history, and an explicit SYSTEM_PROMPT: RAISE policy, set_system_prompt_async accepts the setup. The policy contract says the subsequent send will raise, but send_prompt_async forwards the system and user messages to the provider transport and returns its response. Configuration validation rejects this exact capability/policy combination, while send-boundary validation does not check the remaining system role.
This is a capability-policy correctness issue; no provider-side rejection or security consequence is claimed.
Steps/Code to Reproduce
Create an OpenAIChatTarget with supports_system_prompt=False, a SYSTEM_PROMPT: RAISE handling policy, editable multi-turn history, and an HTTPX mock transport returning a synthetic response. Set a system prompt and send a user message. The retained minimal reproduction uses real public SDK/configuration/serialization APIs and captures the transport request.
Expected Results
Raise before transport when unsupported system messages remain under RAISE. Explicit ADAPT and native support should retain their existing behavior.
Actual Results
The mock transport receives [{"role":"system","content":"Policy"},{"role":"user","content":"Question"}] and the send returns successfully. Separate configuration validation reports that the target does not support supports_system_prompt under the RAISE policy.
Screenshots
N/A. SDK reproduction with a synthetic HTTP response.
Versions
Linux; Python 3.12.3; PyRIT 1.2.0.dev0 at revision 01ce6ca66a315770b36c7dca1f320668c0d92d7c; OpenAI 2.54.0; HTTPX 0.28.1. Focused target tests passed; no live provider, credentials, or inference used.
I would like to take this. Plan: add a system-role check to PromptTarget._validate_request so a leftover system message raises before transport when the target lacks native system prompt support, with a regression test.
Activity
thelastbackspace commentedon Nov 3, 2026
I would like to take this. Plan: add a system-role check to
PromptTarget._validate_requestso a leftover system message raises before transport when the target lacks native system prompt support, with a regression test.