mirror of
https://github.com/openai/codex.git
synced 2026-11-16 06:54:36 +00:00
Support model catalog templates for Guardian policy prompts (#33177)
## What changed - Add an optional `policy_template` field to auto-review model messages. - Build Guardian instructions from the catalog template when present, while preserving the existing precedence for managed and catalog policy content. - Fall back independently to the bundled template and bundled policy, and preserve explicit empty catalog values. ## Testing - Cover missing and empty template deserialization, policy precedence, bundled fallbacks, and Guardian prewarm instructions. GitOrigin-RevId: 93116dadbc9bf40527882844a428caed4159fff6
This commit is contained in:
1 parent
6e215e0db5
commit
68c6e5df2b
9 files changed
+156
-44
No files matched your search
@@ -156,10 +156,6 @@ use prompt::collect_guardian_transcript_entries;
|
||||
#[cfg(test)]
|
||||
use prompt::guardian_output_schema;
|
||||
#[cfg(test)]
|
||||
pub(crate) use prompt::guardian_policy_prompt;
|
||||
#[cfg(test)]
|
||||
pub(crate) use prompt::guardian_policy_prompt_with_config;
|
||||
#[cfg(test)]
|
||||
use prompt::guardian_truncate_text;
|
||||
#[cfg(test)]
|
||||
use prompt::parse_guardian_assessment;
|
||||
|
||||
Reference in new issue
Block a user