Cover ChatGPT Responses tool call IDs

This commit is contained in:
2026-08-06 23:26:25 -05:00
parent af520193a9
commit 17898e7d9b
3 changed files with 90 additions and 0 deletions
+16
View File
@@ -310,4 +310,20 @@ mod tests {
assert_eq!(call.id, "call_123");
assert_eq!(call.name, "read_files");
}
#[test]
fn domain_tool_call_falls_back_to_wire_id_without_responses_call_id() {
let tool_call = rig_core::message::ToolCall::new(
"fc_item_123".to_string(),
rig_core::message::ToolFunction {
name: "read_files".to_string(),
arguments: serde_json::json!({"files": ["Cargo.toml"]}),
},
);
let call = domain_tool_call(tool_call);
assert_eq!(call.id, "fc_item_123");
assert_eq!(call.name, "read_files");
}
}