mirror of
https://github.com/openai/codex.git
synced 2026-11-13 06:45:07 +00:00
Source proactive multi-agent instructions from the model catalog (#41457)
## What changed - Add an optional `proactive` multi-agent mode message to model metadata. - Use the catalog's proactive message for `Ultra` reasoning when no general mode hint is configured. A missing value falls back to the built-in proactive instructions, while an empty value suppresses the mode message. - Keep explicit mode behavior for other reasoning efforts and refresh the applicable catalog message when the model changes. ## Testing - Cover proactive overrides, built-in fallback, empty-value suppression, mode-hint precedence, non-`Ultra` behavior, and model switches. GitOrigin-RevId: da0a9ebd9b58cf04ef13a703c210e5da2eed0884
This commit is contained in:
1 parent
2181224dad
commit
03861e69ef
4 files changed
+99
-11
No files matched your search
@@ -627,6 +627,9 @@ pub struct MultiAgentRoleMessages {
|
||||
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, TS, JsonSchema)]
|
||||
pub struct MultiAgentModeMessages {
|
||||
pub explicit: Option<String>,
|
||||
/// Ultra-only mode instructions. Missing or null uses the built-in proactive hint;
|
||||
/// an empty string suppresses the mode message. `hint_text` takes precedence.
|
||||
pub proactive: Option<String>,
|
||||
pub hint_text: Option<String>,
|
||||
}
|
||||
|
||||
@@ -1110,7 +1113,7 @@ mod tests {
|
||||
#[test]
|
||||
fn multi_agent_messages_preserve_missing_and_empty_values() {
|
||||
let messages: ModelMessages = from_str(
|
||||
r#"{"instructions_template":null,"instructions_variables":null,"multi_agent":{"role":{"root":"","subagent":"subagent base"},"mode":{"explicit":"explicit mode","hint_text":""}}}"#,
|
||||
r#"{"instructions_template":null,"instructions_variables":null,"multi_agent":{"role":{"root":"","subagent":"subagent base"},"mode":{"explicit":"explicit mode","proactive":"","hint_text":""}}}"#,
|
||||
)
|
||||
.expect("multi-agent messages should deserialize");
|
||||
|
||||
@@ -1123,6 +1126,7 @@ mod tests {
|
||||
}),
|
||||
mode: Some(MultiAgentModeMessages {
|
||||
explicit: Some("explicit mode".to_string()),
|
||||
proactive: Some(String::new()),
|
||||
hint_text: Some(String::new()),
|
||||
}),
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user