mirror of
https://github.com/openai/codex.git
synced 2026-05-02 12:21:26 +03:00
chore: send_message and followup_task do not return anything (#17008)
This commit is contained in:
@@ -155,7 +155,7 @@ pub fn create_send_message_tool() -> ToolSpec {
|
||||
required: Some(vec!["target".to_string(), "message".to_string()]),
|
||||
additional_properties: Some(false.into()),
|
||||
},
|
||||
output_schema: Some(send_input_output_schema()),
|
||||
output_schema: None,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ pub fn create_followup_task_tool() -> ToolSpec {
|
||||
required: Some(vec!["target".to_string(), "message".to_string()]),
|
||||
additional_properties: Some(false.into()),
|
||||
},
|
||||
output_schema: Some(send_input_output_schema()),
|
||||
output_schema: None,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ fn spawn_agent_tool_v1_keeps_legacy_fork_context_field() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn send_message_tool_requires_message_and_uses_submission_output() {
|
||||
fn send_message_tool_requires_message_and_has_no_output_schema() {
|
||||
let ToolSpec::Function(ResponsesApiTool {
|
||||
parameters,
|
||||
output_schema,
|
||||
@@ -122,14 +122,11 @@ fn send_message_tool_requires_message_and_uses_submission_output() {
|
||||
required,
|
||||
Some(vec!["target".to_string(), "message".to_string()])
|
||||
);
|
||||
assert_eq!(
|
||||
output_schema.expect("send_message output schema")["required"],
|
||||
json!(["submission_id"])
|
||||
);
|
||||
assert_eq!(output_schema, None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn followup_task_tool_requires_message_and_uses_submission_output() {
|
||||
fn followup_task_tool_requires_message_and_has_no_output_schema() {
|
||||
let ToolSpec::Function(ResponsesApiTool {
|
||||
parameters,
|
||||
output_schema,
|
||||
@@ -154,10 +151,7 @@ fn followup_task_tool_requires_message_and_uses_submission_output() {
|
||||
required,
|
||||
Some(vec!["target".to_string(), "message".to_string()])
|
||||
);
|
||||
assert_eq!(
|
||||
output_schema.expect("followup_task output schema")["required"],
|
||||
json!(["submission_id"])
|
||||
);
|
||||
assert_eq!(output_schema, None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -246,9 +246,15 @@ fn test_build_specs_multi_agent_v2_uses_task_names_and_hides_resume() {
|
||||
assert_eq!(output_schema["required"], json!(["task_name", "nickname"]));
|
||||
|
||||
let send_message = find_tool(&tools, "send_message");
|
||||
let ToolSpec::Function(ResponsesApiTool { parameters, .. }) = &send_message.spec else {
|
||||
let ToolSpec::Function(ResponsesApiTool {
|
||||
parameters,
|
||||
output_schema,
|
||||
..
|
||||
}) = &send_message.spec
|
||||
else {
|
||||
panic!("send_message should be a function tool");
|
||||
};
|
||||
assert_eq!(output_schema, &None);
|
||||
let JsonSchema::Object {
|
||||
properties,
|
||||
required,
|
||||
@@ -267,9 +273,15 @@ fn test_build_specs_multi_agent_v2_uses_task_names_and_hides_resume() {
|
||||
);
|
||||
|
||||
let followup_task = find_tool(&tools, "followup_task");
|
||||
let ToolSpec::Function(ResponsesApiTool { parameters, .. }) = &followup_task.spec else {
|
||||
let ToolSpec::Function(ResponsesApiTool {
|
||||
parameters,
|
||||
output_schema,
|
||||
..
|
||||
}) = &followup_task.spec
|
||||
else {
|
||||
panic!("followup_task should be a function tool");
|
||||
};
|
||||
assert_eq!(output_schema, &None);
|
||||
let JsonSchema::Object {
|
||||
properties,
|
||||
required,
|
||||
|
||||
Reference in New Issue
Block a user