Add notify to code-mode (#14842)

Allows model to send an out-of-band notification.

The notification is injected as another tool call output for the same
call_id.
This commit is contained in:
pakrym-oai
2026-03-18 09:37:13 -07:00
committed by GitHub
parent 7ae99576a6
commit 606d85055f
27 changed files with 323 additions and 77 deletions

View File

@@ -89,8 +89,12 @@ fn reserialize_shell_outputs(items: &mut [ResponseItem]) {
{
shell_call_ids.insert(call_id.clone());
}
ResponseItem::FunctionCallOutput { call_id, output }
| ResponseItem::CustomToolCallOutput { call_id, output } => {
ResponseItem::FunctionCallOutput {
call_id, output, ..
}
| ResponseItem::CustomToolCallOutput {
call_id, output, ..
} => {
if shell_call_ids.remove(call_id)
&& let Some(structured) = output
.text_content()