From 7def4472d9487db9eb9749f602ba162201e5742f Mon Sep 17 00:00:00 2001 From: haoshan98 Date: Mon, 27 Jul 2026 15:15:34 +0000 Subject: [PATCH 1/9] Codex tool search Signed-off-by: haoshan98 --- TERMINOLOGY.md | 14 + .../src/events/normalize.rs | 10 +- .../agentic-server-core/src/events/types.rs | 11 +- .../src/executor/accumulator.rs | 243 ++++-- .../src/executor/engine.rs | 29 +- .../src/executor/gateway.rs | 4 + .../src/executor/upstream.rs | 214 +++++ crates/agentic-server-core/src/lib.rs | 5 +- .../src/storage/models/item.rs | 43 +- .../src/storage/types/item.rs | 37 +- crates/agentic-server-core/src/tool/codex.rs | 5 +- .../agentic-server-core/src/tool/function.rs | 1 + .../src/tool/mcp/handler.rs | 1 + .../src/tool/mcp/read_resource.rs | 1 + crates/agentic-server-core/src/tool/mod.rs | 2 + .../agentic-server-core/src/tool/normalize.rs | 11 +- .../agentic-server-core/src/tool/registry.rs | 171 +++- .../src/tool/tool_search.rs | 771 ++++++++++++++++++ .../src/tool/web_search.rs | 1 + .../agentic-server-core/src/types/io/input.rs | 44 +- .../agentic-server-core/src/types/io/mod.rs | 4 +- .../src/types/io/output.rs | 204 ++++- .../agentic-server-core/src/types/io/tools.rs | 2 + crates/agentic-server-core/src/types/mod.rs | 8 +- .../src/types/request_response.rs | 322 +++++++- .../src/types/tools/mod.rs | 3 +- .../src/types/tools/params.rs | 64 ++ .../agentic-server-core/tests/support/mod.rs | 2 + .../src/handler/http/responses.rs | 16 +- crates/agentic-server/tests/responses_test.rs | 178 ++++ 30 files changed, 2320 insertions(+), 101 deletions(-) create mode 100644 crates/agentic-server-core/src/tool/tool_search.rs diff --git a/TERMINOLOGY.md b/TERMINOLOGY.md index 7e13b8ce..7c63b7d5 100644 --- a/TERMINOLOGY.md +++ b/TERMINOLOGY.md @@ -207,6 +207,19 @@ available executor. It routes calls after inference; it is not part of the Respo The project-specific conversion of heterogeneous tool declarations into the function-tool shape accepted by the upstream inference server. Normalization changes the upstream representation, not the public tool's meaning. +### tool search + +A built-in tool that lets a model discover and load deferred tool definitions at runtime. Preserve the exact +`tool_search`, `tool_search_call`, and `tool_search_output` spellings for their respective wire types. Qualify the +term as **client-executed tool search** when the caller, such as Codex, searches its own catalog; the gateway passes +that call and output through and does not execute the search. + +### deferred tool + +A tool whose full definition is loaded only when selected through tool search. Use the exact `defer_loading` spelling +for the wire field. For a namespace, `defer_loading` belongs to the nested function declaration rather than the +namespace object. + ### pass-through Forwarding a request, field, tool declaration, call, response, or error without executing it locally. Use @@ -337,6 +350,7 @@ These definitions follow current OpenAI documentation: - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) - [Using tools](https://developers.openai.com/api/docs/guides/tools) +- [Tool search](https://developers.openai.com/api/docs/guides/tools-tool-search) - [MCP and Connectors](https://developers.openai.com/api/docs/guides/tools-connectors-mcp) - [Streaming API responses](https://developers.openai.com/api/docs/guides/streaming-responses) - [Reasoning models](https://developers.openai.com/api/docs/guides/reasoning) diff --git a/crates/agentic-server-core/src/events/normalize.rs b/crates/agentic-server-core/src/events/normalize.rs index f81b914e..c450cbbe 100644 --- a/crates/agentic-server-core/src/events/normalize.rs +++ b/crates/agentic-server-core/src/events/normalize.rs @@ -118,6 +118,12 @@ fn json_u32(json: &Value, key: &str) -> u32 { u32::try_from(json[key].as_u64().unwrap_or(0)).unwrap_or(u32::MAX) } +fn output_item_type(item: &Value) -> SSEItemType { + item.get("type") + .and_then(Value::as_str) + .map_or(SSEItemType::Message, SSEItemType::from) +} + fn extract_response_payload(json: &Value) -> EventPayload { let response = &json["response"]; EventPayload::Response { @@ -134,7 +140,7 @@ fn extract_output_item_added(json: &Value) -> EventPayload { let item = &json["item"]; EventPayload::OutputItemAdded { item_id: json_str(item, "id"), - item_type: SSEItemType::from(json_str(item, "type")), + item_type: output_item_type(item), output_index: json_u32(json, "output_index"), name: json_str_opt(item, "name"), namespace: json_str_opt(item, "namespace"), @@ -146,7 +152,7 @@ fn extract_output_item_done(json: &Value) -> EventPayload { let item = &json["item"]; EventPayload::OutputItemDone { item_id: json_str(item, "id"), - item_type: SSEItemType::from(json_str(item, "type")), + item_type: output_item_type(item), output_index: json_u32(json, "output_index"), item: item.clone(), } diff --git a/crates/agentic-server-core/src/events/types.rs b/crates/agentic-server-core/src/events/types.rs index 91a1e474..36b225e4 100644 --- a/crates/agentic-server-core/src/events/types.rs +++ b/crates/agentic-server-core/src/events/types.rs @@ -8,9 +8,12 @@ pub enum SSEItemType { Reasoning, FunctionCall, CustomToolCall, + ToolSearchCall, + ToolSearchOutput, WebSearchCall, McpToolCall, Message, + Unknown, } impl SSEItemType { @@ -20,9 +23,12 @@ impl SSEItemType { Self::Reasoning => "reasoning", Self::FunctionCall => "function_call", Self::CustomToolCall => "custom_tool_call", + Self::ToolSearchCall => "tool_search_call", + Self::ToolSearchOutput => "tool_search_output", Self::WebSearchCall => "web_search_call", Self::McpToolCall => "mcp_tool_call", Self::Message => "message", + Self::Unknown => "unknown", } } } @@ -33,9 +39,12 @@ impl From<&str> for SSEItemType { "reasoning" => Self::Reasoning, "function_call" => Self::FunctionCall, "custom_tool_call" => Self::CustomToolCall, + "tool_search_call" => Self::ToolSearchCall, + "tool_search_output" => Self::ToolSearchOutput, "web_search_call" => Self::WebSearchCall, "mcp_tool_call" => Self::McpToolCall, - _ => Self::Message, + "message" => Self::Message, + _ => Self::Unknown, } } } diff --git a/crates/agentic-server-core/src/executor/accumulator.rs b/crates/agentic-server-core/src/executor/accumulator.rs index 2e4466c8..e506f621 100644 --- a/crates/agentic-server-core/src/executor/accumulator.rs +++ b/crates/agentic-server-core/src/executor/accumulator.rs @@ -7,6 +7,7 @@ //! runs on a blocking thread while the async task continues reading from the //! network — keeping the tokio executor thread free between chunk arrivals. +use std::collections::HashMap; use std::pin::Pin; use std::sync::mpsc; @@ -46,34 +47,34 @@ impl std::fmt::Debug for InFlight { } impl InFlight { - fn finalize(self, output: &mut Vec) { + fn finalize(self) -> OutputItem { match self { Self::Reasoning { mut item, text } => { if !text.is_empty() { item.content.push(ReasoningTextContent::new(text)); } - output.push(OutputItem::Reasoning(item)); + OutputItem::Reasoning(item) } Self::FunctionCall { mut item, arguments } => { if !arguments.is_empty() && item.arguments.is_empty() { item.arguments = arguments; } item.status = MessageStatus::Completed; - output.push(OutputItem::FunctionCall(item)); + OutputItem::FunctionCall(item) } Self::Message { mut item, text } => { if !text.is_empty() { item.content.push(OutputTextContent::new(text)); } item.status = MessageStatus::Completed; - output.push(OutputItem::Message(item)); + OutputItem::Message(item) } Self::CustomToolCall { mut item, input } => { if item.input.is_empty() { item.input = input; } item.status = Some(MessageStatus::Completed); - output.push(OutputItem::CustomToolCall(item)); + OutputItem::CustomToolCall(item) } } } @@ -85,12 +86,15 @@ pub struct ResponseAccumulator { response_id: String, conversation_id: Option, output: Vec, + /// Streaming output indexes parallel to `output`; sorted on finalization. + output_indices: Vec, usage: Option, status: ResponseStatus, incomplete_details: Option, error: Option, /// In-flight output items keyed by `item_id`, in insertion order. in_flight: IndexMap, + in_flight_indices: HashMap, } impl ResponseAccumulator { @@ -101,11 +105,13 @@ impl ResponseAccumulator { response_id, conversation_id, output: Vec::new(), + output_indices: Vec::new(), usage: None, status: ResponseStatus::InProgress, incomplete_details: None, error: None, in_flight: IndexMap::new(), + in_flight_indices: HashMap::new(), } } @@ -128,6 +134,9 @@ impl ResponseAccumulator { out }) .unwrap_or_default(); + let output_indices = (0..output.len()) + .map(|index| u32::try_from(index).unwrap_or(u32::MAX)) + .collect(); let status = json["status"] .as_str() @@ -141,11 +150,13 @@ impl ResponseAccumulator { response_id, conversation_id: conversation_id.map(str::to_string), output, + output_indices, usage, status, incomplete_details, error, in_flight: IndexMap::new(), + in_flight_indices: HashMap::new(), }) } @@ -215,11 +226,14 @@ impl ResponseAccumulator { acc } - /// Finalizes all in-flight items in insertion order, pushing them to `output`. + /// Finalizes all in-flight items and restores upstream output-index order. pub(crate) fn finalize_all(&mut self) { - for (_, entry) in self.in_flight.drain(..) { - entry.finalize(&mut self.output); + for (item_id, entry) in self.in_flight.drain(..) { + let output_index = self.in_flight_indices.remove(&item_id).unwrap_or(u32::MAX); + self.output_indices.push(output_index); + self.output.push(entry.finalize()); } + self.sort_output_by_index(); } pub(crate) fn process_sse_line(&mut self, line: &str) { @@ -267,53 +281,21 @@ impl ResponseAccumulator { (SSEEventType::ResponseCreated, EventPayload::Response { id, .. }) if !id.is_empty() => { self.response_id.clone_from(id); } - (SSEEventType::OutputItemAdded, payload @ EventPayload::OutputItemAdded { item_id, item_type, .. }) => { - let entry = match item_type { - SSEItemType::Reasoning => ReasoningOutput::try_from(payload).ok().map(|item| InFlight::Reasoning { - item, - text: String::with_capacity(256), - }), - SSEItemType::FunctionCall => { - FunctionToolCall::try_from(payload) - .ok() - .map(|item| InFlight::FunctionCall { - item, - arguments: String::with_capacity(128), - }) - } - SSEItemType::CustomToolCall => { - CustomToolCall::try_from(payload) - .ok() - .map(|item| InFlight::CustomToolCall { - item, - input: String::with_capacity(256), - }) - } - SSEItemType::Message => OutputMessage::try_from(payload).ok().map(|item| InFlight::Message { - item, - text: String::with_capacity(256), - }), - SSEItemType::WebSearchCall | SSEItemType::McpToolCall => None, - }; - if let Some(inflight) = entry { - self.in_flight.insert(item_id.clone(), inflight); - } + (SSEEventType::OutputItemAdded, payload @ EventPayload::OutputItemAdded { .. }) => { + self.begin_output_item(payload); } ( SSEEventType::OutputItemDone, EventPayload::OutputItemDone { item_id, item_type: SSEItemType::CustomToolCall, + output_index, item, .. }, - ) => self.complete_custom_tool_call(item_id, item), - (SSEEventType::OutputItemDone, EventPayload::OutputItemDone { item, .. }) => { - if let Some(output_item @ (OutputItem::WebSearchCall(_) | OutputItem::McpToolCall(_))) = - deserialize_from_value_opt::(item.clone()) - { - self.output.push(output_item); - } + ) => self.complete_custom_tool_call(item_id, *output_index, item), + (SSEEventType::OutputItemDone, EventPayload::OutputItemDone { output_index, item, .. }) => { + self.complete_non_delta_output_item(*output_index, item); } (SSEEventType::ReasoningTextDelta, EventPayload::ReasoningDelta { delta, item_id }) => { if let Some(InFlight::Reasoning { text, .. }) = self.in_flight.get_mut(item_id) { @@ -363,13 +345,58 @@ impl ResponseAccumulator { } } + fn begin_output_item(&mut self, payload: &EventPayload) { + let EventPayload::OutputItemAdded { + item_id, + item_type, + output_index, + .. + } = payload + else { + return; + }; + let entry = match item_type { + SSEItemType::Reasoning => ReasoningOutput::try_from(payload).ok().map(|item| InFlight::Reasoning { + item, + text: String::with_capacity(256), + }), + SSEItemType::FunctionCall => FunctionToolCall::try_from(payload) + .ok() + .map(|item| InFlight::FunctionCall { + item, + arguments: String::with_capacity(128), + }), + SSEItemType::CustomToolCall => { + CustomToolCall::try_from(payload) + .ok() + .map(|item| InFlight::CustomToolCall { + item, + input: String::with_capacity(256), + }) + } + SSEItemType::Message => OutputMessage::try_from(payload).ok().map(|item| InFlight::Message { + item, + text: String::with_capacity(256), + }), + SSEItemType::ToolSearchCall + | SSEItemType::ToolSearchOutput + | SSEItemType::WebSearchCall + | SSEItemType::McpToolCall + | SSEItemType::Unknown => None, + }; + if let Some(inflight) = entry { + self.in_flight.insert(item_id.clone(), inflight); + self.in_flight_indices.insert(item_id.clone(), *output_index); + } + } + fn finish_response(&mut self, status: ResponseStatus, usage: Option) { self.finalize_all(); self.status = status; self.usage = usage; } - fn complete_custom_tool_call(&mut self, item_id: &str, raw_item: &serde_json::Value) { + fn complete_custom_tool_call(&mut self, item_id: &str, output_index: u32, raw_item: &serde_json::Value) { let Some(OutputItem::CustomToolCall(mut call)) = deserialize_from_value_opt::(raw_item.clone()) else { return; @@ -388,7 +415,39 @@ impl ResponseAccumulator { *item = call; } else { // Some Responses-compatible providers omit `output_item.added`. - self.output.push(OutputItem::CustomToolCall(call)); + self.push_output(output_index, OutputItem::CustomToolCall(call)); + } + } + + fn complete_non_delta_output_item(&mut self, output_index: u32, raw_item: &serde_json::Value) { + let Some(output_item) = deserialize_from_value_opt::(raw_item.clone()) else { + return; + }; + if matches!( + output_item, + OutputItem::ToolSearchCall(_) + | OutputItem::ToolSearchOutput(_) + | OutputItem::WebSearchCall(_) + | OutputItem::McpToolCall(_) + ) { + self.push_output(output_index, output_item); + } + } + + fn push_output(&mut self, output_index: u32, item: OutputItem) { + self.output_indices.push(output_index); + self.output.push(item); + } + + fn sort_output_by_index(&mut self) { + let mut indexed = std::mem::take(&mut self.output_indices) + .into_iter() + .zip(std::mem::take(&mut self.output)) + .collect::>(); + indexed.sort_by_key(|(output_index, _)| *output_index); + for (output_index, item) in indexed { + self.output_indices.push(output_index); + self.output.push(item); } } @@ -1246,4 +1305,92 @@ mod tests { assert_eq!(call.input, "*** Begin Patch"); assert_eq!(call.status, Some(MessageStatus::Completed)); } + + #[test] + fn test_tool_search_items_accumulate_from_complete_sse_items() { + let lines = vec![ + r#"data: {"type":"response.created","response":{"id":"resp_search"}}"#.to_string(), + r#"data: {"type":"response.output_item.added","output_index":0,"item":{"type":"tool_search_call","execution":"client","call_id":"call_search_1","status":"in_progress","arguments":{}}}"#.to_string(), + r#"data: {"type":"response.output_item.done","output_index":0,"item":{"type":"tool_search_call","execution":"client","call_id":"call_search_1","status":"completed","arguments":{"goal":"Find shell tools"}}}"#.to_string(), + r#"data: {"type":"response.output_item.added","output_index":1,"item":{"type":"tool_search_output","execution":"client","call_id":"call_search_1","status":"in_progress","tools":[]}}"#.to_string(), + r#"data: {"type":"response.output_item.done","output_index":1,"item":{"type":"tool_search_output","execution":"client","call_id":"call_search_1","status":"completed","tools":[{"type":"function","name":"run","defer_loading":true,"parameters":{"type":"object"}}]}}"#.to_string(), + r#"data: {"type":"response.completed","response":{"id":"resp_search","status":"completed","usage":null}}"#.to_string(), + ]; + + let acc = ResponseAccumulator::from_sse_lines(lines, None); + assert_eq!(acc.output.len(), 2); + let OutputItem::ToolSearchCall(call) = &acc.output[0] else { + panic!("expected ToolSearchCall"); + }; + assert_eq!(call.call_id.as_deref(), Some("call_search_1")); + assert_eq!(call.arguments["goal"], "Find shell tools"); + + let OutputItem::ToolSearchOutput(output) = &acc.output[1] else { + panic!("expected ToolSearchOutput"); + }; + assert_eq!(output.call_id.as_deref(), Some("call_search_1")); + assert_eq!(output.tools[0]["name"], "run"); + assert_eq!(output.tools[0]["defer_loading"], true); + } + + #[test] + fn test_incomplete_and_optional_tool_search_fields_accumulate() { + let lines = vec![ + r#"data: {"type":"response.output_item.done","output_index":0,"item":{"type":"tool_search_call","execution":"client","call_id":"call_incomplete","status":"incomplete","arguments":{"query":"shell"}}}"#.to_string(), + r#"data: {"type":"response.output_item.done","output_index":1,"item":{"type":"tool_search_output","call_id":"call_optional","tools":[]}}"#.to_string(), + ]; + + let acc = ResponseAccumulator::from_sse_lines(lines, None); + let OutputItem::ToolSearchCall(call) = &acc.output[0] else { + panic!("expected incomplete tool-search call"); + }; + assert_eq!(call.status, Some(crate::types::io::ToolSearchStatus::Incomplete)); + assert!(!call.requires_client_execution()); + let OutputItem::ToolSearchOutput(output) = &acc.output[1] else { + panic!("expected tool-search output with optional fields omitted"); + }; + assert_eq!(output.execution, None); + assert_eq!(output.status, None); + } + + #[test] + fn test_unknown_output_item_type_is_not_accumulated_as_message() { + let lines = vec![ + r#"data: {"type":"response.output_item.added","output_index":0,"item":{"id":"future_1","type":"future_item"}}"#.to_string(), + r#"data: {"type":"response.output_item.done","output_index":0,"item":{"id":"future_1","type":"future_item","payload":{"a":1}}}"#.to_string(), + ]; + + let acc = ResponseAccumulator::from_sse_lines(lines, None); + assert!(acc.output.is_empty()); + } + + #[test] + fn test_reasoning_precedes_completed_native_tool_search_item_by_output_index() { + let lines = vec![ + r#"data: {"type":"response.output_item.added","output_index":0,"item":{"id":"rs_1","type":"reasoning"}}"#.to_string(), + r#"data: {"type":"response.reasoning_summary_text.delta","item_id":"rs_1","output_index":0,"delta":"Need a tool."}"#.to_string(), + r#"data: {"type":"response.output_item.done","output_index":1,"item":{"type":"tool_search_call","execution":"client","call_id":"call_search","status":"completed","arguments":{"query":"shell"}}}"#.to_string(), + r#"data: {"type":"response.completed","response":{"id":"resp_search","status":"completed","usage":null}}"#.to_string(), + ]; + + let acc = ResponseAccumulator::from_sse_lines(lines, None); + assert!(matches!(acc.output[0], OutputItem::Reasoning(_))); + assert!(matches!(acc.output[1], OutputItem::ToolSearchCall(_))); + } + + #[test] + fn test_hosted_search_call_output_and_function_follow_output_index_order() { + let lines = vec![ + r#"data: {"type":"response.output_item.done","output_index":0,"item":{"type":"tool_search_call","execution":"server","call_id":null,"status":"completed","arguments":{"paths":["crm"]}}}"#.to_string(), + r#"data: {"type":"response.output_item.done","output_index":1,"item":{"type":"tool_search_output","execution":"server","call_id":null,"status":"completed","tools":[{"type":"function","name":"lookup"}]}}"#.to_string(), + r#"data: {"type":"response.output_item.added","output_index":2,"item":{"id":"fc_1","type":"function_call","call_id":"call_lookup","name":"lookup"}}"#.to_string(), + r#"data: {"type":"response.function_call_arguments.done","item_id":"fc_1","output_index":2,"call_id":"call_lookup","name":"lookup","arguments":"{}"}"#.to_string(), + r#"data: {"type":"response.completed","response":{"id":"resp_search","status":"completed","usage":null}}"#.to_string(), + ]; + + let acc = ResponseAccumulator::from_sse_lines(lines, None); + assert!(matches!(acc.output[0], OutputItem::ToolSearchCall(_))); + assert!(matches!(acc.output[1], OutputItem::ToolSearchOutput(_))); + assert!(matches!(acc.output[2], OutputItem::FunctionCall(_))); + } } diff --git a/crates/agentic-server-core/src/executor/engine.rs b/crates/agentic-server-core/src/executor/engine.rs index 3cde48bd..37bd0aac 100644 --- a/crates/agentic-server-core/src/executor/engine.rs +++ b/crates/agentic-server-core/src/executor/engine.rs @@ -107,10 +107,11 @@ async fn run_until_gateway_tools_complete( stream_upstream: bool, stream_events: Option<&mpsc::UnboundedSender>, ) -> ExecutorResult<(ResponsePayload, RequestContext)> { - let registry: ToolRegistry = match ctx.enriched_request.tools.as_ref() { + let mut registry: ToolRegistry = match ctx.enriched_request.tools.as_ref() { Some(tools) => ToolRegistry::build_with_handlers(tools, &exec_ctx.gateway_executors).await?, None => ToolRegistry::default(), }; + registry.load_tool_search_output(&ctx.enriched_request.input); let mut combined_output: Vec = Vec::new(); let mut combined_usage: Option = None; @@ -124,14 +125,24 @@ async fn run_until_gateway_tools_complete( accumulate_usage(&mut combined_usage, payload.usage.take()); let current_output = std::mem::take(&mut payload.output); for item in ¤t_output { - if let OutputItem::CustomToolCall(call) = item { - debug!( - response_id = %ctx.response_id, - call_id = %call.call_id, - name = %call.name, - input_bytes = call.input.len(), - "custom tool call requires client execution" - ); + match item { + OutputItem::CustomToolCall(call) => { + debug!( + response_id = %ctx.response_id, + call_id = %call.call_id, + name = %call.name, + input_bytes = call.input.len(), + "custom tool call requires client execution" + ); + } + OutputItem::ToolSearchCall(call) if call.requires_client_execution() => { + debug!( + response_id = %ctx.response_id, + call_id = ?call.call_id, + "tool search call requires client execution" + ); + } + _ => {} } } let has_client_owned = has_client_owned_calls(¤t_output, ®istry); diff --git a/crates/agentic-server-core/src/executor/gateway.rs b/crates/agentic-server-core/src/executor/gateway.rs index 74a5b350..a9fedbab 100644 --- a/crates/agentic-server-core/src/executor/gateway.rs +++ b/crates/agentic-server-core/src/executor/gateway.rs @@ -319,6 +319,8 @@ fn emit_gateway_start_events( OutputItem::Message(_) | OutputItem::FunctionCall(_) | OutputItem::CustomToolCall(_) + | OutputItem::ToolSearchCall(_) + | OutputItem::ToolSearchOutput(_) | OutputItem::Reasoning(_) | OutputItem::Unknown => {} } @@ -350,6 +352,8 @@ fn emit_gateway_completed_events( OutputItem::Message(_) | OutputItem::FunctionCall(_) | OutputItem::CustomToolCall(_) + | OutputItem::ToolSearchCall(_) + | OutputItem::ToolSearchOutput(_) | OutputItem::Reasoning(_) | OutputItem::Unknown => continue, }; diff --git a/crates/agentic-server-core/src/executor/upstream.rs b/crates/agentic-server-core/src/executor/upstream.rs index 895b142d..5e487b85 100644 --- a/crates/agentic-server-core/src/executor/upstream.rs +++ b/crates/agentic-server-core/src/executor/upstream.rs @@ -56,6 +56,7 @@ pub(super) async fn fetch_stream_payload( )); let mut acc = ResponseAccumulator::new(ctx.response_id.clone(), ctx.conversation_id.clone()); let mut hidden_gateway_item_ids = HashSet::new(); + let mut fallback_tool_search_item_ids = HashSet::new(); let mut pending_unnamed_function_events = HashMap::>::new(); while let Some(line_result) = line_stream.next().await { let line = line_result?; @@ -67,6 +68,7 @@ pub(super) async fn fetch_stream_payload( registry, sender, &mut hidden_gateway_item_ids, + &mut fallback_tool_search_item_ids, &mut pending_unnamed_function_events, )?; } @@ -125,6 +127,7 @@ fn emit_upstream_stream_event( registry: &ToolRegistry, sender: &mpsc::UnboundedSender, hidden_gateway_item_ids: &mut HashSet, + fallback_tool_search_item_ids: &mut HashSet, pending_unnamed_function_events: &mut HashMap>, ) -> ExecutorResult<()> { let Some(data) = line.strip_prefix("data: ") else { @@ -138,6 +141,16 @@ fn emit_upstream_stream_event( let Some(frame) = normalize_sse_line(line) else { return Ok(()); }; + if handle_fallback_tool_search_event( + &frame, + ctx, + registry, + sender, + fallback_tool_search_item_ids, + pending_unnamed_function_events, + )? { + return Ok(()); + } if should_hide_upstream_event(frame.event_type, &frame.payload, registry, hidden_gateway_item_ids) || is_terminal_response_event(frame.event_type) { @@ -159,6 +172,136 @@ fn emit_upstream_stream_event( emit_stream_line(data, ctx, registry, sender) } +fn handle_fallback_tool_search_event( + frame: &crate::events::EventFrame, + ctx: &RequestContext, + registry: &ToolRegistry, + sender: &mpsc::UnboundedSender, + fallback_item_ids: &mut HashSet, + pending_unnamed_function_events: &mut HashMap>, +) -> ExecutorResult { + if !registry.can_restore_tool_search_fallback() { + return Ok(false); + } + + match (&frame.event_type, &frame.payload) { + ( + SSEEventType::OutputItemAdded, + EventPayload::OutputItemAdded { + item_id, + item_type: SSEItemType::FunctionCall, + name: Some(name), + namespace: None, + .. + }, + ) if name == "tool_search" => { + fallback_item_ids.insert(item_id.clone()); + Ok(false) + } + ( + SSEEventType::FunctionCallArgumentsDelta | SSEEventType::FunctionCallArgumentsDone, + EventPayload::FunctionCallArgsDelta { item_id, .. } | EventPayload::FunctionCallArgsDone { item_id, .. }, + ) if fallback_item_ids.contains(item_id) => Ok(true), + ( + SSEEventType::FunctionCallArgumentsDone, + EventPayload::FunctionCallArgsDone { + item_id, + call_id: Some(call_id), + name, + output_index, + .. + }, + ) if name == "tool_search" + && !call_id.is_empty() + && pending_function_is_unqualified(item_id, pending_unnamed_function_events) => + { + pending_unnamed_function_events.remove(item_id); + fallback_item_ids.insert(item_id.clone()); + emit_fallback_tool_search_added(item_id, call_id, *output_index, ctx, registry, sender)?; + Ok(true) + } + ( + SSEEventType::OutputItemDone, + EventPayload::OutputItemDone { + item_id, + item_type: SSEItemType::FunctionCall, + item, + .. + }, + ) if is_unqualified_tool_search_function(item) => { + if !fallback_item_ids.contains(item_id) + && pending_function_is_unqualified(item_id, pending_unnamed_function_events) + && let Some(call_id) = item + .get("call_id") + .and_then(Value::as_str) + .filter(|call_id| !call_id.is_empty()) + { + emit_fallback_tool_search_added(item_id, call_id, frame_output_index(frame), ctx, registry, sender)?; + } + pending_unnamed_function_events.remove(item_id); + fallback_item_ids.remove(item_id); + Ok(false) + } + _ => Ok(false), + } +} + +fn pending_function_is_unqualified( + item_id: &str, + pending_unnamed_function_events: &HashMap>, +) -> bool { + pending_unnamed_function_events + .get(item_id) + .and_then(|events| events.first()) + .and_then(|line| normalize_sse_line(line)) + .is_some_and(|frame| { + matches!( + frame.payload, + EventPayload::OutputItemAdded { + item_type: SSEItemType::FunctionCall, + namespace: None, + .. + } + ) + }) +} + +fn is_unqualified_tool_search_function(item: &Value) -> bool { + item.get("name").and_then(Value::as_str) == Some("tool_search") + && item.get("namespace").and_then(Value::as_str).is_none() +} + +fn frame_output_index(frame: &crate::events::EventFrame) -> u32 { + match &frame.payload { + EventPayload::OutputItemDone { output_index, .. } => *output_index, + _ => 0, + } +} + +fn emit_fallback_tool_search_added( + item_id: &str, + call_id: &str, + output_index: u32, + ctx: &RequestContext, + registry: &ToolRegistry, + sender: &mpsc::UnboundedSender, +) -> ExecutorResult<()> { + let event = serde_json::json!({ + "type": "response.output_item.added", + "output_index": output_index, + "item": { + "type": "tool_search_call", + "id": item_id, + "execution": "client", + "call_id": call_id, + "status": "in_progress", + "arguments": {} + } + }); + let data = serialize_to_string(&event).map_err(ExecutorError::JsonError)?; + emit_stream_line(&data, ctx, registry, sender) +} + fn emit_stream_line( data: &str, ctx: &RequestContext, @@ -332,3 +475,74 @@ fn apply_context_response_ids(value: &mut Value, ctx: &RequestContext) { response.insert("conversation_id".to_owned(), Value::String(conversation_id.clone())); } } + +#[cfg(test)] +mod tests { + use super::*; + use crate::tool::GatewayExecutors; + use crate::types::request_response::RequestPayload; + + fn emitted_event(receiver: &mut mpsc::UnboundedReceiver) -> Value { + let line = receiver.try_recv().expect("emitted SSE event"); + let data = line + .strip_prefix("data: ") + .and_then(|line| line.strip_suffix("\n\n")) + .expect("SSE data framing"); + serde_json::from_str(data).expect("valid emitted JSON") + } + + #[tokio::test] + async fn unnamed_fallback_emits_only_canonical_tool_search_lifecycle() { + let request: RequestPayload = serde_json::from_value(serde_json::json!({ + "model": "test", + "input": "find a tool", + "tools": [{"type": "tool_search", "execution": "client"}] + })) + .unwrap(); + let registry = + ToolRegistry::build_with_handlers(request.tools.as_deref().unwrap(), &GatewayExecutors::default()) + .await + .unwrap(); + let ctx = RequestContext { + original_request: request.clone(), + enriched_request: request, + new_input_items: Vec::new(), + response_id: "resp_gateway".to_owned(), + conversation_id: None, + }; + let (sender, mut receiver) = mpsc::unbounded_channel(); + let mut hidden_ids = HashSet::new(); + let mut fallback_ids = HashSet::new(); + let mut pending = HashMap::new(); + let lines = [ + r#"data: {"type":"response.output_item.added","output_index":0,"item":{"id":"fc_search","type":"function_call","call_id":"call_search"}}"#, + r#"data: {"type":"response.function_call_arguments.delta","item_id":"fc_search","output_index":0,"call_id":"call_search","delta":"{\"query\":"}"#, + r#"data: {"type":"response.function_call_arguments.done","item_id":"fc_search","output_index":0,"call_id":"call_search","name":"tool_search","arguments":"{\"query\":\"shell\"}"}"#, + r#"data: {"type":"response.output_item.done","output_index":0,"item":{"id":"fc_search","type":"function_call","call_id":"call_search","name":"tool_search","status":"completed","arguments":"{\"query\":\"shell\"}"}}"#, + ]; + + for line in lines { + emit_upstream_stream_event( + line, + &ctx, + ®istry, + &sender, + &mut hidden_ids, + &mut fallback_ids, + &mut pending, + ) + .unwrap(); + } + + let added = emitted_event(&mut receiver); + assert_eq!(added["type"], "response.output_item.added"); + assert_eq!(added["item"]["type"], "tool_search_call"); + assert_eq!(added["item"]["execution"], "client"); + assert_eq!(added["item"]["call_id"], "call_search"); + let done = emitted_event(&mut receiver); + assert_eq!(done["type"], "response.output_item.done"); + assert_eq!(done["item"]["type"], "tool_search_call"); + assert_eq!(done["item"]["arguments"]["query"], "shell"); + assert!(receiver.try_recv().is_err()); + } +} diff --git a/crates/agentic-server-core/src/lib.rs b/crates/agentic-server-core/src/lib.rs index 1eefba43..27351d97 100644 --- a/crates/agentic-server-core/src/lib.rs +++ b/crates/agentic-server-core/src/lib.rs @@ -25,7 +25,8 @@ pub use types::{ InputImageContent, InputItem, InputMessage, InputMessageContent, InputTextContent, InputTokenDetails, McpToolCall, McpToolParam, NonEmptyToolName, OutputItem, OutputMessage, OutputTextContent, OutputTokenDetails, ReasoningOutput, ReasoningTextContent, RequestPayload, ResponsePayload, ResponseUsage, ResponsesInput, ResponsesTool, ToolChoice, - UpstreamRequest, UpstreamTool, WebSearchActionSearch, WebSearchCall, WebSearchCallStatus, WebSearchContextSize, - WebSearchFilters, WebSearchSource, WebSearchToolParam, WebSearchUserLocation, + ToolSearchCall, ToolSearchExecution, ToolSearchOutput, ToolSearchStatus, ToolSearchToolParam, UpstreamRequest, + UpstreamTool, WebSearchActionSearch, WebSearchCall, WebSearchCallStatus, WebSearchContextSize, WebSearchFilters, + WebSearchSource, WebSearchToolParam, WebSearchUserLocation, }; pub use utils::{utcnow_str, uuid7_str}; diff --git a/crates/agentic-server-core/src/storage/models/item.rs b/crates/agentic-server-core/src/storage/models/item.rs index dad71dbf..6afde609 100644 --- a/crates/agentic-server-core/src/storage/models/item.rs +++ b/crates/agentic-server-core/src/storage/models/item.rs @@ -6,7 +6,7 @@ use tracing::warn; use super::super::pool::{DbPool, DbResult, DbTransaction}; use super::super::types::item::{InOutItem, ItemKind, STORED_ITEM_KIND_KEY}; use crate::types::io::{InputItem, OutputItem}; -use crate::utils::common::{deserialize_from_str_opt, utcnow_str}; +use crate::utils::common::{deserialize_from_str_opt, deserialize_from_value_opt, utcnow_str}; /// Conversation history item stored in the database. /// @@ -35,13 +35,13 @@ impl Item { /// Deserialize data column as `InputItem`. #[must_use] pub fn as_input(&self) -> Option { - deserialize_from_str_opt(&self.data) + deserialize_from_value_opt(self.data_without_storage_marker()?) } /// Deserialize data column as `OutputItem`. #[must_use] pub fn as_output(&self) -> Option { - deserialize_from_str_opt(&self.data) + deserialize_from_value_opt(self.data_without_storage_marker()?) } /// Deserialize data column as either `InputItem` or `OutputItem`. @@ -86,6 +86,12 @@ impl Item { let value = deserialize_from_str_opt::(&self.data)?; ItemKind::from_stored_str(value.get(STORED_ITEM_KIND_KEY)?.as_str()?) } + + fn data_without_storage_marker(&self) -> Option { + let mut value = deserialize_from_str_opt::(&self.data)?; + value.as_object_mut()?.remove(STORED_ITEM_KIND_KEY); + Some(value) + } } /// Create items in a transaction with optional conversation context. @@ -187,7 +193,10 @@ pub async fn get_items_by_conversation(pool: &DbPool, conversation_id: &str) -> mod tests { use super::*; use crate::types::event::MessageStatus; - use crate::types::io::{InputItem, OutputItem, ReasoningOutput, ReasoningTextContent}; + use crate::types::io::{ + InputItem, OutputItem, ReasoningOutput, ReasoningTextContent, ToolSearchCall, ToolSearchStatus, + }; + use crate::types::tools::ToolSearchExecution; #[test] fn test_item_basic() { @@ -291,6 +300,32 @@ mod tests { println!("storage marker stripped: _agentic_item_kind absent"); } + #[test] + fn test_tool_search_call_round_trips_through_stored_item() { + let stored = InOutItem::Output(OutputItem::ToolSearchCall(ToolSearchCall { + execution: Some(ToolSearchExecution::Client), + call_id: Some("call_search_1".to_string()), + status: Some(ToolSearchStatus::Completed), + arguments: serde_json::json!({"goal": "Find shell tools"}), + extra: std::collections::HashMap::new(), + })); + let item = Item { + id: "item_tool_search_call".to_string(), + data: String::try_from(&stored).expect("serialization failed"), + created_at: 1_704_067_200, + conversation_id: None, + seq: None, + }; + + let inputs = InOutItem::into_input_items(vec![item.as_inout().expect("stored item")]); + let value = serde_json::to_value(&inputs[0]).expect("input value"); + assert_eq!(value["type"], "tool_search_call"); + assert_eq!(value["execution"], "client"); + assert_eq!(value["call_id"], "call_search_1"); + assert_eq!(value["arguments"]["goal"], "Find shell tools"); + assert!(value.get(STORED_ITEM_KIND_KEY).is_none()); + } + #[test] fn test_multiple_namespaced_function_calls_rehydrate_without_storage_marker() { let stored_items = [ diff --git a/crates/agentic-server-core/src/storage/types/item.rs b/crates/agentic-server-core/src/storage/types/item.rs index 925af600..8f0b3977 100644 --- a/crates/agentic-server-core/src/storage/types/item.rs +++ b/crates/agentic-server-core/src/storage/types/item.rs @@ -101,8 +101,9 @@ mod tests { use crate::types::event::MessageStatus; use crate::types::io::{ FunctionToolCall, InputContent, InputMessage, InputMessageContent, OutputMessage, OutputTextContent, - ReasoningOutput, ReasoningTextContent, + ReasoningOutput, ReasoningTextContent, ToolSearchCall, ToolSearchOutput, ToolSearchStatus, }; + use crate::types::tools::ToolSearchExecution; #[test] fn test_inout_item_from_input() { @@ -214,6 +215,40 @@ mod tests { } } + #[test] + fn test_into_input_items_preserves_tool_search_call_and_output() { + let call = ToolSearchCall { + execution: Some(ToolSearchExecution::Client), + call_id: Some("call_search_1".to_string()), + status: Some(ToolSearchStatus::Completed), + arguments: serde_json::json!({"goal": "Find shell tools"}), + extra: std::collections::HashMap::new(), + }; + let output = ToolSearchOutput { + execution: Some(ToolSearchExecution::Client), + call_id: Some("call_search_1".to_string()), + status: Some(ToolSearchStatus::Completed), + tools: vec![serde_json::json!({ + "type": "function", + "name": "run", + "defer_loading": true, + "parameters": {"type": "object"} + })], + extra: std::collections::HashMap::new(), + }; + let history = vec![ + InOutItem::Output(OutputItem::ToolSearchCall(call)), + InOutItem::Output(OutputItem::ToolSearchOutput(output)), + ]; + + let inputs = InOutItem::into_input_items(history); + assert!(matches!(inputs[0], InputItem::ToolSearchCall(_))); + assert!(matches!(inputs[1], InputItem::ToolSearchOutput(_))); + let values = serde_json::to_value(inputs).unwrap(); + assert_eq!(values[0]["call_id"], "call_search_1"); + assert_eq!(values[1]["tools"][0]["name"], "run"); + } + #[test] fn test_item_kind_serialization() { let kind = ItemKind::Input; diff --git a/crates/agentic-server-core/src/tool/codex.rs b/crates/agentic-server-core/src/tool/codex.rs index 099ee6b4..6dfde77f 100644 --- a/crates/agentic-server-core/src/tool/codex.rs +++ b/crates/agentic-server-core/src/tool/codex.rs @@ -407,7 +407,10 @@ fn typed_top_level_registry_keys(tools: &[ResponsesTool]) -> HashMap "web_search".to_owned(), ResponsesTool::FileSearch(_) => "file_search".to_owned(), ResponsesTool::CodeInterpreter(_) => "code_interpreter".to_owned(), - ResponsesTool::Namespace(_) | ResponsesTool::Custom(_) | ResponsesTool::Unknown => return None, + ResponsesTool::Namespace(_) + | ResponsesTool::Custom(_) + | ResponsesTool::ToolSearch(_) + | ResponsesTool::Unknown => return None, }; tool.tool_type().map(|tool_type| (registry_key, tool_type)) }) diff --git a/crates/agentic-server-core/src/tool/function.rs b/crates/agentic-server-core/src/tool/function.rs index 45fa6b67..ba4af0b4 100644 --- a/crates/agentic-server-core/src/tool/function.rs +++ b/crates/agentic-server-core/src/tool/function.rs @@ -17,6 +17,7 @@ impl From<&FunctionToolParam> for FunctionTool { description: p.description.clone(), parameters: p.parameters.clone(), strict: p.strict, + defer_loading: p.defer_loading, } } } diff --git a/crates/agentic-server-core/src/tool/mcp/handler.rs b/crates/agentic-server-core/src/tool/mcp/handler.rs index 5972377a..733e5136 100644 --- a/crates/agentic-server-core/src/tool/mcp/handler.rs +++ b/crates/agentic-server-core/src/tool/mcp/handler.rs @@ -388,6 +388,7 @@ fn mcp_tool_to_function_tool(name: &str, tool: &rmcp::model::Tool) -> FunctionTo description: tool.description.as_ref().map(ToString::to_string), parameters: Some(parameters), strict: Some(false), + defer_loading: None, } } diff --git a/crates/agentic-server-core/src/tool/mcp/read_resource.rs b/crates/agentic-server-core/src/tool/mcp/read_resource.rs index 17ff589f..e9ab8a60 100644 --- a/crates/agentic-server-core/src/tool/mcp/read_resource.rs +++ b/crates/agentic-server-core/src/tool/mcp/read_resource.rs @@ -33,6 +33,7 @@ pub fn read_mcp_resource_spec() -> FunctionTool { "additionalProperties": false })), strict: Some(false), + defer_loading: None, } } diff --git a/crates/agentic-server-core/src/tool/mod.rs b/crates/agentic-server-core/src/tool/mod.rs index 2a5d62d8..cdf9c67a 100644 --- a/crates/agentic-server-core/src/tool/mod.rs +++ b/crates/agentic-server-core/src/tool/mod.rs @@ -10,6 +10,7 @@ pub mod handler; pub mod mcp; pub mod normalize; pub mod registry; +mod tool_search; pub mod web_search; pub use codex::{CodexNamespaceHandler, NamespaceMap, model_visible_namespace_member_name}; @@ -22,4 +23,5 @@ pub use mcp::{ read_mcp_resource_spec, }; pub use registry::{GatewayDispatchResult, ToolEntry, ToolRegistry, ToolType}; +pub(crate) use tool_search::loaded_function_tools; pub use web_search::WebSearchHandler; diff --git a/crates/agentic-server-core/src/tool/normalize.rs b/crates/agentic-server-core/src/tool/normalize.rs index 69fc9e61..5a640f5c 100644 --- a/crates/agentic-server-core/src/tool/normalize.rs +++ b/crates/agentic-server-core/src/tool/normalize.rs @@ -24,7 +24,7 @@ impl ResponsesTool { Self::FileSearch(_) => Some(ToolType::FileSearch), Self::CodeInterpreter(_) => Some(ToolType::CodeInterpreter), Self::Namespace(_) => Some(ToolType::CodexNamespace), - Self::Custom(_) | Self::Unknown => None, + Self::Custom(_) | Self::ToolSearch(_) | Self::Unknown => None, } } @@ -39,7 +39,7 @@ impl ResponsesTool { /// Returns an empty list and logs at `debug` level if the name is empty. /// - `Mcp` variants convert gateway MCP built-ins to the function specs /// vLLM can call. - /// - `Custom` variants return no function tools because + /// - `Custom` and `ToolSearch` variants return no function tools because /// `RequestPayload::to_upstream_request()` forwards their native /// Responses declarations separately. /// - Unimplemented variants (`FileSearch`, `CodeInterpreter`) return @@ -84,6 +84,13 @@ impl ResponsesTool { tracing::debug!(name = %p.name, "custom tool retained for native upstream forwarding"); vec![] } + Self::ToolSearch(p) => { + tracing::debug!( + execution = ?p.execution, + "tool_search retained for native upstream forwarding" + ); + vec![] + } Self::Unknown => { tracing::debug!("unknown tool skipped in normalize"); vec![] diff --git a/crates/agentic-server-core/src/tool/registry.rs b/crates/agentic-server-core/src/tool/registry.rs index 17c0e8e5..ee30a4d0 100644 --- a/crates/agentic-server-core/src/tool/registry.rs +++ b/crates/agentic-server-core/src/tool/registry.rs @@ -8,11 +8,12 @@ use super::codex::insert_namespace_entries; use super::executors::GatewayExecutors; use super::function::insert_function_entry; use super::mcp::{insert_mcp_entry, maybe_mcp_function}; +use super::tool_search; use super::web_search::insert_web_search_entry; use super::{CodexNamespaceHandler, GatewayExecutor, NamespaceMap, ToolError, ToolOutput}; use crate::types::io::OutputItem; use crate::types::io::output::FunctionToolCall; -use crate::types::tools::{CodeInterpreterToolParam, FileSearchToolParam, ResponsesTool}; +use crate::types::tools::{CodeInterpreterToolParam, FileSearchToolParam, ResponsesTool, ToolSearchExecution}; use crate::utils::common::serialize_to_value_or_custom_default; #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] @@ -134,6 +135,9 @@ pub struct ToolRegistry { /// and `restore_stream_event_value` — the latter called once per SSE line /// during streaming — don't rebuild it on every call. namespace_map: Option, + client_tool_search: bool, + loaded_tool_namespaces: HashMap, + tool_search_name_owned: bool, } impl ToolRegistry { @@ -179,6 +183,12 @@ impl ToolRegistry { ResponsesTool::Custom(p) => { tracing::debug!(name = %p.name, "client-owned custom tool skipped in function registry"); } + ResponsesTool::ToolSearch(p) => { + tracing::debug!( + execution = ?p.execution, + "tool_search skipped in function registry" + ); + } ResponsesTool::Unknown => { tracing::debug!("unknown tool declared but skipped in registry"); } @@ -186,8 +196,22 @@ impl ToolRegistry { } let namespace_map = CodexNamespaceHandler.build_namespace_map((!tools.is_empty()).then_some(tools))?; + let client_tool_search = tools.iter().any(|tool| { + matches!( + tool, + ResponsesTool::ToolSearch(search) + if search.execution == Some(ToolSearchExecution::Client) + ) + }); + let tool_search_name_owned = entries.contains_key(tool_search::TOOL_SEARCH_NAME); - Ok(Self { entries, namespace_map }) + Ok(Self { + entries, + namespace_map, + client_tool_search, + loaded_tool_namespaces: HashMap::new(), + tool_search_name_owned, + }) } #[must_use] @@ -207,10 +231,28 @@ impl ToolRegistry { pub fn restore_final_payload_output(&self, output: &mut [OutputItem]) { CodexNamespaceHandler.restore_output_items(output, self.namespace_map.as_ref()); + tool_search::restore_loaded_namespace_output_items(output, &self.loaded_tool_namespaces); + tool_search::restore_output_items(output, self.can_restore_tool_search_fallback()); } pub fn restore_stream_event_value(&self, value: &mut Value) -> bool { - CodexNamespaceHandler.restore_response_value(value, self.namespace_map.as_ref()) + let mut changed = CodexNamespaceHandler.restore_response_value(value, self.namespace_map.as_ref()); + changed |= tool_search::restore_loaded_namespace_response_value(value, &self.loaded_tool_namespaces); + changed |= tool_search::restore_response_value(value, self.can_restore_tool_search_fallback()); + changed + } + + #[must_use] + pub(crate) const fn can_restore_tool_search_fallback(&self) -> bool { + self.client_tool_search && !self.tool_search_name_owned + } + + pub(crate) fn load_tool_search_output(&mut self, input: &crate::types::io::ResponsesInput) { + self.loaded_tool_namespaces = tool_search::loaded_namespace_members(input); + self.loaded_tool_namespaces + .retain(|name, _| !self.entries.contains_key(name)); + self.tool_search_name_owned |= + tool_search::loaded_function_names(input).contains(tool_search::TOOL_SEARCH_NAME); } /// Returns the subset of `calls` whose names map to gateway-owned tools. @@ -260,3 +302,126 @@ impl ToolRegistry { }) } } + +#[cfg(test)] +mod tests { + use super::*; + use crate::tool::model_visible_namespace_member_name; + use crate::types::event::MessageStatus; + use crate::types::io::FunctionToolCall; + + fn function_call(name: impl Into, namespace: Option<&str>) -> OutputItem { + OutputItem::FunctionCall(FunctionToolCall { + id: "fc_1".to_owned(), + call_id: "call_1".to_owned(), + name: name.into(), + namespace: namespace.map(str::to_owned), + arguments: "{}".to_owned(), + status: MessageStatus::Completed, + }) + } + + #[tokio::test] + async fn declared_function_named_tool_search_owns_its_call() { + let tools: Vec = serde_json::from_value(serde_json::json!([ + {"type": "function", "name": "tool_search"}, + {"type": "tool_search", "execution": "client"} + ])) + .unwrap(); + let registry = ToolRegistry::build_with_handlers(&tools, &GatewayExecutors::default()) + .await + .unwrap(); + let mut output = vec![function_call("tool_search", None)]; + + registry.restore_final_payload_output(&mut output); + + assert!(matches!(output[0], OutputItem::FunctionCall(_))); + assert!(!registry.can_restore_tool_search_fallback()); + } + + #[tokio::test] + async fn declared_namespace_member_named_tool_search_is_restored_before_fallback_classification() { + let tools: Vec = serde_json::from_value(serde_json::json!([ + { + "type": "namespace", + "name": "fixture", + "tools": [{"type": "function", "name": "tool_search"}] + }, + {"type": "tool_search", "execution": "client"} + ])) + .unwrap(); + let registry = ToolRegistry::build_with_handlers(&tools, &GatewayExecutors::default()) + .await + .unwrap(); + let flat_name = model_visible_namespace_member_name("fixture", "tool_search"); + let mut output = vec![function_call(flat_name, None)]; + + registry.restore_final_payload_output(&mut output); + + let OutputItem::FunctionCall(call) = &output[0] else { + panic!("namespace member must remain a function call"); + }; + assert_eq!(call.name, "tool_search"); + assert_eq!(call.namespace.as_deref(), Some("fixture")); + } + + #[tokio::test] + async fn dynamically_loaded_namespace_member_named_tool_search_owns_its_call() { + let tools: Vec = serde_json::from_value(serde_json::json!([ + {"type": "tool_search", "execution": "client"} + ])) + .unwrap(); + let mut registry = ToolRegistry::build_with_handlers(&tools, &GatewayExecutors::default()) + .await + .unwrap(); + let input = serde_json::from_value(serde_json::json!([ + { + "type": "tool_search_call", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "arguments": {"query": "search helper"} + }, + { + "type": "tool_search_output", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "tools": [{ + "type": "namespace", + "name": "fixture", + "tools": [{"type": "function", "name": "tool_search"}] + }] + } + ])) + .unwrap(); + registry.load_tool_search_output(&input); + let mut output = vec![function_call("tool_search", None)]; + + registry.restore_final_payload_output(&mut output); + + let OutputItem::FunctionCall(call) = &output[0] else { + panic!("loaded namespace member must remain a function call"); + }; + assert_eq!(call.name, "tool_search"); + assert_eq!(call.namespace.as_deref(), Some("fixture")); + assert!(!registry.can_restore_tool_search_fallback()); + } + + #[tokio::test] + async fn unqualified_provider_fallback_is_restored_when_name_is_unowned() { + let tools: Vec = serde_json::from_value(serde_json::json!([ + {"type": "tool_search", "execution": "client"} + ])) + .unwrap(); + let registry = ToolRegistry::build_with_handlers(&tools, &GatewayExecutors::default()) + .await + .unwrap(); + let mut output = vec![function_call("tool_search", None)]; + + registry.restore_final_payload_output(&mut output); + + assert!(matches!(output[0], OutputItem::ToolSearchCall(_))); + assert!(registry.can_restore_tool_search_fallback()); + } +} diff --git a/crates/agentic-server-core/src/tool/tool_search.rs b/crates/agentic-server-core/src/tool/tool_search.rs new file mode 100644 index 00000000..e5023d1e --- /dev/null +++ b/crates/agentic-server-core/src/tool/tool_search.rs @@ -0,0 +1,771 @@ +use std::collections::{HashMap, HashSet}; + +use serde_json::{Map, Value}; + +use crate::types::io::{ + FunctionTool, InputItem, OutputItem, ResponsesInput, ToolSearchCall, ToolSearchOutput, ToolSearchStatus, +}; +use crate::types::tools::ToolSearchExecution; +use crate::utils::common::deserialize_from_str_opt; + +pub(crate) const TOOL_SEARCH_NAME: &str = "tool_search"; + +/// Return valid client tool-search outputs in input order. +/// +/// An output is trusted for provider promotion only when it is completed, +/// carries a non-empty call ID, and follows a completed client search call with +/// that ID. The first valid output for each call ID wins; later duplicates or +/// conflicting outputs are preserved on the wire but ignored for promotion. +fn valid_client_tool_search_outputs(input: &ResponsesInput) -> Vec<&ToolSearchOutput> { + let ResponsesInput::Items(items) = input else { + return Vec::new(); + }; + let mut calls = HashSet::new(); + let mut completed_outputs = HashSet::new(); + let mut outputs = Vec::new(); + + for item in items { + match item { + InputItem::ToolSearchCall(call) + if call.execution == Some(ToolSearchExecution::Client) + && call.status == Some(ToolSearchStatus::Completed) => + { + if let Some(call_id) = call.call_id.as_deref().filter(|call_id| !call_id.is_empty()) { + calls.insert(call_id); + } + } + InputItem::ToolSearchOutput(output) + if output.execution == Some(ToolSearchExecution::Client) + && output.status == Some(ToolSearchStatus::Completed) + && output + .call_id + .as_deref() + .filter(|call_id| !call_id.is_empty()) + .is_some_and(|call_id| calls.contains(call_id) && completed_outputs.insert(call_id)) => + { + outputs.push(output); + } + _ => {} + } + } + + outputs +} + +fn top_level_function_names(outputs: &[&ToolSearchOutput]) -> HashSet { + outputs + .iter() + .flat_map(|output| &output.tools) + .filter_map(|tool| { + tool.as_object() + .filter(|tool| tool.get("type").and_then(Value::as_str) == Some("function")) + .and_then(|tool| tool.get("name").and_then(Value::as_str)) + .filter(|name| !name.is_empty()) + .map(str::to_owned) + }) + .collect() +} + +/// Build an unqualified member-name to namespace map from client-provided +/// `tool_search_output` items. +/// +/// Native namespace-capable providers return a `namespace` on the eventual +/// function call. Responses-compatible providers that flatten the loaded +/// namespace may return only the member name. Ambiguous member names are +/// intentionally excluded instead of guessing a namespace. +pub(crate) fn loaded_namespace_members(input: &ResponsesInput) -> HashMap { + let outputs = valid_client_tool_search_outputs(input); + let top_level_names = top_level_function_names(&outputs); + let mut members = HashMap::>::new(); + for output in outputs { + for tool in &output.tools { + let Some(namespace) = tool + .as_object() + .filter(|tool| tool.get("type").and_then(Value::as_str) == Some("namespace")) + .and_then(|tool| tool.get("name").and_then(Value::as_str)) + .filter(|namespace| !namespace.is_empty()) + else { + continue; + }; + let Some(tools) = tool.get("tools").and_then(Value::as_array) else { + continue; + }; + for member in tools { + let Some(name) = member + .as_object() + .filter(|member| member.get("type").and_then(Value::as_str) == Some("function")) + .and_then(|member| member.get("name").and_then(Value::as_str)) + .filter(|name| !name.is_empty()) + else { + continue; + }; + members + .entry(name.to_owned()) + .and_modify(|existing| { + if existing.as_deref() != Some(namespace) { + *existing = None; + } + }) + .or_insert_with(|| Some(namespace.to_owned())); + } + } + } + + members + .into_iter() + .filter_map(|(name, namespace)| { + (!top_level_names.contains(&name)) + .then_some(namespace) + .flatten() + .map(|namespace| (name, namespace)) + }) + .collect() +} + +/// Convert uniquely named functions returned by client-side tool search into +/// provider-facing declarations for the next inference call. +/// +/// Codex keeps loaded definitions inside `tool_search_output`. Providers with +/// native dynamic-tool support can consume those definitions from the input +/// item directly. Responses-compatible providers that only understand a flat +/// `tools` array need the selected definitions repeated there. The functions +/// are no longer marked deferred because the client has explicitly loaded +/// them. Their namespace is restored on the eventual call before it is +/// returned to Codex. +pub(crate) fn loaded_function_tools(input: &ResponsesInput) -> Vec { + let outputs = valid_client_tool_search_outputs(input); + let unique_namespaces = loaded_namespace_members(input); + let mut emitted = HashSet::new(); + let mut loaded = Vec::new(); + + for output in outputs { + for tool in &output.tools { + let Some(tool) = tool.as_object() else { + continue; + }; + match tool.get("type").and_then(Value::as_str) { + Some("function") => { + if let Some(function) = function_tool_from_object(tool) + && emitted.insert(function.name.clone()) + { + loaded.push(function); + } + } + Some("namespace") => { + let Some(namespace_name) = tool.get("name").and_then(Value::as_str) else { + continue; + }; + let Some(members) = tool.get("tools").and_then(Value::as_array) else { + continue; + }; + for member in members { + let Some(member) = member.as_object() else { + continue; + }; + let Some(function) = function_tool_from_object(member) else { + continue; + }; + if unique_namespaces.get(&function.name).map(String::as_str) == Some(namespace_name) + && emitted.insert(function.name.clone()) + { + loaded.push(function); + } + } + } + _ => {} + } + } + } + + loaded +} + +fn function_tool_from_object(tool: &Map) -> Option { + if tool.get("type").and_then(Value::as_str) != Some("function") { + return None; + } + let name = tool + .get("name") + .and_then(Value::as_str) + .filter(|name| !name.is_empty())?; + Some(FunctionTool { + type_: "function".to_owned(), + name: name.to_owned(), + description: tool.get("description").and_then(Value::as_str).map(str::to_owned), + parameters: tool.get("parameters").filter(|value| !value.is_null()).cloned(), + strict: tool.get("strict").and_then(Value::as_bool), + defer_loading: None, + }) +} + +pub(crate) fn loaded_function_names(input: &ResponsesInput) -> HashSet { + let mut names = top_level_function_names(&valid_client_tool_search_outputs(input)); + names.extend(loaded_namespace_members(input).into_keys()); + names +} + +/// Restore Responses-compatible providers' function-call fallback to the +/// canonical client-executed tool-search item. +/// +/// Some providers accept a native `type: "tool_search"` declaration but emit +/// the selected invocation as `type: "function_call", name: "tool_search"`. +/// Codex dispatches search only when it receives `tool_search_call`, so normalize +/// that provider fallback at the same boundary where namespace calls are +/// restored. The conversion is enabled only when the request declared a +/// client-executed tool search. +pub(crate) fn restore_output_items(output: &mut [OutputItem], enabled: bool) { + if !enabled { + return; + } + + for item in output { + let OutputItem::FunctionCall(call) = item else { + continue; + }; + if call.name != TOOL_SEARCH_NAME || call.namespace.is_some() || call.call_id.is_empty() { + continue; + } + let Some(arguments) = deserialize_from_str_opt::(&call.arguments) else { + tracing::warn!(call_id = %call.call_id, "cannot restore tool_search call with invalid JSON arguments"); + continue; + }; + + let mut extra = HashMap::new(); + if !call.id.is_empty() { + extra.insert("id".to_owned(), Value::String(call.id.clone())); + } + let call_id = call.call_id.clone(); + *item = OutputItem::ToolSearchCall(ToolSearchCall { + execution: Some(ToolSearchExecution::Client), + call_id: Some(call_id.clone()), + status: Some(call.status.into()), + arguments, + extra, + }); + tracing::debug!(%call_id, "restored provider function_call fallback as tool_search_call"); + } +} + +pub(crate) fn restore_loaded_namespace_output_items( + output: &mut [OutputItem], + loaded_namespaces: &HashMap, +) { + for item in output { + let OutputItem::FunctionCall(call) = item else { + continue; + }; + if call.namespace.is_some() { + continue; + } + let Some(namespace) = loaded_namespaces.get(&call.name) else { + continue; + }; + call.namespace = Some(namespace.clone()); + tracing::debug!( + call_id = %call.call_id, + %namespace, + member = %call.name, + "restored namespace on dynamically loaded tool call" + ); + } +} + +/// Restore a streamed function-call fallback in-place. +/// +/// This handles output-item events and response envelopes. Function-argument +/// delta events are suppressed separately by the streaming executor. +pub(crate) fn restore_response_value(value: &mut Value, enabled: bool) -> bool { + if !enabled { + return false; + } + + let mut changed = false; + if let Some(item) = value.as_object_mut().and_then(|object| object.get_mut("item")) { + changed |= restore_call_value(item); + } + changed |= restore_call_value(value); + + for key in ["response", "payload"] { + if let Some(nested) = value.as_object_mut().and_then(|object| object.get_mut(key)) { + changed |= restore_response_value(nested, enabled); + } + } + if let Some(Value::Array(items)) = value.as_object_mut().and_then(|object| object.get_mut("output")) { + for item in items { + changed |= restore_call_value(item); + } + } + + changed +} + +pub(crate) fn restore_loaded_namespace_response_value( + value: &mut Value, + loaded_namespaces: &HashMap, +) -> bool { + if loaded_namespaces.is_empty() { + return false; + } + + let mut changed = false; + if let Some(item) = value.as_object_mut().and_then(|object| object.get_mut("item")) { + changed |= restore_loaded_namespace_call_value(item, loaded_namespaces); + } + changed |= restore_loaded_namespace_call_value(value, loaded_namespaces); + for key in ["response", "payload"] { + if let Some(nested) = value.as_object_mut().and_then(|object| object.get_mut(key)) { + changed |= restore_loaded_namespace_response_value(nested, loaded_namespaces); + } + } + if let Some(Value::Array(items)) = value.as_object_mut().and_then(|object| object.get_mut("output")) { + for item in items { + changed |= restore_loaded_namespace_call_value(item, loaded_namespaces); + } + } + changed +} + +fn restore_call_value(value: &mut Value) -> bool { + let Some(object) = value.as_object_mut() else { + return false; + }; + if object.get("type").and_then(Value::as_str) != Some("function_call") + || object.get("name").and_then(Value::as_str) != Some(TOOL_SEARCH_NAME) + || object.get("namespace").and_then(Value::as_str).is_some() + { + return false; + } + if object + .get("call_id") + .and_then(Value::as_str) + .unwrap_or_default() + .is_empty() + { + return false; + } + + let arguments = object + .get("arguments") + .and_then(Value::as_str) + .filter(|arguments| !arguments.is_empty()) + .and_then(deserialize_from_str_opt::) + .unwrap_or_else(|| Value::Object(Map::new())); + object.insert("type".to_owned(), Value::String("tool_search_call".to_owned())); + object.insert("execution".to_owned(), Value::String("client".to_owned())); + object.insert("arguments".to_owned(), arguments); + object.remove("name"); + object.remove("namespace"); + true +} + +fn restore_loaded_namespace_call_value(value: &mut Value, loaded_namespaces: &HashMap) -> bool { + let Some(object) = value.as_object_mut() else { + return false; + }; + if object.get("type").and_then(Value::as_str) != Some("function_call") + || object.get("namespace").and_then(Value::as_str).is_some() + { + return false; + } + let Some(name) = object.get("name").and_then(Value::as_str) else { + return false; + }; + let Some(namespace) = loaded_namespaces.get(name) else { + return false; + }; + object.insert("namespace".to_owned(), Value::String(namespace.clone())); + true +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::types::event::MessageStatus; + use crate::types::io::FunctionToolCall; + + #[test] + fn restores_final_function_call_fallback() { + let mut output = vec![OutputItem::FunctionCall(FunctionToolCall { + id: "fc_search".to_owned(), + call_id: "call_search".to_owned(), + name: TOOL_SEARCH_NAME.to_owned(), + namespace: None, + arguments: r#"{"query":"calendar","limit":2}"#.to_owned(), + status: MessageStatus::Completed, + })]; + + restore_output_items(&mut output, true); + + let OutputItem::ToolSearchCall(call) = &output[0] else { + panic!("expected restored tool_search_call"); + }; + assert_eq!(call.call_id.as_deref(), Some("call_search")); + assert_eq!(call.status, Some(ToolSearchStatus::Completed)); + assert_eq!(call.arguments["query"], "calendar"); + assert_eq!(call.extra["id"], "fc_search"); + } + + #[test] + fn restores_streamed_output_item_and_preserves_unrelated_function() { + let mut event = serde_json::json!({ + "type": "response.output_item.done", + "item": { + "type": "function_call", + "id": "fc_search", + "call_id": "call_search", + "name": "tool_search", + "status": "completed", + "arguments": "{\"query\":\"calendar\"}" + } + }); + assert!(restore_response_value(&mut event, true)); + assert_eq!(event["item"]["type"], "tool_search_call"); + assert_eq!(event["item"]["execution"], "client"); + assert_eq!(event["item"]["arguments"]["query"], "calendar"); + assert!(event["item"].get("name").is_none()); + + let mut unrelated = serde_json::json!({ + "type": "function_call", + "call_id": "call_other", + "name": "other", + "arguments": "{}" + }); + assert!(!restore_response_value(&mut unrelated, true)); + assert_eq!(unrelated["type"], "function_call"); + } + + #[test] + fn restores_namespace_for_a_dynamically_loaded_member() { + let input: ResponsesInput = serde_json::from_value(serde_json::json!([ + { + "type": "tool_search_call", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "arguments": {"query": "echo_text"} + }, + { + "type": "tool_search_output", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "tools": [{ + "type": "namespace", + "name": "mcp__fixture", + "description": "Fixture tools", + "tools": [{ + "type": "function", + "name": "echo_text", + "defer_loading": true, + "parameters": {"type": "object"} + }] + }] + }, + { + "type": "tool_search_output", + "execution": "server", + "call_id": "call_server_search", + "status": "completed", + "tools": [{ + "type": "namespace", + "name": "server", + "tools": [{"type": "function", "name": "server_only"}] + }] + } + ])) + .unwrap(); + let namespaces = loaded_namespace_members(&input); + assert_eq!(namespaces.get("echo_text").map(String::as_str), Some("mcp__fixture")); + assert!(!namespaces.contains_key("server_only")); + + let mut event = serde_json::json!({ + "type": "response.output_item.done", + "item": { + "type": "function_call", + "call_id": "call_echo", + "name": "echo_text", + "arguments": "{\"text\":\"hello\"}" + } + }); + assert!(restore_loaded_namespace_response_value(&mut event, &namespaces)); + assert_eq!(event["item"]["namespace"], "mcp__fixture"); + } + + #[test] + fn promotes_only_uniquely_namespaced_loaded_functions() { + let input: ResponsesInput = serde_json::from_value(serde_json::json!([ + { + "type": "tool_search_call", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "arguments": {"query": "fixture tools"} + }, + { + "type": "tool_search_output", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "tools": [ + { + "type": "namespace", + "name": "mcp__one", + "tools": [ + { + "type": "function", + "name": "echo_text", + "description": "Echo text", + "parameters": {"type": "object"}, + "strict": false, + "defer_loading": true + }, + {"type": "function", "name": "ambiguous"} + ] + }, + { + "type": "namespace", + "name": "mcp__two", + "tools": [{"type": "function", "name": "ambiguous"}] + } + ] + } + ])) + .unwrap(); + + let loaded = loaded_function_tools(&input); + + assert_eq!(loaded.len(), 1); + assert_eq!(loaded[0].name, "echo_text"); + assert_eq!(loaded[0].description.as_deref(), Some("Echo text")); + assert_eq!( + loaded[0].parameters.as_ref().and_then(|value| value.get("type")), + Some(&Value::String("object".to_owned())) + ); + assert_eq!(loaded[0].strict, Some(false)); + assert_eq!(loaded[0].defer_loading, None); + } + + #[test] + fn promotes_top_level_functions_and_unique_namespace_members() { + let input: ResponsesInput = serde_json::from_value(serde_json::json!([ + { + "type": "tool_search_call", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "arguments": {"query": "tools"} + }, + { + "type": "tool_search_output", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "tools": [ + { + "type": "function", + "name": "direct_lookup", + "description": "A direct function.", + "parameters": {"type": "object"}, + "defer_loading": true + }, + { + "type": "namespace", + "name": "mcp__fixture", + "tools": [{ + "type": "function", + "name": "namespaced_lookup", + "description": "A namespace member.", + "parameters": {"type": "object"}, + "defer_loading": true + }] + } + ] + } + ])) + .unwrap(); + + let loaded = loaded_function_tools(&input); + assert_eq!( + loaded.iter().map(|tool| tool.name.as_str()).collect::>(), + ["direct_lookup", "namespaced_lookup"] + ); + let namespaces = loaded_namespace_members(&input); + assert!(!namespaces.contains_key("direct_lookup")); + assert_eq!( + namespaces.get("namespaced_lookup").map(String::as_str), + Some("mcp__fixture") + ); + } + + #[test] + fn promotion_requires_a_prior_matching_completed_client_call() { + let input: ResponsesInput = serde_json::from_value(serde_json::json!([ + { + "type": "tool_search_output", + "execution": "client", + "call_id": null, + "status": "completed", + "tools": [{"type": "function", "name": "null_id"}] + }, + { + "type": "tool_search_output", + "execution": "client", + "call_id": "unmatched", + "status": "completed", + "tools": [{"type": "function", "name": "unmatched"}] + }, + { + "type": "tool_search_call", + "execution": "server", + "call_id": "server", + "status": "completed", + "arguments": {} + }, + { + "type": "tool_search_output", + "execution": "server", + "call_id": "server", + "status": "completed", + "tools": [{"type": "function", "name": "server"}] + }, + { + "type": "tool_search_call", + "execution": "client", + "call_id": "in_progress", + "status": "in_progress", + "arguments": {} + }, + { + "type": "tool_search_output", + "execution": "client", + "call_id": "in_progress", + "status": "completed", + "tools": [{"type": "function", "name": "in_progress"}] + }, + { + "type": "tool_search_call", + "execution": "client", + "call_id": "incomplete", + "status": "incomplete", + "arguments": {} + }, + { + "type": "tool_search_output", + "execution": "client", + "call_id": "incomplete", + "status": "incomplete", + "tools": [{"type": "function", "name": "incomplete"}] + }, + { + "type": "tool_search_call", + "call_id": "absent_fields", + "arguments": {} + }, + { + "type": "tool_search_output", + "call_id": "absent_fields", + "tools": [{"type": "function", "name": "absent_fields"}] + }, + { + "type": "tool_search_call", + "execution": "client", + "call_id": "valid", + "status": "completed", + "arguments": {} + }, + { + "type": "tool_search_output", + "execution": "client", + "call_id": "valid", + "status": "completed", + "tools": [{"type": "function", "name": "valid"}] + } + ])) + .unwrap(); + + let loaded = loaded_function_tools(&input); + assert_eq!( + loaded.iter().map(|tool| tool.name.as_str()).collect::>(), + ["valid"] + ); + } + + #[test] + fn first_valid_output_for_a_call_id_wins_deterministically() { + let input: ResponsesInput = serde_json::from_value(serde_json::json!([ + { + "type": "tool_search_call", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "arguments": {} + }, + { + "type": "tool_search_output", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "tools": [{"type": "function", "name": "first"}] + }, + { + "type": "tool_search_output", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "tools": [{"type": "function", "name": "conflicting_second"}] + } + ])) + .unwrap(); + + let loaded = loaded_function_tools(&input); + assert_eq!( + loaded.iter().map(|tool| tool.name.as_str()).collect::>(), + ["first"] + ); + } + + #[test] + fn direct_function_name_wins_over_a_namespaced_member_collision() { + let input: ResponsesInput = serde_json::from_value(serde_json::json!([ + { + "type": "tool_search_call", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "arguments": {} + }, + { + "type": "tool_search_output", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "tools": [ + {"type": "namespace", "name": "ns", "tools": [{"type": "function", "name": "same"}]}, + {"type": "function", "name": "same", "description": "direct"} + ] + } + ])) + .unwrap(); + + let loaded = loaded_function_tools(&input); + assert_eq!(loaded.len(), 1); + assert_eq!(loaded[0].name, "same"); + assert_eq!(loaded[0].description.as_deref(), Some("direct")); + assert!(!loaded_namespace_members(&input).contains_key("same")); + } + + #[test] + fn namespaced_tool_search_function_is_not_rewritten_as_search_fallback() { + let mut output = vec![OutputItem::FunctionCall(FunctionToolCall { + id: "fc_search".to_owned(), + call_id: "call_search".to_owned(), + name: TOOL_SEARCH_NAME.to_owned(), + namespace: Some("legitimate_namespace".to_owned()), + arguments: "{}".to_owned(), + status: MessageStatus::Completed, + })]; + + restore_output_items(&mut output, true); + assert!(matches!(output[0], OutputItem::FunctionCall(_))); + } +} diff --git a/crates/agentic-server-core/src/tool/web_search.rs b/crates/agentic-server-core/src/tool/web_search.rs index 562f087d..0948977e 100644 --- a/crates/agentic-server-core/src/tool/web_search.rs +++ b/crates/agentic-server-core/src/tool/web_search.rs @@ -85,6 +85,7 @@ pub(crate) fn web_search_function_tool() -> FunctionTool { "required": ["query"] })), strict: Some(false), + defer_loading: None, } } diff --git a/crates/agentic-server-core/src/types/io/input.rs b/crates/agentic-server-core/src/types/io/input.rs index 4c040c9d..ee240650 100644 --- a/crates/agentic-server-core/src/types/io/input.rs +++ b/crates/agentic-server-core/src/types/io/input.rs @@ -1,7 +1,7 @@ use serde::{Deserialize, Serialize}; use serde_json::Value; -use super::output::{CustomToolCall, FunctionToolCall, ReasoningOutput}; +use super::output::{CustomToolCall, FunctionToolCall, ReasoningOutput, ToolSearchCall, ToolSearchOutput}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct InputTextContent { @@ -79,6 +79,12 @@ pub enum InputItem { CustomToolCall(CustomToolCall), #[serde(rename = "custom_tool_call_output")] CustomToolCallOutput(CustomToolCallOutputMessage), + /// The model's request for the caller to discover deferred tools. + #[serde(rename = "tool_search_call")] + ToolSearchCall(ToolSearchCall), + /// The tool definitions loaded by a hosted or client-executed search. + #[serde(rename = "tool_search_output")] + ToolSearchOutput(ToolSearchOutput), #[serde(rename = "reasoning")] Reasoning(ReasoningOutput), #[serde(other)] @@ -98,3 +104,39 @@ pub enum ResponsesInput { Text(String), Items(Vec), } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn tool_search_input_items_preserve_omitted_execution_and_status() { + let expected = serde_json::json!([ + { + "type": "tool_search_call", + "call_id": "call_search", + "arguments": {"query": "tools"} + }, + { + "type": "tool_search_output", + "call_id": "call_search", + "tools": [] + } + ]); + let input: ResponsesInput = serde_json::from_value(expected.clone()).unwrap(); + let ResponsesInput::Items(items) = &input else { + panic!("expected input items"); + }; + let InputItem::ToolSearchCall(call) = &items[0] else { + panic!("expected tool-search call"); + }; + assert_eq!(call.execution, None); + assert_eq!(call.status, None); + let InputItem::ToolSearchOutput(output) = &items[1] else { + panic!("expected tool-search output"); + }; + assert_eq!(output.execution, None); + assert_eq!(output.status, None); + assert_eq!(serde_json::to_value(input).unwrap(), expected); + } +} diff --git a/crates/agentic-server-core/src/types/io/mod.rs b/crates/agentic-server-core/src/types/io/mod.rs index 514774c5..13858644 100644 --- a/crates/agentic-server-core/src/types/io/mod.rs +++ b/crates/agentic-server-core/src/types/io/mod.rs @@ -9,8 +9,8 @@ pub use input::{ }; pub use output::{ ApplyDone, CustomToolCall, FunctionToolCall, GatewayCallStatus, McpToolCall, OutputItem, OutputMessage, - OutputTextContent, ReasoningOutput, ReasoningTextContent, WebSearchActionSearch, WebSearchCall, - WebSearchCallStatus, WebSearchSource, + OutputTextContent, ReasoningOutput, ReasoningTextContent, ToolSearchCall, ToolSearchOutput, ToolSearchStatus, + WebSearchActionSearch, WebSearchCall, WebSearchCallStatus, WebSearchSource, }; pub use tools::{FunctionTool, ToolChoice}; pub(crate) use tools::{resolve_tool_choice, resolve_tools}; diff --git a/crates/agentic-server-core/src/types/io/output.rs b/crates/agentic-server-core/src/types/io/output.rs index 387b0b1f..98fbbd4b 100644 --- a/crates/agentic-server-core/src/types/io/output.rs +++ b/crates/agentic-server-core/src/types/io/output.rs @@ -5,6 +5,7 @@ use crate::events::EventPayload; use crate::executor::error::ExecutorError; use crate::tool::ToolRegistry; use crate::types::event::MessageStatus; +use crate::types::tools::ToolSearchExecution; use crate::utils::uuid7_str; use super::input::{InputContent, InputItem, InputMessage, InputMessageContent, InputTextContent}; @@ -113,6 +114,70 @@ pub struct CustomToolCall { pub input: String, } +/// Lifecycle status for a tool-search call or output item. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum ToolSearchStatus { + InProgress, + Completed, + Incomplete, +} + +impl From for ToolSearchStatus { + fn from(status: MessageStatus) -> Self { + match status { + MessageStatus::InProgress => Self::InProgress, + MessageStatus::Completed => Self::Completed, + } + } +} + +/// A model-generated request to discover deferred tools. +/// +/// Client execution carries a call ID that the caller echoes in a matching +/// [`ToolSearchOutput`]. Hosted execution uses a null call ID. +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ToolSearchCall { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub execution: Option, + pub call_id: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub status: Option, + pub arguments: Value, + #[serde(default)] + #[serde(flatten)] + pub extra: std::collections::HashMap, +} + +impl ToolSearchCall { + #[must_use] + pub fn requires_client_execution(&self) -> bool { + matches!( + (self.execution, self.status), + (Some(ToolSearchExecution::Client), Some(ToolSearchStatus::Completed)) + ) && self.call_id.as_deref().is_some_and(|call_id| !call_id.is_empty()) + } +} + +/// Tool definitions made available by a tool search. +/// +/// Loaded declarations remain opaque because the gateway passes them through +/// without normalizing or executing the search. This also preserves tool types +/// and fields added by future Responses API versions. +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ToolSearchOutput { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub execution: Option, + pub call_id: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub status: Option, + #[serde(default)] + pub tools: Vec, + #[serde(default)] + #[serde(flatten)] + pub extra: std::collections::HashMap, +} + fn default_completed_status() -> MessageStatus { MessageStatus::Completed } @@ -418,6 +483,10 @@ pub enum OutputItem { FunctionCall(FunctionToolCall), #[serde(rename = "custom_tool_call")] CustomToolCall(CustomToolCall), + #[serde(rename = "tool_search_call")] + ToolSearchCall(ToolSearchCall), + #[serde(rename = "tool_search_output")] + ToolSearchOutput(ToolSearchOutput), #[serde(rename = "web_search_call")] WebSearchCall(WebSearchCall), #[serde(rename = "mcp_tool_call")] @@ -436,9 +505,13 @@ impl OutputItem { .lookup(&call.name) .is_none_or(|entry| !entry.tool_type.is_gateway_owned()), Self::CustomToolCall(_) => true, - Self::Message(_) | Self::WebSearchCall(_) | Self::McpToolCall(_) | Self::Reasoning(_) | Self::Unknown => { - false - } + Self::ToolSearchCall(call) => call.requires_client_execution(), + Self::Message(_) + | Self::ToolSearchOutput(_) + | Self::WebSearchCall(_) + | Self::McpToolCall(_) + | Self::Reasoning(_) + | Self::Unknown => false, } } @@ -449,6 +522,8 @@ impl OutputItem { Self::Reasoning(reasoning) => Some(InputItem::Reasoning(reasoning.clone())), Self::FunctionCall(call) => Some(InputItem::FunctionCall(call.clone())), Self::CustomToolCall(call) => Some(InputItem::CustomToolCall(call.clone())), + Self::ToolSearchCall(call) => Some(InputItem::ToolSearchCall(call.clone())), + Self::ToolSearchOutput(output) => Some(InputItem::ToolSearchOutput(output.clone())), Self::WebSearchCall(_) | Self::McpToolCall(_) | Self::Unknown => None, } } @@ -499,6 +574,129 @@ mod tests { assert!(serialized.get("status").is_none()); } + #[test] + fn client_tool_search_call_requires_action_and_rehydrates() { + let expected = serde_json::json!({ + "type": "tool_search_call", + "execution": "client", + "call_id": "call_search_1", + "status": "completed", + "arguments": {"goal": "Find the shipping tool"}, + "x-provider-field": true + }); + let item: OutputItem = serde_json::from_value(expected.clone()).unwrap(); + + assert!(item.requires_client_action(&ToolRegistry::default())); + let Some(input) = item.to_input_item() else { + panic!("tool search call should rehydrate as input"); + }; + assert!(matches!(input, InputItem::ToolSearchCall(_))); + assert_eq!(serde_json::to_value(input).unwrap(), expected); + } + + #[test] + fn incomplete_tool_search_items_round_trip_and_require_no_action() { + let items = [ + serde_json::json!({ + "type": "tool_search_call", + "execution": "client", + "call_id": "call_search_1", + "status": "incomplete", + "arguments": {"goal": "Find a tool"} + }), + serde_json::json!({ + "type": "tool_search_output", + "execution": "client", + "call_id": "call_search_1", + "status": "incomplete", + "tools": [] + }), + ]; + + for expected in items { + let item: OutputItem = serde_json::from_value(expected.clone()).unwrap(); + assert!(!item.requires_client_action(&ToolRegistry::default())); + match &item { + OutputItem::ToolSearchCall(call) => { + assert_eq!(call.status, Some(ToolSearchStatus::Incomplete)); + } + OutputItem::ToolSearchOutput(output) => { + assert_eq!(output.status, Some(ToolSearchStatus::Incomplete)); + } + _ => panic!("expected tool-search item"), + } + let input = item.to_input_item().expect("tool-search item rehydrates"); + assert_eq!(serde_json::to_value(input).unwrap(), expected); + } + } + + #[test] + fn tool_search_call_with_optional_fields_omitted_requires_no_action() { + let expected = serde_json::json!({ + "type": "tool_search_call", + "call_id": "call_search_1", + "arguments": {"goal": "Find a tool"} + }); + let item: OutputItem = serde_json::from_value(expected.clone()).unwrap(); + + assert!(!item.requires_client_action(&ToolRegistry::default())); + let OutputItem::ToolSearchCall(call) = &item else { + panic!("expected tool-search call"); + }; + assert_eq!(call.execution, None); + assert_eq!(call.status, None); + let input = item.to_input_item().expect("tool-search call rehydrates"); + assert_eq!(serde_json::to_value(input).unwrap(), expected); + } + + #[test] + fn completed_client_tool_search_call_requires_a_nonempty_call_id_for_action() { + for call_id in [serde_json::Value::Null, serde_json::Value::String(String::new())] { + let item: OutputItem = serde_json::from_value(serde_json::json!({ + "type": "tool_search_call", + "execution": "client", + "call_id": call_id, + "status": "completed", + "arguments": {"goal": "Find a tool"} + })) + .unwrap(); + + assert!(!item.requires_client_action(&ToolRegistry::default())); + } + } + + #[test] + fn tool_search_output_preserves_loaded_tools_and_server_items_do_not_require_action() { + let call: OutputItem = serde_json::from_value(serde_json::json!({ + "type": "tool_search_call", + "execution": "server", + "call_id": null, + "status": "completed", + "arguments": {"paths": ["crm"]} + })) + .unwrap(); + assert!(!call.requires_client_action(&ToolRegistry::default())); + + let expected = serde_json::json!({ + "type": "tool_search_output", + "execution": "client", + "call_id": "call_search_1", + "status": "completed", + "tools": [{ + "type": "future_tool", + "name": "provider_tool", + "opaque": {"nested": true} + }] + }); + let output: OutputItem = serde_json::from_value(expected.clone()).unwrap(); + assert!(!output.requires_client_action(&ToolRegistry::default())); + let Some(input) = output.to_input_item() else { + panic!("tool search output should rehydrate as input"); + }; + assert!(matches!(input, InputItem::ToolSearchOutput(_))); + assert_eq!(serde_json::to_value(input).unwrap(), expected); + } + #[test] fn reasoning_output_round_trips_through_serde() { let json = serde_json::json!({ diff --git a/crates/agentic-server-core/src/types/io/tools.rs b/crates/agentic-server-core/src/types/io/tools.rs index d2067041..02bbf60f 100644 --- a/crates/agentic-server-core/src/types/io/tools.rs +++ b/crates/agentic-server-core/src/types/io/tools.rs @@ -11,6 +11,8 @@ pub struct FunctionTool { pub description: Option, pub parameters: Option, pub strict: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub defer_loading: Option, } #[derive(Debug, Clone, Default, PartialEq, Eq)] diff --git a/crates/agentic-server-core/src/types/mod.rs b/crates/agentic-server-core/src/types/mod.rs index 0a0b0e27..20f9d75f 100644 --- a/crates/agentic-server-core/src/types/mod.rs +++ b/crates/agentic-server-core/src/types/mod.rs @@ -8,12 +8,12 @@ pub use io::{ CustomToolCall, CustomToolCallOutputMessage, FunctionTool, FunctionToolCall, FunctionToolResultMessage, GatewayCallStatus, InputContent, InputImageContent, InputItem, InputMessage, InputMessageContent, InputTextContent, InputTokenDetails, McpToolCall, OutputItem, OutputMessage, OutputTextContent, OutputTokenDetails, ReasoningOutput, - ReasoningTextContent, ResponseUsage, ResponsesInput, ToolChoice, WebSearchActionSearch, WebSearchCall, - WebSearchCallStatus, WebSearchSource, + ReasoningTextContent, ResponseUsage, ResponsesInput, ToolChoice, ToolSearchCall, ToolSearchOutput, + ToolSearchStatus, WebSearchActionSearch, WebSearchCall, WebSearchCallStatus, WebSearchSource, }; pub use request_response::{IncompleteDetails, RequestPayload, ResponsePayload, UpstreamRequest, UpstreamTool}; pub use tools::{ CodeInterpreterToolParam, CodexNamespaceMember, CodexNamespaceToolParam, CustomToolParam, EmptyToolNameError, - FileSearchToolParam, FunctionToolParam, McpToolParam, NonEmptyToolName, ResponsesTool, WebSearchContextSize, - WebSearchFilters, WebSearchToolParam, WebSearchUserLocation, + FileSearchToolParam, FunctionToolParam, McpToolParam, NonEmptyToolName, ResponsesTool, ToolSearchExecution, + ToolSearchToolParam, WebSearchContextSize, WebSearchFilters, WebSearchToolParam, WebSearchUserLocation, }; diff --git a/crates/agentic-server-core/src/types/request_response.rs b/crates/agentic-server-core/src/types/request_response.rs index 3648bd26..d17f56df 100644 --- a/crates/agentic-server-core/src/types/request_response.rs +++ b/crates/agentic-server-core/src/types/request_response.rs @@ -1,11 +1,13 @@ +use std::collections::HashSet; + use serde::{Deserialize, Serialize}; use serde_json::{Value, json}; use super::io::{ FunctionTool, InputItem, InputMessage, InputMessageContent, OutputItem, ResponseUsage, ResponsesInput, ToolChoice, }; -use super::tools::{CustomToolParam, ResponsesTool}; -use crate::tool::{CodexNamespaceHandler, ToolError}; +use super::tools::{CustomToolParam, ResponsesTool, ToolSearchToolParam}; +use crate::tool::{CodexNamespaceHandler, ToolError, loaded_function_tools}; use crate::utils::common::serialize_to_string; #[derive(Debug, Clone, Serialize, Deserialize)] @@ -45,8 +47,8 @@ pub struct UpstreamRequest<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub instructions: Option<&'a str>, /// Tools forwarded to vLLM. Namespace members are flattened to ordinary - /// function declarations; native custom declarations retain their freeform - /// wire shape. + /// function declarations; native custom and tool-search declarations retain + /// their Responses wire shapes. /// Skipped when empty so vLLM does not receive an empty array. #[serde(skip_serializing_if = "Option::is_none")] pub tools: Option>, @@ -72,13 +74,15 @@ pub struct UpstreamRequest<'a> { /// A tool declaration supported by the upstream Responses endpoint. /// /// Function-like gateway declarations are normalized to [`FunctionTool`], -/// while freeform custom declarations retain their native Responses shape. +/// while freeform custom and tool-search declarations retain their native +/// Responses shapes. /// Keeping these as distinct variants prevents unrelated request tool types /// from entering the upstream tool list. #[derive(Debug, Clone)] pub enum UpstreamTool { Function(FunctionTool), Custom(CustomToolParam), + ToolSearch(ToolSearchToolParam), } impl Serialize for UpstreamTool { @@ -103,6 +107,21 @@ impl Serialize for UpstreamTool { } .serialize(serializer) } + Self::ToolSearch(declaration) => { + #[derive(Serialize)] + struct NativeToolSearch<'a> { + #[serde(rename = "type")] + type_: &'static str, + #[serde(flatten)] + declaration: &'a ToolSearchToolParam, + } + + NativeToolSearch { + type_: "tool_search", + declaration, + } + .serialize(serializer) + } } } } @@ -120,8 +139,8 @@ impl RequestPayload { /// Codex `namespace` tools' members are first renamed to their flat, /// model-visible names via [`CodexNamespaceHandler::resolve_namespace_members`]. /// Namespace and gateway tools are then normalized to function declarations. - /// Native custom tools are forwarded unchanged because their calls are not - /// function calls. `tool_choice` is resolved the same way via + /// Native custom and tool-search tools are forwarded unchanged because + /// their calls are not function calls. `tool_choice` is resolved the same way via /// [`CodexNamespaceHandler::resolve_tool_choice`]. /// /// # Errors @@ -142,14 +161,9 @@ impl RequestPayload { self.parallel_tool_calls }; - let renamed_tools = self - .tools - .as_deref() - .map(|tools| CodexNamespaceHandler.resolve_namespace_members(tools)) - .transpose()?; - let tools: Option> = - renamed_tools.map(|tools| tools.into_iter().flat_map(upstream_tools).collect()); - let tools = tools.filter(|tools| !tools.is_empty()); + let mut tools = self.declared_upstream_tools()?; + promote_loaded_function_tools(&self.input, &mut tools); + let tools = (!tools.is_empty()).then_some(tools); let namespace_map = CodexNamespaceHandler.build_namespace_map(self.tools.as_deref())?; let tool_choice = CodexNamespaceHandler.resolve_tool_choice(namespace_map.as_ref(), self.tool_choice.as_ref()); Ok(UpstreamRequest { @@ -175,6 +189,50 @@ impl RequestPayload { .as_deref() .is_some_and(|tools| tools.iter().any(ResponsesTool::is_gateway_owned)) } + + /// Whether request conversion would add at least one provider-facing + /// function loaded by a valid client tool-search call/output pair. + /// + /// # Errors + /// + /// Returns [`ToolError::Config`] when declared namespace tools collide. + pub fn has_tool_search_promotions(&self) -> Result { + let mut tools = self.declared_upstream_tools()?; + Ok(promote_loaded_function_tools(&self.input, &mut tools)) + } + + fn declared_upstream_tools(&self) -> Result, ToolError> { + let renamed_tools = self + .tools + .as_deref() + .map(|tools| CodexNamespaceHandler.resolve_namespace_members(tools)) + .transpose()?; + Ok(renamed_tools.into_iter().flatten().flat_map(upstream_tools).collect()) + } +} + +fn promote_loaded_function_tools(input: &ResponsesInput, tools: &mut Vec) -> bool { + let mut declared_names = tools + .iter() + .map(upstream_tool_name) + .map(str::to_owned) + .collect::>(); + let original_len = tools.len(); + for loaded in loaded_function_tools(input) { + if declared_names.insert(loaded.name.clone()) { + tracing::debug!(name = %loaded.name, "promoting client-loaded tool for provider compatibility"); + tools.push(UpstreamTool::Function(loaded)); + } + } + tools.len() != original_len +} + +fn upstream_tool_name(tool: &UpstreamTool) -> &str { + match tool { + UpstreamTool::Function(tool) => &tool.name, + UpstreamTool::Custom(tool) => tool.name.as_str(), + UpstreamTool::ToolSearch(_) => "tool_search", + } } fn upstream_tools(tool: ResponsesTool) -> Vec { @@ -187,6 +245,13 @@ fn upstream_tools(tool: ResponsesTool) -> Vec { ); vec![UpstreamTool::Custom(declaration)] } + ResponsesTool::ToolSearch(declaration) => { + tracing::debug!( + execution = ?declaration.execution, + "forwarding native tool_search declaration upstream" + ); + vec![UpstreamTool::ToolSearch(declaration)] + } function_like => function_like .to_function_tools() .into_iter() @@ -566,6 +631,233 @@ mod tests { assert_eq!(upstream["tool_choice"]["name"], "apply_patch"); } + #[test] + fn to_upstream_request_preserves_tool_search_and_deferred_function_fields() { + let payload: RequestPayload = serde_json::from_value(serde_json::json!({ + "model": "test", + "input": "find a matching tool", + "parallel_tool_calls": false, + "tools": [ + { + "type": "function", + "name": "get_shipping_eta", + "description": "Get an order's shipping ETA.", + "parameters": {"type": "object"}, + "defer_loading": true + }, + { + "type": "tool_search", + "execution": "client", + "description": "Find project tools.", + "parameters": { + "type": "object", + "properties": {"goal": {"type": "string"}} + }, + "x-provider-field": "kept" + } + ] + })) + .unwrap(); + + let request = payload.to_upstream_request(false).unwrap(); + let tools = request.tools.as_ref().expect("upstream tools"); + assert!(matches!(tools[0], UpstreamTool::Function(_))); + assert!(matches!(tools[1], UpstreamTool::ToolSearch(_))); + + let upstream = serde_json::to_value(request).unwrap(); + assert_eq!(upstream["tools"][0]["defer_loading"], true); + assert_eq!(upstream["tools"][1]["type"], "tool_search"); + assert_eq!(upstream["tools"][1]["execution"], "client"); + assert_eq!(upstream["tools"][1]["x-provider-field"], "kept"); + } + + #[test] + fn to_upstream_request_promotes_a_client_loaded_namespace_member() { + let payload: RequestPayload = serde_json::from_value(serde_json::json!({ + "model": "test", + "input": [ + { + "type": "tool_search_call", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "arguments": {"query": "add_numbers"} + }, + { + "type": "tool_search_output", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "tools": [{ + "type": "namespace", + "name": "mcp__fixture", + "tools": [{ + "type": "function", + "name": "add_numbers", + "description": "Add numbers.", + "parameters": {"type": "object"}, + "strict": false, + "defer_loading": true + }] + }] + } + ], + "tools": [{ + "type": "tool_search", + "execution": "client" + }] + })) + .unwrap(); + + assert!(payload.has_tool_search_promotions().unwrap()); + let upstream = serde_json::to_value(payload.to_upstream_request(false).unwrap()).unwrap(); + + assert_eq!(upstream["tools"].as_array().map(Vec::len), Some(2)); + assert_eq!(upstream["tools"][0]["type"], "tool_search"); + assert_eq!(upstream["tools"][1]["type"], "function"); + assert_eq!(upstream["tools"][1]["name"], "add_numbers"); + assert_eq!(upstream["tools"][1]["description"], "Add numbers."); + assert!(upstream["tools"][1].get("defer_loading").is_none()); + assert_eq!(upstream["input"][1]["type"], "tool_search_output"); + assert_eq!(upstream["input"][1]["tools"][0]["name"], "mcp__fixture"); + } + + #[test] + fn to_upstream_request_promotes_a_top_level_client_loaded_function() { + let payload: RequestPayload = serde_json::from_value(serde_json::json!({ + "model": "test", + "input": [ + { + "type": "tool_search_call", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "arguments": {"query": "add_numbers"} + }, + { + "type": "tool_search_output", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "tools": [{ + "type": "function", + "name": "add_numbers", + "description": "Add numbers.", + "parameters": {"type": "object"}, + "strict": false, + "defer_loading": true + }] + } + ], + "tools": [{"type": "tool_search", "execution": "client"}] + })) + .unwrap(); + + assert!(payload.has_tool_search_promotions().unwrap()); + let upstream = serde_json::to_value(payload.to_upstream_request(false).unwrap()).unwrap(); + + assert_eq!(upstream["tools"].as_array().map(Vec::len), Some(2)); + assert_eq!(upstream["tools"][0]["type"], "tool_search"); + assert_eq!(upstream["tools"][1]["type"], "function"); + assert_eq!(upstream["tools"][1]["name"], "add_numbers"); + assert_eq!(upstream["tools"][1]["description"], "Add numbers."); + assert!(upstream["tools"][1].get("defer_loading").is_none()); + } + + #[test] + fn to_upstream_request_promotes_valid_stateless_continuation_without_current_tools() { + let payload: RequestPayload = serde_json::from_value(serde_json::json!({ + "model": "test", + "input": [ + { + "type": "tool_search_call", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "arguments": {"query": "continuation tools"} + }, + { + "type": "tool_search_output", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "tools": [ + {"type": "function", "name": "direct_lookup", "defer_loading": true}, + { + "type": "namespace", + "name": "mcp__fixture", + "tools": [{ + "type": "function", + "name": "namespaced_lookup", + "defer_loading": true + }] + } + ] + } + ] + })) + .unwrap(); + + assert!(payload.has_tool_search_promotions().unwrap()); + let upstream = serde_json::to_value(payload.to_upstream_request(false).unwrap()).unwrap(); + let tools = upstream["tools"].as_array().expect("promoted tools"); + + assert_eq!(tools.len(), 2); + assert_eq!(tools[0]["name"], "direct_lookup"); + assert_eq!(tools[1]["name"], "namespaced_lookup"); + assert!(tools.iter().all(|tool| tool["type"] == "function")); + assert!(tools.iter().all(|tool| tool.get("defer_loading").is_none())); + assert_eq!(upstream["input"][1]["type"], "tool_search_output"); + } + + #[test] + fn to_upstream_request_does_not_override_a_declared_function_with_a_loaded_one() { + let payload: RequestPayload = serde_json::from_value(serde_json::json!({ + "model": "test", + "input": [{ + "type": "tool_search_call", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "arguments": {"query": "echo_text"} + }, { + "type": "tool_search_output", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "tools": [{ + "type": "namespace", + "name": "mcp__fixture", + "tools": [{ + "type": "function", + "name": "echo_text", + "description": "Loaded description." + }] + }] + }], + "tools": [ + { + "type": "function", + "name": "echo_text", + "description": "Declared description." + }, + { + "type": "tool_search", + "execution": "client" + } + ] + })) + .unwrap(); + + assert!(!payload.has_tool_search_promotions().unwrap()); + let upstream = serde_json::to_value(payload.to_upstream_request(false).unwrap()).unwrap(); + + assert_eq!(upstream["tools"].as_array().map(Vec::len), Some(2)); + assert_eq!(upstream["tools"][0]["name"], "echo_text"); + assert_eq!(upstream["tools"][0]["description"], "Declared description."); + assert_eq!(upstream["tools"][1]["type"], "tool_search"); + } + #[test] fn responses_input_discards_unknown_items_when_converted_for_storage() { let input: ResponsesInput = serde_json::from_value(serde_json::json!([ diff --git a/crates/agentic-server-core/src/types/tools/mod.rs b/crates/agentic-server-core/src/types/tools/mod.rs index acf36880..7e5c25a0 100644 --- a/crates/agentic-server-core/src/types/tools/mod.rs +++ b/crates/agentic-server-core/src/types/tools/mod.rs @@ -8,5 +8,6 @@ pub mod params; pub use params::{ CodeInterpreterToolParam, CodexNamespaceMember, CodexNamespaceToolParam, CustomToolParam, EmptyToolNameError, FileSearchToolParam, FunctionToolParam, McpDiscoveredToolParam, McpToolParam, NonEmptyToolName, ResponsesTool, - WebSearchContextSize, WebSearchFilters, WebSearchToolParam, WebSearchUserLocation, + ToolSearchExecution, ToolSearchToolParam, WebSearchContextSize, WebSearchFilters, WebSearchToolParam, + WebSearchUserLocation, }; diff --git a/crates/agentic-server-core/src/types/tools/params.rs b/crates/agentic-server-core/src/types/tools/params.rs index f2878f9b..75e63356 100644 --- a/crates/agentic-server-core/src/types/tools/params.rs +++ b/crates/agentic-server-core/src/types/tools/params.rs @@ -99,6 +99,10 @@ pub enum ResponsesTool { /// text in `custom_tool_call.input` rather than JSON arguments. #[serde(rename = "custom")] Custom(CustomToolParam), + /// Dynamically discovers deferred tool definitions. Client-executed search + /// is performed by the caller (for example, Codex), not by the gateway. + #[serde(rename = "tool_search")] + ToolSearch(ToolSearchToolParam), #[serde(rename = "unknown", other)] Unknown, } @@ -143,6 +147,31 @@ pub struct CustomToolParam { pub extra: HashMap, } +/// Where a tool search is executed. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum ToolSearchExecution { + Client, + Server, +} + +/// Parameters for a `type: "tool_search"` declaration. +/// +/// Hosted search omits `execution`, `description`, and `parameters`. Client +/// search supplies those fields so the caller controls discovery semantics. +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ToolSearchToolParam { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub execution: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub parameters: Option, + #[serde(default)] + #[serde(flatten)] + pub extra: HashMap, +} + /// Parameters for a gateway MCP built-in tool declaration. #[derive(Debug, Clone, Serialize, Deserialize)] pub struct McpToolParam { @@ -247,6 +276,7 @@ impl ResponsesTool { Self::CodeInterpreter(_) => Some("code_interpreter"), Self::Namespace(_) => Some("namespace"), Self::Custom(_) => Some("custom"), + Self::ToolSearch(_) => Some("tool_search"), Self::Unknown => None, } } @@ -438,4 +468,38 @@ mod tests { assert_eq!(serialized["format"]["syntax"], "lark"); assert_eq!(serialized["format"]["future_option"], true); } + + #[test] + fn client_tool_search_shape_round_trips_and_preserves_extensions() { + let expected = serde_json::json!({ + "type": "tool_search", + "execution": "client", + "description": "Find tools needed for the task.", + "parameters": { + "type": "object", + "properties": {"goal": {"type": "string"}}, + "required": ["goal"] + }, + "x-provider-field": {"version": 2} + }); + + let tool: ResponsesTool = serde_json::from_value(expected.clone()).unwrap(); + let ResponsesTool::ToolSearch(search) = &tool else { + panic!("expected tool_search declaration"); + }; + assert_eq!(search.execution, Some(ToolSearchExecution::Client)); + assert_eq!(tool.original_type(), Some("tool_search")); + assert_eq!(serde_json::to_value(tool).unwrap(), expected); + } + + #[test] + fn hosted_tool_search_allows_bare_declaration() { + let expected = serde_json::json!({"type": "tool_search"}); + let tool: ResponsesTool = serde_json::from_value(expected.clone()).unwrap(); + let ResponsesTool::ToolSearch(search) = &tool else { + panic!("expected tool_search declaration"); + }; + assert_eq!(search.execution, None); + assert_eq!(serde_json::to_value(tool).unwrap(), expected); + } } diff --git a/crates/agentic-server-core/tests/support/mod.rs b/crates/agentic-server-core/tests/support/mod.rs index 6167ab46..d3b3b1ad 100644 --- a/crates/agentic-server-core/tests/support/mod.rs +++ b/crates/agentic-server-core/tests/support/mod.rs @@ -418,6 +418,8 @@ pub fn output_text(payload: &ResponsePayload) -> String { OutputItem::Message(msg) => Some(msg.content.iter().map(|c| c.text.as_str()).collect::()), OutputItem::FunctionCall(_) | OutputItem::CustomToolCall(_) + | OutputItem::ToolSearchCall(_) + | OutputItem::ToolSearchOutput(_) | OutputItem::WebSearchCall(_) | OutputItem::McpToolCall(_) | OutputItem::Reasoning(_) diff --git a/crates/agentic-server/src/handler/http/responses.rs b/crates/agentic-server/src/handler/http/responses.rs index 4e129cf1..9a136a18 100644 --- a/crates/agentic-server/src/handler/http/responses.rs +++ b/crates/agentic-server/src/handler/http/responses.rs @@ -44,6 +44,13 @@ fn has_gateway_tools(payload: &RequestPayload) -> bool { .is_some_and(|tools| tools.iter().any(|tool| !matches!(tool, ResponsesTool::Function(_)))) } +fn has_tool_search_promotions(payload: &RequestPayload) -> bool { + payload.has_tool_search_promotions().unwrap_or_else(|error| { + debug!(%error, "routing request with invalid tool declarations through executor"); + true + }) +} + pub async fn responses(State(state): State, req: Request) -> Response { let (parts, body) = req.into_parts(); let (bytes, payload) = match read_and_parse(body).await { @@ -51,16 +58,21 @@ pub async fn responses(State(state): State, req: Request) -> Response Err(e) => return e, }; - let should_execute = payload.store + let has_gateway_tools = has_gateway_tools(&payload); + let already_requires_executor = payload.store || payload.previous_response_id.is_some() || payload.conversation_id.is_some() - || has_gateway_tools(&payload); + || has_gateway_tools; + let has_tool_search_promotions = !already_requires_executor && has_tool_search_promotions(&payload); + let should_execute = already_requires_executor || has_tool_search_promotions; debug!( route = if should_execute { "executor" } else { "proxy" }, store = payload.store, stream = payload.stream, has_previous_response_id = payload.previous_response_id.is_some(), has_conversation_id = payload.conversation_id.is_some(), + has_gateway_tools, + has_tool_search_promotions, tools = payload.tools.as_ref().map_or(0, Vec::len), "routing HTTP responses request" ); diff --git a/crates/agentic-server/tests/responses_test.rs b/crates/agentic-server/tests/responses_test.rs index cd78fa10..d85a5cf9 100644 --- a/crates/agentic-server/tests/responses_test.rs +++ b/crates/agentic-server/tests/responses_test.rs @@ -132,6 +132,184 @@ async fn test_store_false_with_web_search_reaches_executor() { assert_eq!(requests[0]["tools"][0]["name"], "web_search"); } +#[tokio::test] +async fn test_store_false_tool_search_history_without_tools_reaches_executor() { + let (llm_url, requests, _h1) = spawn_mock_vllm_json_capture().await; + let (gw_url, _h2) = spawn_gateway(test_state(&test_config(&llm_url))).await; + + let resp = reqwest::Client::new() + .post(format!("{gw_url}/v1/responses")) + .json(&serde_json::json!({ + "model": "test", + "input": [ + { + "type": "tool_search_call", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "arguments": {"query": "echo"} + }, + { + "type": "tool_search_output", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "tools": [{ + "type": "function", + "name": "echo", + "defer_loading": true, + "parameters": {"type": "object"} + }] + } + ], + "store": false, + "stream": false + })) + .send() + .await + .unwrap(); + + assert_eq!(resp.status(), 200); + let body: serde_json::Value = resp.json().await.unwrap(); + assert!(body["id"].as_str().unwrap_or("").starts_with("resp_")); + + let requests = requests.lock().await; + assert_eq!(requests.len(), 1); + assert_eq!(requests[0]["input"][0]["type"], "tool_search_call"); + assert_eq!(requests[0]["input"][1]["type"], "tool_search_output"); + assert_eq!(requests[0]["tools"][0]["type"], "function"); + assert_eq!(requests[0]["tools"][0]["name"], "echo"); + assert!(requests[0]["tools"][0].get("defer_loading").is_none()); + assert!(!requests[0].to_string().contains("_agentic_item_kind")); +} + +fn tool_search_history( + execution: Option<&str>, + status: Option<&str>, + call_id: &str, + output_call_id: &str, + tools: &serde_json::Value, +) -> serde_json::Value { + let mut call = serde_json::json!({ + "type": "tool_search_call", + "call_id": call_id, + "arguments": {"query": "echo"} + }); + let mut output = serde_json::json!({ + "type": "tool_search_output", + "call_id": output_call_id, + "tools": tools + }); + for item in [&mut call, &mut output] { + if let Some(execution) = execution { + item["execution"] = serde_json::Value::String(execution.to_owned()); + } + if let Some(status) = status { + item["status"] = serde_json::Value::String(status.to_owned()); + } + } + serde_json::json!([call, output]) +} + +fn nonpromotable_tool_search_histories() -> [(&'static str, serde_json::Value); 7] { + let function = || serde_json::json!([{"type": "function", "name": "echo"}]); + [ + ( + "incomplete", + tool_search_history( + Some("client"), + Some("incomplete"), + "call_search", + "call_search", + &function(), + ), + ), + ( + "optional fields omitted", + tool_search_history(None, None, "call_search", "call_search", &function()), + ), + ( + "server execution", + tool_search_history( + Some("server"), + Some("completed"), + "call_search", + "call_search", + &function(), + ), + ), + ( + "unmatched output", + tool_search_history(Some("client"), Some("completed"), "call_one", "call_two", &function()), + ), + ( + "output only", + serde_json::json!([{ + "type": "tool_search_output", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "tools": function() + }]), + ), + ( + "no loaded functions", + tool_search_history( + Some("client"), + Some("completed"), + "call_search", + "call_search", + &serde_json::json!([]), + ), + ), + ( + "ambiguous namespace members", + tool_search_history( + Some("client"), + Some("completed"), + "call_search", + "call_search", + &serde_json::json!([ + {"type": "namespace", "name": "one", "tools": function()}, + {"type": "namespace", "name": "two", "tools": function()} + ]), + ), + ), + ] +} + +#[tokio::test] +async fn test_store_false_nonpromotable_tool_search_history_stays_on_transparent_proxy() { + let (llm_url, requests, _h1) = spawn_mock_vllm_json_capture().await; + let (gw_url, _h2) = spawn_gateway(test_state(&test_config(&llm_url))).await; + let cases = nonpromotable_tool_search_histories(); + let client = reqwest::Client::new(); + let mut expected_requests = Vec::with_capacity(cases.len()); + + for (label, input) in cases { + let payload = serde_json::json!({ + "model": "test", + "input": input, + "store": false, + "stream": false + }); + let resp = client + .post(format!("{gw_url}/v1/responses")) + .json(&payload) + .send() + .await + .unwrap(); + + assert_eq!(resp.status(), 200, "{label}"); + let body: serde_json::Value = resp.json().await.unwrap(); + assert_eq!(body["id"], "mock_id", "{label} should stay on proxy path"); + expected_requests.push(payload); + } + + let requests = requests.lock().await; + assert_eq!(*requests, expected_requests, "proxy must preserve each wire payload"); +} + #[tokio::test] async fn test_gateway_normalization_preserves_parallel_tool_calls() { // Arrange From c12d3107e65bd12446fb23114c826f0154c45e66 Mon Sep 17 00:00:00 2001 From: haoshan98 Date: Tue, 28 Jul 2026 07:22:53 +0000 Subject: [PATCH 2/9] Keep request fields Signed-off-by: haoshan98 --- .../benches/executor_throughput.rs | 4 + .../src/executor/modes/conversation.rs | 5 + .../src/executor/modes/response.rs | 5 + .../src/types/request_response.rs | 140 +++++++++++++++++- .../tests/dispatch_loop_cassette_test.rs | 33 +++++ .../agentic-server-core/tests/support/mod.rs | 4 + .../tests/web_search_tool_test.rs | 86 ++++++----- .../src/handler/websocket/responses.rs | 11 +- .../tests/responses_websocket_test.rs | 10 +- 9 files changed, 255 insertions(+), 43 deletions(-) diff --git a/crates/agentic-server-core/benches/executor_throughput.rs b/crates/agentic-server-core/benches/executor_throughput.rs index 7c3803f2..2ad08ff8 100644 --- a/crates/agentic-server-core/benches/executor_throughput.rs +++ b/crates/agentic-server-core/benches/executor_throughput.rs @@ -28,6 +28,7 @@ //! cargo bench --bench executor_throughput -- --sample-size=20 //! ``` +use std::collections::HashMap; use std::sync::{Arc, Mutex}; use axum::Router; @@ -147,6 +148,9 @@ fn make_request(input: &str, stream: bool, prev_id: Option) -> RequestPa metadata: None, parallel_tool_calls: None, cache_salt: None, + reasoning: None, + prompt_cache_key: None, + extra: HashMap::new(), } } diff --git a/crates/agentic-server-core/src/executor/modes/conversation.rs b/crates/agentic-server-core/src/executor/modes/conversation.rs index 3229bd29..3a33d94d 100644 --- a/crates/agentic-server-core/src/executor/modes/conversation.rs +++ b/crates/agentic-server-core/src/executor/modes/conversation.rs @@ -116,6 +116,8 @@ impl ConversationHandler { #[cfg(test)] mod tests { + use std::collections::HashMap; + use super::*; use crate::types::io::ResponsesInput; use crate::types::request_response::RequestPayload; @@ -143,6 +145,9 @@ mod tests { metadata: None, parallel_tool_calls: None, cache_salt: None, + reasoning: None, + prompt_cache_key: None, + extra: HashMap::new(), }; RequestContext { enriched_request: req.clone(), diff --git a/crates/agentic-server-core/src/executor/modes/response.rs b/crates/agentic-server-core/src/executor/modes/response.rs index ae771a47..0e649a51 100644 --- a/crates/agentic-server-core/src/executor/modes/response.rs +++ b/crates/agentic-server-core/src/executor/modes/response.rs @@ -95,6 +95,8 @@ impl ResponseHandler { #[cfg(test)] mod tests { + use std::collections::HashMap; + use super::*; use crate::types::io::ResponsesInput; use crate::types::request_response::RequestPayload; @@ -122,6 +124,9 @@ mod tests { metadata: None, parallel_tool_calls: None, cache_salt: None, + reasoning: None, + prompt_cache_key: None, + extra: HashMap::new(), }; RequestContext { enriched_request: req.clone(), diff --git a/crates/agentic-server-core/src/types/request_response.rs b/crates/agentic-server-core/src/types/request_response.rs index d17f56df..706bc967 100644 --- a/crates/agentic-server-core/src/types/request_response.rs +++ b/crates/agentic-server-core/src/types/request_response.rs @@ -1,5 +1,6 @@ -use std::collections::HashSet; +use std::collections::{HashMap, HashSet}; +use serde::ser::SerializeMap; use serde::{Deserialize, Serialize}; use serde_json::{Value, json}; @@ -32,7 +33,18 @@ pub struct RequestPayload { pub metadata: Option, pub parallel_tool_calls: Option, #[serde(default, skip_serializing_if = "Option::is_none")] + pub reasoning: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub prompt_cache_key: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] pub cache_salt: Option, + /// Top-level Responses fields not yet modeled by the gateway. + /// + /// Preserving them keeps the typed executor forward-compatible with newer + /// clients while modeled fields remain authoritative during forwarding. + #[serde(default)] + #[serde(flatten)] + pub extra: HashMap, } fn default_true() -> bool { @@ -68,7 +80,36 @@ pub struct UpstreamRequest<'a> { pub metadata: Option<&'a Value>, #[serde(skip_serializing_if = "Option::is_none")] pub parallel_tool_calls: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub reasoning: Option<&'a Value>, + #[serde(skip_serializing_if = "Option::is_none")] + pub prompt_cache_key: Option<&'a str>, pub cache_salt: Option<&'a str>, + #[serde(flatten)] + extra: FilteredRequestFields<'a>, +} + +/// Borrowed view of unmodeled Responses request fields that omits keys owned +/// by [`UpstreamRequest`]. +/// +/// The custom map serializer avoids cloning potentially large JSON values on +/// every inference round while keeping modeled fields authoritative. +#[derive(Debug)] +struct FilteredRequestFields<'a>(&'a HashMap); + +impl Serialize for FilteredRequestFields<'_> { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + let mut map = serializer.serialize_map(None)?; + for (field, value) in self.0 { + if !is_modeled_request_field(field) { + map.serialize_entry(field, value)?; + } + } + map.end() + } } /// A tool declaration supported by the upstream Responses endpoint. @@ -180,7 +221,10 @@ impl RequestPayload { truncation: self.truncation.as_deref(), metadata: self.metadata.as_ref(), parallel_tool_calls, + reasoning: self.reasoning.as_ref(), + prompt_cache_key: self.prompt_cache_key.as_deref(), cache_salt: self.cache_salt.as_deref(), + extra: FilteredRequestFields(&self.extra), }) } @@ -211,6 +255,31 @@ impl RequestPayload { } } +fn is_modeled_request_field(field: &str) -> bool { + matches!( + field, + "model" + | "input" + | "instructions" + | "previous_response_id" + | "conversation_id" + | "tools" + | "tool_choice" + | "stream" + | "store" + | "include" + | "temperature" + | "top_p" + | "max_output_tokens" + | "truncation" + | "metadata" + | "parallel_tool_calls" + | "reasoning" + | "prompt_cache_key" + | "cache_salt" + ) +} + fn promote_loaded_function_tools(input: &ResponsesInput, tools: &mut Vec) -> bool { let mut declared_names = tools .iter() @@ -352,6 +421,75 @@ mod tests { assert_eq!(upstream["cache_salt"], "tenant-a"); } + #[test] + fn request_payload_forwards_codex_and_unknown_fields_upstream() { + let payload: RequestPayload = serde_json::from_value(serde_json::json!({ + "model": "test-model", + "input": "find a tool", + "tools": [{"type": "tool_search", "execution": "client"}], + "reasoning": {"effort": "low", "summary": "auto"}, + "prompt_cache_key": "codex-session-42", + "x-codex-sentinel": {"preserved": true} + })) + .expect("request should deserialize"); + + assert_eq!( + payload.reasoning.as_ref().and_then(|value| value["effort"].as_str()), + Some("low") + ); + assert_eq!(payload.prompt_cache_key.as_deref(), Some("codex-session-42")); + assert_eq!(payload.extra["x-codex-sentinel"]["preserved"], true); + + let upstream = serde_json::to_value(payload.to_upstream_request(false).expect("request should normalize")) + .expect("upstream request should serialize"); + + assert_eq!(upstream["reasoning"]["effort"], "low"); + assert_eq!(upstream["reasoning"]["summary"], "auto"); + assert_eq!(upstream["prompt_cache_key"], "codex-session-42"); + assert_eq!(upstream["x-codex-sentinel"]["preserved"], true); + } + + #[test] + fn modeled_request_fields_cannot_be_shadowed_by_extra_fields() { + let mut payload: RequestPayload = serde_json::from_value(serde_json::json!({ + "model": "authoritative-model", + "input": "hello", + "reasoning": {"effort": "low"}, + "prompt_cache_key": "authoritative-cache-key" + })) + .expect("request should deserialize"); + payload + .extra + .insert("model".to_owned(), serde_json::json!("shadow-model")); + payload + .extra + .insert("input".to_owned(), serde_json::json!("shadow-input")); + payload.extra.insert("stream".to_owned(), serde_json::json!(true)); + payload + .extra + .insert("reasoning".to_owned(), serde_json::json!({"effort": "high"})); + payload + .extra + .insert("prompt_cache_key".to_owned(), serde_json::json!("shadow-cache-key")); + + let encoded = serde_json::to_string(&payload.to_upstream_request(false).expect("request should normalize")) + .expect("upstream request should serialize"); + let upstream: Value = serde_json::from_str(&encoded).expect("upstream request should be valid JSON"); + + assert_eq!(upstream["model"], "authoritative-model"); + assert_eq!(upstream["input"], "hello"); + assert_eq!(upstream["stream"], false); + assert_eq!(upstream["reasoning"]["effort"], "low"); + assert_eq!(upstream["prompt_cache_key"], "authoritative-cache-key"); + for field in ["model", "input", "stream", "reasoning", "prompt_cache_key"] { + assert_eq!( + encoded.matches(&format!("\"{field}\":")).count(), + 1, + "{field} should be serialized exactly once" + ); + } + } + #[test] fn request_payload_uses_option_tool_choice_for_missing_vs_explicit() { let absent: RequestPayload = serde_json::from_value(serde_json::json!({ diff --git a/crates/agentic-server-core/tests/dispatch_loop_cassette_test.rs b/crates/agentic-server-core/tests/dispatch_loop_cassette_test.rs index 772a4649..583db307 100644 --- a/crates/agentic-server-core/tests/dispatch_loop_cassette_test.rs +++ b/crates/agentic-server-core/tests/dispatch_loop_cassette_test.rs @@ -12,6 +12,7 @@ //! feedback, the round-cap `incomplete` path) live in `web_search_tool_test.rs`; //! this file focuses on coverage against recorded `OpenAI` wire bodies. +use std::collections::HashMap; use std::sync::Arc; use agentic_core::executor::{ConversationHandler, ExecuteRequest, ExecutionContext, ResponseHandler}; @@ -129,6 +130,9 @@ fn request(text: &str, tools: Option>) -> RequestPayload { metadata: None, parallel_tool_calls: None, cache_salt: None, + reasoning: None, + prompt_cache_key: None, + extra: HashMap::new(), } } @@ -142,6 +146,35 @@ fn function_call_names(output: &[OutputItem]) -> Vec<&str> { .collect() } +#[tokio::test] +async fn codex_request_fields_pass_through_typed_executor() { + let llm = support::MockServer::start_deque(vec![support::text_response("done")]).await; + let exec_ctx = build_exec_ctx(llm.url()).await; + let payload: RequestPayload = serde_json::from_value(serde_json::json!({ + "model": "test-model", + "input": "find a tool", + "tools": [{"type": "tool_search", "execution": "client"}], + "reasoning": {"effort": "low", "summary": "auto"}, + "prompt_cache_key": "codex-session-42", + "x-codex-sentinel": {"preserved": true} + })) + .expect("Codex request should deserialize"); + + let result = ExecuteRequest::new(payload, exec_ctx) + .run() + .await + .expect("executor should complete"); + assert!(matches!(result, Either::Left(_))); + + let requests = llm.request_bodies().await; + assert_eq!(requests.len(), 1); + let upstream = &requests[0]; + assert_eq!(upstream["reasoning"]["effort"], "low"); + assert_eq!(upstream["reasoning"]["summary"], "auto"); + assert_eq!(upstream["prompt_cache_key"], "codex-session-42"); + assert_eq!(upstream["x-codex-sentinel"]["preserved"], true); +} + /// `OpenAI` cassette, turn 1 emits a single client-owned `get_job_status` /// function call. With no gateway executor registered, the loop must classify /// this as `RequiresClientAction`: exactly one model call, the call handed back diff --git a/crates/agentic-server-core/tests/support/mod.rs b/crates/agentic-server-core/tests/support/mod.rs index d3b3b1ad..ac37d45f 100644 --- a/crates/agentic-server-core/tests/support/mod.rs +++ b/crates/agentic-server-core/tests/support/mod.rs @@ -7,6 +7,7 @@ #![allow(dead_code)] +use std::collections::HashMap; use std::sync::Arc; use axum::Router; @@ -371,6 +372,9 @@ pub fn make_request( metadata: None, parallel_tool_calls: None, cache_salt: None, + reasoning: None, + prompt_cache_key: None, + extra: HashMap::new(), } } diff --git a/crates/agentic-server-core/tests/web_search_tool_test.rs b/crates/agentic-server-core/tests/web_search_tool_test.rs index e57b8c36..c0ef8d77 100644 --- a/crates/agentic-server-core/tests/web_search_tool_test.rs +++ b/crates/agentic-server-core/tests/web_search_tool_test.rs @@ -1,3 +1,4 @@ +use std::collections::HashMap; use std::sync::{ Arc, atomic::{AtomicUsize, Ordering}, @@ -586,6 +587,9 @@ async fn execute_runs_web_search_and_sends_tool_output_back_to_model() { metadata: None, parallel_tool_calls: None, cache_salt: None, + reasoning: None, + prompt_cache_key: None, + extra: HashMap::new(), }; let result = ExecuteRequest::new(payload, Arc::clone(&exec_ctx)).run().await.unwrap(); @@ -671,6 +675,9 @@ async fn execute_relaxes_forced_tool_choice_after_web_search_result() { metadata: None, parallel_tool_calls: None, cache_salt: None, + reasoning: None, + prompt_cache_key: None, + extra: HashMap::new(), }; let result = ExecuteRequest::new(payload, Arc::clone(&exec_ctx)).run().await.unwrap(); @@ -702,25 +709,9 @@ async fn execute_returns_mixed_client_tool_calls_without_followup_model_request( } })) .unwrap(); - let payload = RequestPayload { - model: "test-model".to_owned(), - input: ResponsesInput::Text("look up rust async and weather".to_owned()), - instructions: None, - previous_response_id: None, - conversation_id: None, - tools: Some(vec![web_search, client_function]), - tool_choice: None, - stream: false, - store: true, - include: None, - temperature: None, - top_p: None, - max_output_tokens: Some(1024), - truncation: None, - metadata: None, - parallel_tool_calls: None, - cache_salt: None, - }; + let mut payload = support::make_request("look up rust async and weather", true, false, None, None); + payload.tools = Some(vec![web_search, client_function]); + payload.max_output_tokens = Some(1024); let result = ExecuteRequest::new(payload, Arc::clone(&exec_ctx)).run().await.unwrap(); let Either::Left(response) = result else { @@ -750,25 +741,8 @@ async fn execute_returns_mixed_client_tool_calls_without_followup_model_request( .collect(); assert_eq!(function_names, ["get_weather"]); - let continuation_payload = RequestPayload { - model: "test-model".to_owned(), - input: ResponsesInput::Text("continue".to_owned()), - instructions: None, - previous_response_id: Some(response.id), - conversation_id: None, - tools: None, - tool_choice: None, - stream: false, - store: true, - include: None, - temperature: None, - top_p: None, - max_output_tokens: Some(1024), - truncation: None, - metadata: None, - parallel_tool_calls: None, - cache_salt: None, - }; + let mut continuation_payload = support::make_request("continue", true, false, Some(response.id), None); + continuation_payload.max_output_tokens = Some(1024); let continuation = ExecuteRequest::new(continuation_payload, exec_ctx).run().await.unwrap(); assert!(matches!(continuation, Either::Left(_))); let request_bodies = llm.request_bodies().await; @@ -839,6 +813,9 @@ async fn execute_accumulates_usage_across_web_search_model_rounds() { metadata: None, parallel_tool_calls: None, cache_salt: None, + reasoning: None, + prompt_cache_key: None, + extra: HashMap::new(), }; let result = ExecuteRequest::new(payload, exec_ctx).run().await.unwrap(); @@ -883,6 +860,9 @@ async fn stream_emits_web_search_lifecycle_events_before_final_payload() { metadata: None, parallel_tool_calls: None, cache_salt: None, + reasoning: None, + prompt_cache_key: None, + extra: HashMap::new(), }; let result = ExecuteRequest::new(payload, Arc::clone(&exec_ctx)).run().await.unwrap(); @@ -966,6 +946,9 @@ async fn stream_hides_web_search_function_events_when_name_arrives_on_done() { metadata: None, parallel_tool_calls: None, cache_salt: None, + reasoning: None, + prompt_cache_key: None, + extra: HashMap::new(), }; let result = ExecuteRequest::new(payload, Arc::clone(&exec_ctx)).run().await.unwrap(); @@ -1033,6 +1016,9 @@ async fn execute_runs_multiple_web_search_calls_concurrently() { metadata: None, parallel_tool_calls: None, cache_salt: None, + reasoning: None, + prompt_cache_key: None, + extra: HashMap::new(), }; let result = tokio::time::timeout(Duration::from_secs(2), ExecuteRequest::new(payload, exec_ctx).run()) @@ -1082,6 +1068,9 @@ async fn execute_feeds_web_search_execution_errors_back_to_model() { metadata: None, parallel_tool_calls: None, cache_salt: None, + reasoning: None, + prompt_cache_key: None, + extra: HashMap::new(), }; let result = ExecuteRequest::new(payload, exec_ctx).run().await.unwrap(); @@ -1133,6 +1122,9 @@ async fn execute_returns_incomplete_after_max_gateway_tool_rounds() { metadata: None, parallel_tool_calls: None, cache_salt: None, + reasoning: None, + prompt_cache_key: None, + extra: HashMap::new(), }; // Budget exhausted while the model keeps requesting tools → the response is @@ -1184,6 +1176,9 @@ async fn execute_feeds_invalid_web_search_arguments_back_to_model() { metadata: None, parallel_tool_calls: None, cache_salt: None, + reasoning: None, + prompt_cache_key: None, + extra: HashMap::new(), }; let result = ExecuteRequest::new(payload, exec_ctx).run().await.unwrap(); @@ -1242,6 +1237,9 @@ async fn execute_runs_large_gateway_fanout_without_hard_cap() { metadata: None, parallel_tool_calls: None, cache_salt: None, + reasoning: None, + prompt_cache_key: None, + extra: HashMap::new(), }; let result = ExecuteRequest::new(payload, exec_ctx) @@ -1306,6 +1304,9 @@ async fn stream_error_events_escape_error_messages() { metadata: None, parallel_tool_calls: None, cache_salt: None, + reasoning: None, + prompt_cache_key: None, + extra: HashMap::new(), }; let result = ExecuteRequest::new(payload, exec_ctx).run().await.unwrap(); @@ -1382,6 +1383,9 @@ async fn incomplete_turn_persists_a_consistent_conversation_for_continuation() { metadata: None, parallel_tool_calls: None, cache_salt: None, + reasoning: None, + prompt_cache_key: None, + extra: HashMap::new(), }; let result = ExecuteRequest::new(payload, Arc::clone(&exec_ctx)).run().await.unwrap(); @@ -1409,6 +1413,9 @@ async fn incomplete_turn_persists_a_consistent_conversation_for_continuation() { metadata: None, parallel_tool_calls: None, cache_salt: None, + reasoning: None, + prompt_cache_key: None, + extra: HashMap::new(), }; let _ = ExecuteRequest::new(continuation_payload, exec_ctx).run().await.unwrap(); @@ -1480,6 +1487,9 @@ async fn stream_returns_incomplete_after_max_gateway_tool_rounds() { metadata: None, parallel_tool_calls: None, cache_salt: None, + reasoning: None, + prompt_cache_key: None, + extra: HashMap::new(), }; let result = ExecuteRequest::new(payload, exec_ctx).run().await.unwrap(); diff --git a/crates/agentic-server/src/handler/websocket/responses.rs b/crates/agentic-server/src/handler/websocket/responses.rs index cf46efe8..681eea81 100644 --- a/crates/agentic-server/src/handler/websocket/responses.rs +++ b/crates/agentic-server/src/handler/websocket/responses.rs @@ -15,7 +15,7 @@ use tracing::{debug, warn}; use agentic_core::ResponseUsage; use agentic_core::executor::{BoxStream, ExecuteRequest, ExecutorError, RequestContext, rehydrate_conversation}; use agentic_core::types::request_response::RequestPayload; -use agentic_core::utils::common::utcnow_str; +use agentic_core::utils::common::{deserialize_from_str, deserialize_from_value, utcnow_str}; use super::super::common::{MAX_BODY_SIZE, extract_bearer}; use super::error::WsError; @@ -119,14 +119,19 @@ async fn handle_ws_text( shutdown_token: &CancellationToken, queue: &mut VecDeque, ) -> Result<(), WsError> { - let value = serde_json::from_str::(text).map_err(WsError::InvalidJson)?; + let value = deserialize_from_str::(text).map_err(WsError::InvalidJson)?; if value.get("type").and_then(Value::as_str) != Some("response.create") { return Err(WsError::UnexpectedType); } let generate = value.get("generate").and_then(Value::as_bool); - let mut payload = serde_json::from_value::(value).map_err(ExecutorError::from)?; + let Value::Object(mut request) = value else { + return Err(WsError::UnexpectedType); + }; + request.remove("type"); + request.remove("generate"); + let mut payload = deserialize_from_value::(Value::Object(request)).map_err(ExecutorError::from)?; let requested_stream = payload.stream; let requested_store = payload.store; payload.stream = true; diff --git a/crates/agentic-server/tests/responses_websocket_test.rs b/crates/agentic-server/tests/responses_websocket_test.rs index e0f6fffe..d1a8918c 100644 --- a/crates/agentic-server/tests/responses_websocket_test.rs +++ b/crates/agentic-server/tests/responses_websocket_test.rs @@ -617,7 +617,11 @@ async fn test_websocket_first_turn_forwards_incremental_events_and_final_payload "model": "test-model", "input": [{"type": "message", "role": "user", "content": "hi"}], "store": true, - "stream": true + "stream": true, + "generate": true, + "reasoning": {"effort": "low"}, + "prompt_cache_key": "ws-cache-key", + "x-future-responses-field": {"preserved": true} }), ) .await; @@ -647,6 +651,10 @@ async fn test_websocket_first_turn_forwards_incremental_events_and_final_payload assert_eq!(requests[0]["stream"], true); assert_eq!(requests[0]["input"][0]["content"], "hi"); assert!(requests[0].get("type").is_none()); + assert!(requests[0].get("generate").is_none()); + assert_eq!(requests[0]["reasoning"]["effort"], "low"); + assert_eq!(requests[0]["prompt_cache_key"], "ws-cache-key"); + assert_eq!(requests[0]["x-future-responses-field"]["preserved"], true); } #[tokio::test] From 8295ebae2c370083a4d19f9a4239c57295a12c52 Mon Sep 17 00:00:00 2001 From: haoshan98 Date: Tue, 28 Jul 2026 07:23:36 +0000 Subject: [PATCH 3/9] Safety hints for fixture mcp tools Signed-off-by: haoshan98 --- scripts/codex-mcp-fixture-server.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/codex-mcp-fixture-server.py b/scripts/codex-mcp-fixture-server.py index 6e4e020a..3493b305 100755 --- a/scripts/codex-mcp-fixture-server.py +++ b/scripts/codex-mcp-fixture-server.py @@ -16,11 +16,17 @@ REPO_ROOT = Path(os.environ.get("AGENTIC_FIXTURE_ROOT", Path(__file__).resolve().parents[1])).resolve() SKIP_DIRS = {".git", "target", "__pycache__", "codex_captures"} MAX_READ_BYTES = 12_000 +READ_ONLY_TOOL_ANNOTATIONS = { + "readOnlyHint": True, + "destructiveHint": False, + "openWorldHint": False, +} TOOLS = [ { "name": "run", "description": "Echo a command string for agentic-api Codex namespace round-trip validation.", + "annotations": READ_ONLY_TOOL_ANNOTATIONS, "inputSchema": { "type": "object", "properties": { @@ -33,6 +39,7 @@ { "name": "echo_text", "description": "Echo text with basic metadata. Useful for proving a simple MCP function call worked.", + "annotations": READ_ONLY_TOOL_ANNOTATIONS, "inputSchema": { "type": "object", "properties": { @@ -46,6 +53,7 @@ { "name": "add_numbers", "description": "Add a list of numbers and return the total.", + "annotations": READ_ONLY_TOOL_ANNOTATIONS, "inputSchema": { "type": "object", "properties": { @@ -62,6 +70,7 @@ { "name": "make_slug", "description": "Turn text into a lowercase URL/file-name friendly slug.", + "annotations": READ_ONLY_TOOL_ANNOTATIONS, "inputSchema": { "type": "object", "properties": { @@ -75,6 +84,7 @@ { "name": "repo_file_head", "description": "Read the first lines of a repository file, limited to the agentic-api workspace.", + "annotations": READ_ONLY_TOOL_ANNOTATIONS, "inputSchema": { "type": "object", "properties": { @@ -88,6 +98,7 @@ { "name": "search_repo", "description": "Literal text search across repository files, returning a small capped result set.", + "annotations": READ_ONLY_TOOL_ANNOTATIONS, "inputSchema": { "type": "object", "properties": { From 933b741f3772a661385732a0dcbbf70bf0f32eb9 Mon Sep 17 00:00:00 2001 From: haoshan98 Date: Sun, 2 Aug 2026 08:57:33 +0000 Subject: [PATCH 4/9] Remain accumulator structure Signed-off-by: haoshan98 --- .../src/executor/accumulator.rs | 79 +++++-------------- 1 file changed, 20 insertions(+), 59 deletions(-) diff --git a/crates/agentic-server-core/src/executor/accumulator.rs b/crates/agentic-server-core/src/executor/accumulator.rs index e506f621..da1bf754 100644 --- a/crates/agentic-server-core/src/executor/accumulator.rs +++ b/crates/agentic-server-core/src/executor/accumulator.rs @@ -7,7 +7,6 @@ //! runs on a blocking thread while the async task continues reading from the //! network — keeping the tokio executor thread free between chunk arrivals. -use std::collections::HashMap; use std::pin::Pin; use std::sync::mpsc; @@ -86,15 +85,12 @@ pub struct ResponseAccumulator { response_id: String, conversation_id: Option, output: Vec, - /// Streaming output indexes parallel to `output`; sorted on finalization. - output_indices: Vec, usage: Option, status: ResponseStatus, incomplete_details: Option, error: Option, /// In-flight output items keyed by `item_id`, in insertion order. in_flight: IndexMap, - in_flight_indices: HashMap, } impl ResponseAccumulator { @@ -105,13 +101,11 @@ impl ResponseAccumulator { response_id, conversation_id, output: Vec::new(), - output_indices: Vec::new(), usage: None, status: ResponseStatus::InProgress, incomplete_details: None, error: None, in_flight: IndexMap::new(), - in_flight_indices: HashMap::new(), } } @@ -134,9 +128,6 @@ impl ResponseAccumulator { out }) .unwrap_or_default(); - let output_indices = (0..output.len()) - .map(|index| u32::try_from(index).unwrap_or(u32::MAX)) - .collect(); let status = json["status"] .as_str() @@ -150,13 +141,11 @@ impl ResponseAccumulator { response_id, conversation_id: conversation_id.map(str::to_string), output, - output_indices, usage, status, incomplete_details, error, in_flight: IndexMap::new(), - in_flight_indices: HashMap::new(), }) } @@ -226,14 +215,11 @@ impl ResponseAccumulator { acc } - /// Finalizes all in-flight items and restores upstream output-index order. + /// Finalizes all in-flight items in insertion order, appending them to completed output. pub(crate) fn finalize_all(&mut self) { - for (item_id, entry) in self.in_flight.drain(..) { - let output_index = self.in_flight_indices.remove(&item_id).unwrap_or(u32::MAX); - self.output_indices.push(output_index); - self.output.push(entry.finalize()); + for (_, item) in self.in_flight.drain(..) { + self.output.push(item.finalize()); } - self.sort_output_by_index(); } pub(crate) fn process_sse_line(&mut self, line: &str) { @@ -289,13 +275,12 @@ impl ResponseAccumulator { EventPayload::OutputItemDone { item_id, item_type: SSEItemType::CustomToolCall, - output_index, item, .. }, - ) => self.complete_custom_tool_call(item_id, *output_index, item), - (SSEEventType::OutputItemDone, EventPayload::OutputItemDone { output_index, item, .. }) => { - self.complete_non_delta_output_item(*output_index, item); + ) => self.complete_custom_tool_call(item_id, item), + (SSEEventType::OutputItemDone, EventPayload::OutputItemDone { item, .. }) => { + self.complete_non_delta_output_item(item); } (SSEEventType::ReasoningTextDelta, EventPayload::ReasoningDelta { delta, item_id }) => { if let Some(InFlight::Reasoning { text, .. }) = self.in_flight.get_mut(item_id) { @@ -346,13 +331,7 @@ impl ResponseAccumulator { } fn begin_output_item(&mut self, payload: &EventPayload) { - let EventPayload::OutputItemAdded { - item_id, - item_type, - output_index, - .. - } = payload - else { + let EventPayload::OutputItemAdded { item_id, item_type, .. } = payload else { return; }; let entry = match item_type { @@ -386,7 +365,6 @@ impl ResponseAccumulator { }; if let Some(inflight) = entry { self.in_flight.insert(item_id.clone(), inflight); - self.in_flight_indices.insert(item_id.clone(), *output_index); } } @@ -396,7 +374,7 @@ impl ResponseAccumulator { self.usage = usage; } - fn complete_custom_tool_call(&mut self, item_id: &str, output_index: u32, raw_item: &serde_json::Value) { + fn complete_custom_tool_call(&mut self, item_id: &str, raw_item: &serde_json::Value) { let Some(OutputItem::CustomToolCall(mut call)) = deserialize_from_value_opt::(raw_item.clone()) else { return; @@ -415,11 +393,11 @@ impl ResponseAccumulator { *item = call; } else { // Some Responses-compatible providers omit `output_item.added`. - self.push_output(output_index, OutputItem::CustomToolCall(call)); + self.output.push(OutputItem::CustomToolCall(call)); } } - fn complete_non_delta_output_item(&mut self, output_index: u32, raw_item: &serde_json::Value) { + fn complete_non_delta_output_item(&mut self, raw_item: &serde_json::Value) { let Some(output_item) = deserialize_from_value_opt::(raw_item.clone()) else { return; }; @@ -430,24 +408,7 @@ impl ResponseAccumulator { | OutputItem::WebSearchCall(_) | OutputItem::McpToolCall(_) ) { - self.push_output(output_index, output_item); - } - } - - fn push_output(&mut self, output_index: u32, item: OutputItem) { - self.output_indices.push(output_index); - self.output.push(item); - } - - fn sort_output_by_index(&mut self) { - let mut indexed = std::mem::take(&mut self.output_indices) - .into_iter() - .zip(std::mem::take(&mut self.output)) - .collect::>(); - indexed.sort_by_key(|(output_index, _)| *output_index); - for (output_index, item) in indexed { - self.output_indices.push(output_index); - self.output.push(item); + self.output.push(output_item); } } @@ -984,7 +945,7 @@ mod tests { } #[test] - fn test_function_call_multiple_parallel() { + fn test_function_call_multiple_parallel_finalize_in_insertion_order() { let mut acc = ResponseAccumulator::new("resp_1".into(), None); acc.process_event(&EventFrame { @@ -992,7 +953,7 @@ mod tests { payload: EventPayload::OutputItemAdded { item_id: "fc_1".into(), item_type: "function_call".into(), - output_index: 0, + output_index: 1, name: Some("get_weather".into()), namespace: None, call_id: Some("call_1".into()), @@ -1006,7 +967,7 @@ mod tests { call_id: Some("call_1".into()), item_id: "fc_1".into(), name: "get_weather".into(), - output_index: 0, + output_index: 1, }, sequence_number: Some(2), }); @@ -1016,7 +977,7 @@ mod tests { payload: EventPayload::OutputItemAdded { item_id: "fc_2".into(), item_type: "function_call".into(), - output_index: 1, + output_index: 0, name: Some("get_time".into()), namespace: None, call_id: Some("call_2".into()), @@ -1030,7 +991,7 @@ mod tests { call_id: Some("call_2".into()), item_id: "fc_2".into(), name: "get_time".into(), - output_index: 1, + output_index: 0, }, sequence_number: Some(4), }); @@ -1365,7 +1326,7 @@ mod tests { } #[test] - fn test_reasoning_precedes_completed_native_tool_search_item_by_output_index() { + fn test_completed_tool_search_precedes_in_flight_reasoning_on_finalization() { let lines = vec![ r#"data: {"type":"response.output_item.added","output_index":0,"item":{"id":"rs_1","type":"reasoning"}}"#.to_string(), r#"data: {"type":"response.reasoning_summary_text.delta","item_id":"rs_1","output_index":0,"delta":"Need a tool."}"#.to_string(), @@ -1374,12 +1335,12 @@ mod tests { ]; let acc = ResponseAccumulator::from_sse_lines(lines, None); - assert!(matches!(acc.output[0], OutputItem::Reasoning(_))); - assert!(matches!(acc.output[1], OutputItem::ToolSearchCall(_))); + assert!(matches!(acc.output[0], OutputItem::ToolSearchCall(_))); + assert!(matches!(acc.output[1], OutputItem::Reasoning(_))); } #[test] - fn test_hosted_search_call_output_and_function_follow_output_index_order() { + fn test_completed_search_items_precede_later_finalized_function_call() { let lines = vec![ r#"data: {"type":"response.output_item.done","output_index":0,"item":{"type":"tool_search_call","execution":"server","call_id":null,"status":"completed","arguments":{"paths":["crm"]}}}"#.to_string(), r#"data: {"type":"response.output_item.done","output_index":1,"item":{"type":"tool_search_output","execution":"server","call_id":null,"status":"completed","tools":[{"type":"function","name":"lookup"}]}}"#.to_string(), From b82c8cc3c0f4c19edb3da2598d42d33ea5dbc4c9 Mon Sep 17 00:00:00 2001 From: haoshan98 Date: Sun, 2 Aug 2026 09:38:35 +0000 Subject: [PATCH 5/9] Revert keep request fields Signed-off-by: haoshan98 --- .../benches/executor_throughput.rs | 4 - .../src/executor/modes/conversation.rs | 5 - .../src/executor/modes/response.rs | 5 - .../src/types/request_response.rs | 140 +----------------- .../tests/dispatch_loop_cassette_test.rs | 33 ----- .../agentic-server-core/tests/support/mod.rs | 4 - .../tests/web_search_tool_test.rs | 86 +++++------ .../src/handler/websocket/responses.rs | 11 +- .../tests/responses_websocket_test.rs | 10 +- 9 files changed, 43 insertions(+), 255 deletions(-) diff --git a/crates/agentic-server-core/benches/executor_throughput.rs b/crates/agentic-server-core/benches/executor_throughput.rs index 2ad08ff8..7c3803f2 100644 --- a/crates/agentic-server-core/benches/executor_throughput.rs +++ b/crates/agentic-server-core/benches/executor_throughput.rs @@ -28,7 +28,6 @@ //! cargo bench --bench executor_throughput -- --sample-size=20 //! ``` -use std::collections::HashMap; use std::sync::{Arc, Mutex}; use axum::Router; @@ -148,9 +147,6 @@ fn make_request(input: &str, stream: bool, prev_id: Option) -> RequestPa metadata: None, parallel_tool_calls: None, cache_salt: None, - reasoning: None, - prompt_cache_key: None, - extra: HashMap::new(), } } diff --git a/crates/agentic-server-core/src/executor/modes/conversation.rs b/crates/agentic-server-core/src/executor/modes/conversation.rs index 3a33d94d..3229bd29 100644 --- a/crates/agentic-server-core/src/executor/modes/conversation.rs +++ b/crates/agentic-server-core/src/executor/modes/conversation.rs @@ -116,8 +116,6 @@ impl ConversationHandler { #[cfg(test)] mod tests { - use std::collections::HashMap; - use super::*; use crate::types::io::ResponsesInput; use crate::types::request_response::RequestPayload; @@ -145,9 +143,6 @@ mod tests { metadata: None, parallel_tool_calls: None, cache_salt: None, - reasoning: None, - prompt_cache_key: None, - extra: HashMap::new(), }; RequestContext { enriched_request: req.clone(), diff --git a/crates/agentic-server-core/src/executor/modes/response.rs b/crates/agentic-server-core/src/executor/modes/response.rs index 0e649a51..ae771a47 100644 --- a/crates/agentic-server-core/src/executor/modes/response.rs +++ b/crates/agentic-server-core/src/executor/modes/response.rs @@ -95,8 +95,6 @@ impl ResponseHandler { #[cfg(test)] mod tests { - use std::collections::HashMap; - use super::*; use crate::types::io::ResponsesInput; use crate::types::request_response::RequestPayload; @@ -124,9 +122,6 @@ mod tests { metadata: None, parallel_tool_calls: None, cache_salt: None, - reasoning: None, - prompt_cache_key: None, - extra: HashMap::new(), }; RequestContext { enriched_request: req.clone(), diff --git a/crates/agentic-server-core/src/types/request_response.rs b/crates/agentic-server-core/src/types/request_response.rs index 706bc967..d17f56df 100644 --- a/crates/agentic-server-core/src/types/request_response.rs +++ b/crates/agentic-server-core/src/types/request_response.rs @@ -1,6 +1,5 @@ -use std::collections::{HashMap, HashSet}; +use std::collections::HashSet; -use serde::ser::SerializeMap; use serde::{Deserialize, Serialize}; use serde_json::{Value, json}; @@ -33,18 +32,7 @@ pub struct RequestPayload { pub metadata: Option, pub parallel_tool_calls: Option, #[serde(default, skip_serializing_if = "Option::is_none")] - pub reasoning: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - pub prompt_cache_key: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] pub cache_salt: Option, - /// Top-level Responses fields not yet modeled by the gateway. - /// - /// Preserving them keeps the typed executor forward-compatible with newer - /// clients while modeled fields remain authoritative during forwarding. - #[serde(default)] - #[serde(flatten)] - pub extra: HashMap, } fn default_true() -> bool { @@ -80,36 +68,7 @@ pub struct UpstreamRequest<'a> { pub metadata: Option<&'a Value>, #[serde(skip_serializing_if = "Option::is_none")] pub parallel_tool_calls: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub reasoning: Option<&'a Value>, - #[serde(skip_serializing_if = "Option::is_none")] - pub prompt_cache_key: Option<&'a str>, pub cache_salt: Option<&'a str>, - #[serde(flatten)] - extra: FilteredRequestFields<'a>, -} - -/// Borrowed view of unmodeled Responses request fields that omits keys owned -/// by [`UpstreamRequest`]. -/// -/// The custom map serializer avoids cloning potentially large JSON values on -/// every inference round while keeping modeled fields authoritative. -#[derive(Debug)] -struct FilteredRequestFields<'a>(&'a HashMap); - -impl Serialize for FilteredRequestFields<'_> { - fn serialize(&self, serializer: S) -> Result - where - S: serde::Serializer, - { - let mut map = serializer.serialize_map(None)?; - for (field, value) in self.0 { - if !is_modeled_request_field(field) { - map.serialize_entry(field, value)?; - } - } - map.end() - } } /// A tool declaration supported by the upstream Responses endpoint. @@ -221,10 +180,7 @@ impl RequestPayload { truncation: self.truncation.as_deref(), metadata: self.metadata.as_ref(), parallel_tool_calls, - reasoning: self.reasoning.as_ref(), - prompt_cache_key: self.prompt_cache_key.as_deref(), cache_salt: self.cache_salt.as_deref(), - extra: FilteredRequestFields(&self.extra), }) } @@ -255,31 +211,6 @@ impl RequestPayload { } } -fn is_modeled_request_field(field: &str) -> bool { - matches!( - field, - "model" - | "input" - | "instructions" - | "previous_response_id" - | "conversation_id" - | "tools" - | "tool_choice" - | "stream" - | "store" - | "include" - | "temperature" - | "top_p" - | "max_output_tokens" - | "truncation" - | "metadata" - | "parallel_tool_calls" - | "reasoning" - | "prompt_cache_key" - | "cache_salt" - ) -} - fn promote_loaded_function_tools(input: &ResponsesInput, tools: &mut Vec) -> bool { let mut declared_names = tools .iter() @@ -421,75 +352,6 @@ mod tests { assert_eq!(upstream["cache_salt"], "tenant-a"); } - #[test] - fn request_payload_forwards_codex_and_unknown_fields_upstream() { - let payload: RequestPayload = serde_json::from_value(serde_json::json!({ - "model": "test-model", - "input": "find a tool", - "tools": [{"type": "tool_search", "execution": "client"}], - "reasoning": {"effort": "low", "summary": "auto"}, - "prompt_cache_key": "codex-session-42", - "x-codex-sentinel": {"preserved": true} - })) - .expect("request should deserialize"); - - assert_eq!( - payload.reasoning.as_ref().and_then(|value| value["effort"].as_str()), - Some("low") - ); - assert_eq!(payload.prompt_cache_key.as_deref(), Some("codex-session-42")); - assert_eq!(payload.extra["x-codex-sentinel"]["preserved"], true); - - let upstream = serde_json::to_value(payload.to_upstream_request(false).expect("request should normalize")) - .expect("upstream request should serialize"); - - assert_eq!(upstream["reasoning"]["effort"], "low"); - assert_eq!(upstream["reasoning"]["summary"], "auto"); - assert_eq!(upstream["prompt_cache_key"], "codex-session-42"); - assert_eq!(upstream["x-codex-sentinel"]["preserved"], true); - } - - #[test] - fn modeled_request_fields_cannot_be_shadowed_by_extra_fields() { - let mut payload: RequestPayload = serde_json::from_value(serde_json::json!({ - "model": "authoritative-model", - "input": "hello", - "reasoning": {"effort": "low"}, - "prompt_cache_key": "authoritative-cache-key" - })) - .expect("request should deserialize"); - payload - .extra - .insert("model".to_owned(), serde_json::json!("shadow-model")); - payload - .extra - .insert("input".to_owned(), serde_json::json!("shadow-input")); - payload.extra.insert("stream".to_owned(), serde_json::json!(true)); - payload - .extra - .insert("reasoning".to_owned(), serde_json::json!({"effort": "high"})); - payload - .extra - .insert("prompt_cache_key".to_owned(), serde_json::json!("shadow-cache-key")); - - let encoded = serde_json::to_string(&payload.to_upstream_request(false).expect("request should normalize")) - .expect("upstream request should serialize"); - let upstream: Value = serde_json::from_str(&encoded).expect("upstream request should be valid JSON"); - - assert_eq!(upstream["model"], "authoritative-model"); - assert_eq!(upstream["input"], "hello"); - assert_eq!(upstream["stream"], false); - assert_eq!(upstream["reasoning"]["effort"], "low"); - assert_eq!(upstream["prompt_cache_key"], "authoritative-cache-key"); - for field in ["model", "input", "stream", "reasoning", "prompt_cache_key"] { - assert_eq!( - encoded.matches(&format!("\"{field}\":")).count(), - 1, - "{field} should be serialized exactly once" - ); - } - } - #[test] fn request_payload_uses_option_tool_choice_for_missing_vs_explicit() { let absent: RequestPayload = serde_json::from_value(serde_json::json!({ diff --git a/crates/agentic-server-core/tests/dispatch_loop_cassette_test.rs b/crates/agentic-server-core/tests/dispatch_loop_cassette_test.rs index 583db307..772a4649 100644 --- a/crates/agentic-server-core/tests/dispatch_loop_cassette_test.rs +++ b/crates/agentic-server-core/tests/dispatch_loop_cassette_test.rs @@ -12,7 +12,6 @@ //! feedback, the round-cap `incomplete` path) live in `web_search_tool_test.rs`; //! this file focuses on coverage against recorded `OpenAI` wire bodies. -use std::collections::HashMap; use std::sync::Arc; use agentic_core::executor::{ConversationHandler, ExecuteRequest, ExecutionContext, ResponseHandler}; @@ -130,9 +129,6 @@ fn request(text: &str, tools: Option>) -> RequestPayload { metadata: None, parallel_tool_calls: None, cache_salt: None, - reasoning: None, - prompt_cache_key: None, - extra: HashMap::new(), } } @@ -146,35 +142,6 @@ fn function_call_names(output: &[OutputItem]) -> Vec<&str> { .collect() } -#[tokio::test] -async fn codex_request_fields_pass_through_typed_executor() { - let llm = support::MockServer::start_deque(vec![support::text_response("done")]).await; - let exec_ctx = build_exec_ctx(llm.url()).await; - let payload: RequestPayload = serde_json::from_value(serde_json::json!({ - "model": "test-model", - "input": "find a tool", - "tools": [{"type": "tool_search", "execution": "client"}], - "reasoning": {"effort": "low", "summary": "auto"}, - "prompt_cache_key": "codex-session-42", - "x-codex-sentinel": {"preserved": true} - })) - .expect("Codex request should deserialize"); - - let result = ExecuteRequest::new(payload, exec_ctx) - .run() - .await - .expect("executor should complete"); - assert!(matches!(result, Either::Left(_))); - - let requests = llm.request_bodies().await; - assert_eq!(requests.len(), 1); - let upstream = &requests[0]; - assert_eq!(upstream["reasoning"]["effort"], "low"); - assert_eq!(upstream["reasoning"]["summary"], "auto"); - assert_eq!(upstream["prompt_cache_key"], "codex-session-42"); - assert_eq!(upstream["x-codex-sentinel"]["preserved"], true); -} - /// `OpenAI` cassette, turn 1 emits a single client-owned `get_job_status` /// function call. With no gateway executor registered, the loop must classify /// this as `RequiresClientAction`: exactly one model call, the call handed back diff --git a/crates/agentic-server-core/tests/support/mod.rs b/crates/agentic-server-core/tests/support/mod.rs index ac37d45f..d3b3b1ad 100644 --- a/crates/agentic-server-core/tests/support/mod.rs +++ b/crates/agentic-server-core/tests/support/mod.rs @@ -7,7 +7,6 @@ #![allow(dead_code)] -use std::collections::HashMap; use std::sync::Arc; use axum::Router; @@ -372,9 +371,6 @@ pub fn make_request( metadata: None, parallel_tool_calls: None, cache_salt: None, - reasoning: None, - prompt_cache_key: None, - extra: HashMap::new(), } } diff --git a/crates/agentic-server-core/tests/web_search_tool_test.rs b/crates/agentic-server-core/tests/web_search_tool_test.rs index c0ef8d77..e57b8c36 100644 --- a/crates/agentic-server-core/tests/web_search_tool_test.rs +++ b/crates/agentic-server-core/tests/web_search_tool_test.rs @@ -1,4 +1,3 @@ -use std::collections::HashMap; use std::sync::{ Arc, atomic::{AtomicUsize, Ordering}, @@ -587,9 +586,6 @@ async fn execute_runs_web_search_and_sends_tool_output_back_to_model() { metadata: None, parallel_tool_calls: None, cache_salt: None, - reasoning: None, - prompt_cache_key: None, - extra: HashMap::new(), }; let result = ExecuteRequest::new(payload, Arc::clone(&exec_ctx)).run().await.unwrap(); @@ -675,9 +671,6 @@ async fn execute_relaxes_forced_tool_choice_after_web_search_result() { metadata: None, parallel_tool_calls: None, cache_salt: None, - reasoning: None, - prompt_cache_key: None, - extra: HashMap::new(), }; let result = ExecuteRequest::new(payload, Arc::clone(&exec_ctx)).run().await.unwrap(); @@ -709,9 +702,25 @@ async fn execute_returns_mixed_client_tool_calls_without_followup_model_request( } })) .unwrap(); - let mut payload = support::make_request("look up rust async and weather", true, false, None, None); - payload.tools = Some(vec![web_search, client_function]); - payload.max_output_tokens = Some(1024); + let payload = RequestPayload { + model: "test-model".to_owned(), + input: ResponsesInput::Text("look up rust async and weather".to_owned()), + instructions: None, + previous_response_id: None, + conversation_id: None, + tools: Some(vec![web_search, client_function]), + tool_choice: None, + stream: false, + store: true, + include: None, + temperature: None, + top_p: None, + max_output_tokens: Some(1024), + truncation: None, + metadata: None, + parallel_tool_calls: None, + cache_salt: None, + }; let result = ExecuteRequest::new(payload, Arc::clone(&exec_ctx)).run().await.unwrap(); let Either::Left(response) = result else { @@ -741,8 +750,25 @@ async fn execute_returns_mixed_client_tool_calls_without_followup_model_request( .collect(); assert_eq!(function_names, ["get_weather"]); - let mut continuation_payload = support::make_request("continue", true, false, Some(response.id), None); - continuation_payload.max_output_tokens = Some(1024); + let continuation_payload = RequestPayload { + model: "test-model".to_owned(), + input: ResponsesInput::Text("continue".to_owned()), + instructions: None, + previous_response_id: Some(response.id), + conversation_id: None, + tools: None, + tool_choice: None, + stream: false, + store: true, + include: None, + temperature: None, + top_p: None, + max_output_tokens: Some(1024), + truncation: None, + metadata: None, + parallel_tool_calls: None, + cache_salt: None, + }; let continuation = ExecuteRequest::new(continuation_payload, exec_ctx).run().await.unwrap(); assert!(matches!(continuation, Either::Left(_))); let request_bodies = llm.request_bodies().await; @@ -813,9 +839,6 @@ async fn execute_accumulates_usage_across_web_search_model_rounds() { metadata: None, parallel_tool_calls: None, cache_salt: None, - reasoning: None, - prompt_cache_key: None, - extra: HashMap::new(), }; let result = ExecuteRequest::new(payload, exec_ctx).run().await.unwrap(); @@ -860,9 +883,6 @@ async fn stream_emits_web_search_lifecycle_events_before_final_payload() { metadata: None, parallel_tool_calls: None, cache_salt: None, - reasoning: None, - prompt_cache_key: None, - extra: HashMap::new(), }; let result = ExecuteRequest::new(payload, Arc::clone(&exec_ctx)).run().await.unwrap(); @@ -946,9 +966,6 @@ async fn stream_hides_web_search_function_events_when_name_arrives_on_done() { metadata: None, parallel_tool_calls: None, cache_salt: None, - reasoning: None, - prompt_cache_key: None, - extra: HashMap::new(), }; let result = ExecuteRequest::new(payload, Arc::clone(&exec_ctx)).run().await.unwrap(); @@ -1016,9 +1033,6 @@ async fn execute_runs_multiple_web_search_calls_concurrently() { metadata: None, parallel_tool_calls: None, cache_salt: None, - reasoning: None, - prompt_cache_key: None, - extra: HashMap::new(), }; let result = tokio::time::timeout(Duration::from_secs(2), ExecuteRequest::new(payload, exec_ctx).run()) @@ -1068,9 +1082,6 @@ async fn execute_feeds_web_search_execution_errors_back_to_model() { metadata: None, parallel_tool_calls: None, cache_salt: None, - reasoning: None, - prompt_cache_key: None, - extra: HashMap::new(), }; let result = ExecuteRequest::new(payload, exec_ctx).run().await.unwrap(); @@ -1122,9 +1133,6 @@ async fn execute_returns_incomplete_after_max_gateway_tool_rounds() { metadata: None, parallel_tool_calls: None, cache_salt: None, - reasoning: None, - prompt_cache_key: None, - extra: HashMap::new(), }; // Budget exhausted while the model keeps requesting tools → the response is @@ -1176,9 +1184,6 @@ async fn execute_feeds_invalid_web_search_arguments_back_to_model() { metadata: None, parallel_tool_calls: None, cache_salt: None, - reasoning: None, - prompt_cache_key: None, - extra: HashMap::new(), }; let result = ExecuteRequest::new(payload, exec_ctx).run().await.unwrap(); @@ -1237,9 +1242,6 @@ async fn execute_runs_large_gateway_fanout_without_hard_cap() { metadata: None, parallel_tool_calls: None, cache_salt: None, - reasoning: None, - prompt_cache_key: None, - extra: HashMap::new(), }; let result = ExecuteRequest::new(payload, exec_ctx) @@ -1304,9 +1306,6 @@ async fn stream_error_events_escape_error_messages() { metadata: None, parallel_tool_calls: None, cache_salt: None, - reasoning: None, - prompt_cache_key: None, - extra: HashMap::new(), }; let result = ExecuteRequest::new(payload, exec_ctx).run().await.unwrap(); @@ -1383,9 +1382,6 @@ async fn incomplete_turn_persists_a_consistent_conversation_for_continuation() { metadata: None, parallel_tool_calls: None, cache_salt: None, - reasoning: None, - prompt_cache_key: None, - extra: HashMap::new(), }; let result = ExecuteRequest::new(payload, Arc::clone(&exec_ctx)).run().await.unwrap(); @@ -1413,9 +1409,6 @@ async fn incomplete_turn_persists_a_consistent_conversation_for_continuation() { metadata: None, parallel_tool_calls: None, cache_salt: None, - reasoning: None, - prompt_cache_key: None, - extra: HashMap::new(), }; let _ = ExecuteRequest::new(continuation_payload, exec_ctx).run().await.unwrap(); @@ -1487,9 +1480,6 @@ async fn stream_returns_incomplete_after_max_gateway_tool_rounds() { metadata: None, parallel_tool_calls: None, cache_salt: None, - reasoning: None, - prompt_cache_key: None, - extra: HashMap::new(), }; let result = ExecuteRequest::new(payload, exec_ctx).run().await.unwrap(); diff --git a/crates/agentic-server/src/handler/websocket/responses.rs b/crates/agentic-server/src/handler/websocket/responses.rs index 681eea81..cf46efe8 100644 --- a/crates/agentic-server/src/handler/websocket/responses.rs +++ b/crates/agentic-server/src/handler/websocket/responses.rs @@ -15,7 +15,7 @@ use tracing::{debug, warn}; use agentic_core::ResponseUsage; use agentic_core::executor::{BoxStream, ExecuteRequest, ExecutorError, RequestContext, rehydrate_conversation}; use agentic_core::types::request_response::RequestPayload; -use agentic_core::utils::common::{deserialize_from_str, deserialize_from_value, utcnow_str}; +use agentic_core::utils::common::utcnow_str; use super::super::common::{MAX_BODY_SIZE, extract_bearer}; use super::error::WsError; @@ -119,19 +119,14 @@ async fn handle_ws_text( shutdown_token: &CancellationToken, queue: &mut VecDeque, ) -> Result<(), WsError> { - let value = deserialize_from_str::(text).map_err(WsError::InvalidJson)?; + let value = serde_json::from_str::(text).map_err(WsError::InvalidJson)?; if value.get("type").and_then(Value::as_str) != Some("response.create") { return Err(WsError::UnexpectedType); } let generate = value.get("generate").and_then(Value::as_bool); - let Value::Object(mut request) = value else { - return Err(WsError::UnexpectedType); - }; - request.remove("type"); - request.remove("generate"); - let mut payload = deserialize_from_value::(Value::Object(request)).map_err(ExecutorError::from)?; + let mut payload = serde_json::from_value::(value).map_err(ExecutorError::from)?; let requested_stream = payload.stream; let requested_store = payload.store; payload.stream = true; diff --git a/crates/agentic-server/tests/responses_websocket_test.rs b/crates/agentic-server/tests/responses_websocket_test.rs index d1a8918c..e0f6fffe 100644 --- a/crates/agentic-server/tests/responses_websocket_test.rs +++ b/crates/agentic-server/tests/responses_websocket_test.rs @@ -617,11 +617,7 @@ async fn test_websocket_first_turn_forwards_incremental_events_and_final_payload "model": "test-model", "input": [{"type": "message", "role": "user", "content": "hi"}], "store": true, - "stream": true, - "generate": true, - "reasoning": {"effort": "low"}, - "prompt_cache_key": "ws-cache-key", - "x-future-responses-field": {"preserved": true} + "stream": true }), ) .await; @@ -651,10 +647,6 @@ async fn test_websocket_first_turn_forwards_incremental_events_and_final_payload assert_eq!(requests[0]["stream"], true); assert_eq!(requests[0]["input"][0]["content"], "hi"); assert!(requests[0].get("type").is_none()); - assert!(requests[0].get("generate").is_none()); - assert_eq!(requests[0]["reasoning"]["effort"], "low"); - assert_eq!(requests[0]["prompt_cache_key"], "ws-cache-key"); - assert_eq!(requests[0]["x-future-responses-field"]["preserved"], true); } #[tokio::test] From 1ff9f53671f05c7954a870744b670f303bbb02d5 Mon Sep 17 00:00:00 2001 From: haoshan98 Date: Sun, 2 Aug 2026 10:15:05 +0000 Subject: [PATCH 6/9] Updates Signed-off-by: haoshan98 --- .../src/executor/accumulator.rs | 91 +++++++++---------- 1 file changed, 43 insertions(+), 48 deletions(-) diff --git a/crates/agentic-server-core/src/executor/accumulator.rs b/crates/agentic-server-core/src/executor/accumulator.rs index da1bf754..cd9a89d1 100644 --- a/crates/agentic-server-core/src/executor/accumulator.rs +++ b/crates/agentic-server-core/src/executor/accumulator.rs @@ -46,34 +46,34 @@ impl std::fmt::Debug for InFlight { } impl InFlight { - fn finalize(self) -> OutputItem { + fn finalize(self, output: &mut Vec) { match self { Self::Reasoning { mut item, text } => { if !text.is_empty() { item.content.push(ReasoningTextContent::new(text)); } - OutputItem::Reasoning(item) + output.push(OutputItem::Reasoning(item)); } Self::FunctionCall { mut item, arguments } => { if !arguments.is_empty() && item.arguments.is_empty() { item.arguments = arguments; } item.status = MessageStatus::Completed; - OutputItem::FunctionCall(item) + output.push(OutputItem::FunctionCall(item)); } Self::Message { mut item, text } => { if !text.is_empty() { item.content.push(OutputTextContent::new(text)); } item.status = MessageStatus::Completed; - OutputItem::Message(item) + output.push(OutputItem::Message(item)); } Self::CustomToolCall { mut item, input } => { if item.input.is_empty() { item.input = input; } item.status = Some(MessageStatus::Completed); - OutputItem::CustomToolCall(item) + output.push(OutputItem::CustomToolCall(item)); } } } @@ -215,10 +215,10 @@ impl ResponseAccumulator { acc } - /// Finalizes all in-flight items in insertion order, appending them to completed output. + /// Finalizes all in-flight items in insertion order, pushing them to `output`. pub(crate) fn finalize_all(&mut self) { - for (_, item) in self.in_flight.drain(..) { - self.output.push(item.finalize()); + for (_, entry) in self.in_flight.drain(..) { + entry.finalize(&mut self.output); } } @@ -267,8 +267,41 @@ impl ResponseAccumulator { (SSEEventType::ResponseCreated, EventPayload::Response { id, .. }) if !id.is_empty() => { self.response_id.clone_from(id); } - (SSEEventType::OutputItemAdded, payload @ EventPayload::OutputItemAdded { .. }) => { - self.begin_output_item(payload); + (SSEEventType::OutputItemAdded, payload @ EventPayload::OutputItemAdded { item_id, item_type, .. }) => { + let entry = match item_type { + SSEItemType::Reasoning => ReasoningOutput::try_from(payload).ok().map(|item| InFlight::Reasoning { + item, + text: String::with_capacity(256), + }), + SSEItemType::FunctionCall => { + FunctionToolCall::try_from(payload) + .ok() + .map(|item| InFlight::FunctionCall { + item, + arguments: String::with_capacity(128), + }) + } + SSEItemType::CustomToolCall => { + CustomToolCall::try_from(payload) + .ok() + .map(|item| InFlight::CustomToolCall { + item, + input: String::with_capacity(256), + }) + } + SSEItemType::Message => OutputMessage::try_from(payload).ok().map(|item| InFlight::Message { + item, + text: String::with_capacity(256), + }), + SSEItemType::ToolSearchCall + | SSEItemType::ToolSearchOutput + | SSEItemType::WebSearchCall + | SSEItemType::McpToolCall + | SSEItemType::Unknown => None, + }; + if let Some(inflight) = entry { + self.in_flight.insert(item_id.clone(), inflight); + } } ( SSEEventType::OutputItemDone, @@ -330,44 +363,6 @@ impl ResponseAccumulator { } } - fn begin_output_item(&mut self, payload: &EventPayload) { - let EventPayload::OutputItemAdded { item_id, item_type, .. } = payload else { - return; - }; - let entry = match item_type { - SSEItemType::Reasoning => ReasoningOutput::try_from(payload).ok().map(|item| InFlight::Reasoning { - item, - text: String::with_capacity(256), - }), - SSEItemType::FunctionCall => FunctionToolCall::try_from(payload) - .ok() - .map(|item| InFlight::FunctionCall { - item, - arguments: String::with_capacity(128), - }), - SSEItemType::CustomToolCall => { - CustomToolCall::try_from(payload) - .ok() - .map(|item| InFlight::CustomToolCall { - item, - input: String::with_capacity(256), - }) - } - SSEItemType::Message => OutputMessage::try_from(payload).ok().map(|item| InFlight::Message { - item, - text: String::with_capacity(256), - }), - SSEItemType::ToolSearchCall - | SSEItemType::ToolSearchOutput - | SSEItemType::WebSearchCall - | SSEItemType::McpToolCall - | SSEItemType::Unknown => None, - }; - if let Some(inflight) = entry { - self.in_flight.insert(item_id.clone(), inflight); - } - } - fn finish_response(&mut self, status: ResponseStatus, usage: Option) { self.finalize_all(); self.status = status; From 410fb6b156590bd05a5977c89bb6243229dbf640 Mon Sep 17 00:00:00 2001 From: haoshan98 Date: Mon, 3 Aug 2026 08:29:50 +0000 Subject: [PATCH 7/9] Update tool search function tool normalization Signed-off-by: haoshan98 --- crates/agentic-server-core/src/tool/tool_search.rs | 2 +- crates/agentic-server-core/src/types/request_response.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/agentic-server-core/src/tool/tool_search.rs b/crates/agentic-server-core/src/tool/tool_search.rs index 54b1f30f..e7008871 100644 --- a/crates/agentic-server-core/src/tool/tool_search.rs +++ b/crates/agentic-server-core/src/tool/tool_search.rs @@ -22,7 +22,7 @@ pub(crate) fn tool_search_function_tool(declaration: &ToolSearchToolParam) -> Fu name: TOOL_SEARCH_NAME.to_owned(), description: declaration.description.clone(), parameters: declaration.parameters.clone(), - strict: None, + strict: Some(false), defer_loading: None, } } diff --git a/crates/agentic-server-core/src/types/request_response.rs b/crates/agentic-server-core/src/types/request_response.rs index b5086414..e3aa2dba 100644 --- a/crates/agentic-server-core/src/types/request_response.rs +++ b/crates/agentic-server-core/src/types/request_response.rs @@ -170,7 +170,7 @@ impl RequestPayload { .as_deref() .map(|tools| CodexNamespaceHandler.resolve_namespace_members(tools)) .transpose()?; - let loaded_tools = loaded_function_tools(&self.input); + let loaded_tools: Vec = loaded_function_tools(&self.input); let tool_search_name_is_owned = renamed_tools.as_deref().is_some_and(|tools| { tools.iter().any( |tool| matches!(tool, ResponsesTool::Function(function) if function.name.as_str() == TOOL_SEARCH_NAME), @@ -741,6 +741,7 @@ mod tests { assert_eq!(tools[1]["name"], TOOL_SEARCH_NAME); assert_eq!(tools[1]["description"], "Search tools by goal."); assert_eq!(tools[1]["parameters"]["required"][0], "goal"); + assert_eq!(tools[1]["strict"], false); assert!(tools[1].get("execution").is_none()); assert!(tools[1].get("x-client-field").is_none()); } @@ -776,6 +777,7 @@ mod tests { assert_eq!(tools[0]["description"], "Hosted search"); assert_eq!(tools[0]["parameters"]["type"], "object"); assert_eq!(tools[0]["x-provider-field"], "preserved"); + assert!(tools[0].get("strict").is_none()); assert_eq!(tools[1], serde_json::json!({"type": "tool_search"})); } From 07d06de782efbb31c8b309dd1cf5d8e6a1b67e96 Mon Sep 17 00:00:00 2001 From: haoshan98 Date: Mon, 3 Aug 2026 10:47:35 +0000 Subject: [PATCH 8/9] Cassette recordings Signed-off-by: haoshan98 --- .../src/executor/engine.rs | 14 +- .../src/executor/gateway_accumulator.rs | 81 +- .../agentic-server-core/src/tool/registry.rs | 78 +- .../src/tool/tool_search.rs | 28 + .../tests/accumulator_cassette_test.rs | 318 +++- .../tests/cassettes/README.md | 48 + .../cassettes/record_tool_search_cassettes.sh | 255 ++- ...way-Qwen-Qwen3.6-35B-A3B-nonstreaming.yaml | 112 ++ ...ateway-Qwen-Qwen3.6-35B-A3B-streaming.yaml | 1387 +++++++++++++++++ ...n-Qwen3.6-35B-A3B-websocket-streaming.yaml | 574 +++++++ ...openai-reference-gpt-5.6-nonstreaming.yaml | 146 ++ ...ch-openai-reference-gpt-5.6-streaming.yaml | 102 ++ ...reference-gpt-5.6-websocket-streaming.yaml | 91 ++ .../tests/cassettes/tool_search/tools.json | 1 + .../tests/tool_normalization_test.rs | 41 + 15 files changed, 3242 insertions(+), 34 deletions(-) create mode 100644 crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-nonstreaming.yaml create mode 100644 crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-streaming.yaml create mode 100644 crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-websocket-streaming.yaml create mode 100644 crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-nonstreaming.yaml create mode 100644 crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-streaming.yaml create mode 100644 crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-websocket-streaming.yaml diff --git a/crates/agentic-server-core/src/executor/engine.rs b/crates/agentic-server-core/src/executor/engine.rs index 54cee21d..ab99069e 100644 --- a/crates/agentic-server-core/src/executor/engine.rs +++ b/crates/agentic-server-core/src/executor/engine.rs @@ -99,7 +99,7 @@ async fn run_until_gateway_tools_complete( auth: Option<&str>, stream_upstream: bool, mut stream: Option<(&mut GatewayStreamAccumulator, &mpsc::UnboundedSender)>, -) -> ExecutorResult<(ResponsePayload, RequestContext)> { +) -> ExecutorResult<(ResponsePayload, RequestContext, ToolRegistry)> { let mut executors = exec_ctx.gateway_executors.request_scoped(); let mut registry: ToolRegistry = match ctx.enriched_request.tools.as_mut() { Some(tools) => ToolRegistry::build_with_handlers(tools, &mut executors).await?, @@ -159,12 +159,12 @@ async fn run_until_gateway_tools_complete( gateway_results.into_iter().map(|result| result.input_item).collect(), ); finalize_loop(&mut payload, combined_output, combined_usage, &ctx); - return Ok((payload, ctx)); + return Ok((payload, ctx, registry)); } // No gateway work remains — this turn is the final response. LoopDecision::Done => { finalize_loop(&mut payload, combined_output, combined_usage, &ctx); - return Ok((payload, ctx)); + return Ok((payload, ctx, registry)); } // Budget exhausted while the model was still requesting gateway // tools: surface the accumulated work as a partial @@ -180,7 +180,7 @@ async fn run_until_gateway_tools_complete( finalize_loop(&mut payload, combined_output, combined_usage, &ctx); "incomplete".clone_into(&mut payload.status); payload.incomplete_details = Some(IncompleteDetails { reason: Some(reason) }); - return Ok((payload, ctx)); + return Ok((payload, ctx, registry)); } // Gateway tools ran and rounds remain; feed outputs back and loop. LoopDecision::Continue => { @@ -347,7 +347,7 @@ async fn run_blocking( exec_ctx: &ExecutionContext, auth: Option<&str>, ) -> ExecutorResult { - let (payload, ctx) = run_until_gateway_tools_complete(ctx, exec_ctx, auth, false, None).await?; + let (payload, ctx, _registry) = run_until_gateway_tools_complete(ctx, exec_ctx, auth, false, None).await?; let ch = exec_ctx.conv_handler.clone(); let rh = exec_ctx.resp_handler.clone(); @@ -397,7 +397,7 @@ fn run_stream(ctx: RequestContext, exec_ctx: Arc, auth: Option yield stream_accumulator.error_chunk(&e.to_string()); yield DONE_MARKER.to_string(); } - Ok((Ok((payload, ctx)), mut stream_accumulator)) => { + Ok((Ok((payload, ctx, registry)), mut stream_accumulator)) => { while let Ok(event) = event_rx.try_recv() { yield consume_stream_event(event, &mut next_sequence_number); } @@ -405,7 +405,7 @@ fn run_stream(ctx: RequestContext, exec_ctx: Arc, auth: Option // `response.completed`. Persist before exposing that // event so a custom call/output continuation cannot be // cancelled by the client disconnect. - let terminal_chunk = stream_accumulator.terminal_response_chunk(&payload); + let terminal_chunk = stream_accumulator.terminal_response_chunk(&payload, ®istry); let ch = exec_ctx.conv_handler.clone(); let rh = exec_ctx.resp_handler.clone(); if let Err(e) = persist_if_needed(payload, ctx, ch, rh).await { diff --git a/crates/agentic-server-core/src/executor/gateway_accumulator.rs b/crates/agentic-server-core/src/executor/gateway_accumulator.rs index e5452861..dca10cde 100644 --- a/crates/agentic-server-core/src/executor/gateway_accumulator.rs +++ b/crates/agentic-server-core/src/executor/gateway_accumulator.rs @@ -1,5 +1,6 @@ use crate::events::{EventFrame, EventPayload, SSEEventType, WireEvent, normalize_sse_line}; use crate::executor::error::{ExecutorError, ExecutorResult}; +use crate::tool::ToolRegistry; use crate::types::request_response::ResponsePayload; use crate::utils::common::{serialize_to_string, serialize_to_value}; use serde_json::Value; @@ -44,8 +45,13 @@ impl GatewayStreamAccumulator { rebase_output_index(&mut frame.wire, output_offset); } - pub(crate) fn terminal_response_chunk(&mut self, payload: &ResponsePayload) -> ExecutorResult { + pub(crate) fn terminal_response_chunk( + &mut self, + payload: &ResponsePayload, + registry: &ToolRegistry, + ) -> ExecutorResult { let mut frame = terminal_response_frame(payload)?; + registry.restore_stream_event_wire(&mut frame.wire); self.stamp_event(&mut frame, 0); serialize_sse_frame(&frame) } @@ -164,6 +170,8 @@ fn serialize_sse_frame(frame: &EventFrame) -> ExecutorResult { #[cfg(test)] mod tests { use super::*; + use crate::tool::GatewayExecutors; + use crate::types::tools::ResponsesTool; #[test] fn process_sse_line_numbers_and_rebases_output_index() { @@ -218,10 +226,79 @@ mod tests { })) .expect("valid response payload"); + let registry = ToolRegistry::default(); let chunk = accumulator - .terminal_response_chunk(&payload) + .terminal_response_chunk(&payload, ®istry) .expect("terminal event serializes"); assert!(chunk.contains("\"type\":\"response.in_progress\"")); assert!(chunk.contains("\"sequence_number\":1")); } + + #[tokio::test] + async fn completed_terminal_response_restores_client_tool_search_declarations() { + let mut tools: Vec = serde_json::from_value(serde_json::json!([ + { + "type": "tool_search", + "execution": "client", + "description": "search deferred tools", + "parameters": {"type": "object"} + }, + { + "type": "function", + "name": "get_shipping_eta", + "strict": false, + "defer_loading": true + } + ])) + .expect("valid client tool-search declarations"); + let mut executors = GatewayExecutors::default(); + let registry = ToolRegistry::build_with_handlers(&mut tools, &mut executors) + .await + .expect("valid tool registry"); + let payload: ResponsePayload = serde_json::from_value(serde_json::json!({ + "id": "resp_1", + "object": "response", + "created_at": 0, + "model": "test", + "status": "completed", + "output": [], + "usage": null, + "incomplete_details": null, + "error": null, + "previous_response_id": null, + "conversation_id": null, + "instructions": null + })) + .expect("valid response payload"); + + let chunk = GatewayStreamAccumulator::new() + .terminal_response_chunk(&payload, ®istry) + .expect("terminal event serializes"); + let data = chunk + .trim_end_matches('\n') + .strip_prefix("data: ") + .expect("SSE data prefix"); + let event: serde_json::Value = serde_json::from_str(data).expect("valid terminal event JSON"); + let response_tools = event["response"]["tools"] + .as_array() + .expect("terminal response should expose tools"); + + assert_eq!(event["type"], "response.completed"); + assert!( + response_tools + .iter() + .any(|tool| { tool["type"] == "tool_search" && tool["execution"] == "client" }) + ); + assert!(response_tools.iter().any(|tool| { + tool["type"] == "function" + && tool["name"] == "get_shipping_eta" + && tool["defer_loading"] == true + && tool["strict"] == false + })); + assert!( + !response_tools + .iter() + .any(|tool| { tool["type"] == "function" && tool["name"] == "tool_search" }) + ); + } } diff --git a/crates/agentic-server-core/src/tool/registry.rs b/crates/agentic-server-core/src/tool/registry.rs index 991082d1..73425ebd 100644 --- a/crates/agentic-server-core/src/tool/registry.rs +++ b/crates/agentic-server-core/src/tool/registry.rs @@ -171,6 +171,7 @@ pub struct ToolRegistry { /// Tool-search identity is request-scoped: only a declared client search /// may restore the provider's ordinary function fallback. client_tool_search: bool, + client_tool_search_declarations: Option, loaded_tool_namespaces: HashMap, tool_search_name_owned: bool, } @@ -194,6 +195,27 @@ impl ToolRegistry { ) -> Result { let mut entries = HashMap::with_capacity(tools.len()); let mut mcp_tool_map = McpToolMap::default(); + let client_tool_search = tools.iter().any(|tool| { + matches!( + tool, + ResponsesTool::ToolSearch(search) + if search.execution == Some(ToolSearchExecution::Client) + ) + }); + let client_tool_search_declarations = if client_tool_search { + let mut declarations = tools.to_vec(); + declarations + .iter_mut() + .for_each(ResponsesTool::sanitize_for_persistence); + serialize_to_value_or_custom_default( + &declarations, + "failed to preserve client tool-search response declarations", + Some, + None, + ) + } else { + None + }; // Namespace members must be keyed by the same flat, model-visible name // the model will call, so resolve them first — the same pure pass used // to build the upstream request. @@ -248,13 +270,6 @@ impl ToolRegistry { } let namespace_map = CodexNamespaceHandler.build_namespace_map((!tools.is_empty()).then_some(tools))?; - let client_tool_search = tools.iter().any(|tool| { - matches!( - tool, - ResponsesTool::ToolSearch(search) - if search.execution == Some(ToolSearchExecution::Client) - ) - }); let tool_search_name_owned = entries.contains_key(tool_search::TOOL_SEARCH_NAME); Ok(Self { @@ -262,6 +277,7 @@ impl ToolRegistry { namespace_map, mcp_tool_map, client_tool_search, + client_tool_search_declarations, loaded_tool_namespaces: HashMap::new(), tool_search_name_owned, }) @@ -301,6 +317,8 @@ impl ToolRegistry { let mut changed = CodexNamespaceHandler.restore_response_wire(wire, self.namespace_map.as_ref()); changed |= tool_search::restore_loaded_namespace_response_wire(wire, &self.loaded_tool_namespaces); changed |= tool_search::restore_response_wire(wire, self.can_restore_tool_search_fallback()); + changed |= + tool_search::restore_response_tool_declarations_wire(wire, self.client_tool_search_declarations.as_ref()); changed } @@ -683,6 +701,52 @@ mod tests { assert!(!search_registry.can_restore_tool_search_fallback()); } + #[tokio::test] + async fn client_tool_search_restores_public_tools_on_response_lifecycle_events() { + let declarations = serde_json::json!([ + { + "type": "tool_search", + "execution": "client", + "description": "search deferred tools", + "parameters": {"type": "object"} + }, + { + "type": "function", + "name": "get_shipping_eta", + "strict": false, + "defer_loading": true + } + ]); + let mut tools: Vec = + serde_json::from_value(declarations.clone()).expect("valid client tool-search declarations"); + let mut executors = GatewayExecutors::default(); + let registry = ToolRegistry::build_with_handlers(&mut tools, &mut executors) + .await + .expect("valid registry"); + + for event_type in [ + "response.created", + "response.in_progress", + "response.completed", + "response.incomplete", + "response.failed", + ] { + let mut wire = WireEvent::new(event_type); + wire.rest.insert( + "response".to_owned(), + serde_json::json!({ + "tools": [ + {"type": "function", "name": "tool_search", "strict": false}, + {"type": "function", "name": "get_shipping_eta", "strict": false} + ] + }), + ); + + assert!(registry.restore_stream_event_wire(&mut wire)); + assert_eq!(wire.rest["response"]["tools"], declarations); + } + } + #[tokio::test] async fn hosted_tool_search_does_not_enable_client_fallback_restoration() { for declaration in [ diff --git a/crates/agentic-server-core/src/tool/tool_search.rs b/crates/agentic-server-core/src/tool/tool_search.rs index e7008871..43ff7667 100644 --- a/crates/agentic-server-core/src/tool/tool_search.rs +++ b/crates/agentic-server-core/src/tool/tool_search.rs @@ -320,6 +320,34 @@ pub(crate) fn restore_response_wire(wire: &mut WireEvent, enabled: bool) -> bool restore_response_map(&mut wire.rest) } +/// Restore the request's public tool declarations on streamed response +/// lifecycle envelopes after provider-facing normalization. +pub(crate) fn restore_response_tool_declarations_wire(wire: &mut WireEvent, declarations: Option<&Value>) -> bool { + if !matches!( + wire.event_type.as_deref(), + Some( + "response.created" + | "response.in_progress" + | "response.completed" + | "response.incomplete" + | "response.failed" + ) + ) { + return false; + } + let Some(declarations) = declarations else { + return false; + }; + let Some(response) = wire.rest.get_mut("response").and_then(Value::as_object_mut) else { + return false; + }; + if response.get("tools") == Some(declarations) { + return false; + } + response.insert("tools".to_owned(), declarations.clone()); + true +} + pub(crate) fn restore_loaded_namespace_response_value( value: &mut Value, loaded_namespaces: &HashMap, diff --git a/crates/agentic-server-core/tests/accumulator_cassette_test.rs b/crates/agentic-server-core/tests/accumulator_cassette_test.rs index 54f21e5f..9a600908 100644 --- a/crates/agentic-server-core/tests/accumulator_cassette_test.rs +++ b/crates/agentic-server-core/tests/accumulator_cassette_test.rs @@ -9,17 +9,25 @@ use serde::Deserialize; use agentic_core::executor::accumulator::ResponseAccumulator; use agentic_core::types::event::MessageStatus; -use agentic_core::types::io::{CustomToolCall, FunctionToolCall, OutputItem, WebSearchCall}; +use agentic_core::types::io::{ + CustomToolCall, FunctionToolCall, OutputItem, ToolSearchCall, ToolSearchStatus, WebSearchCall, +}; +use agentic_core::types::tools::ToolSearchExecution; const CASSETTE_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/cassettes/events"); const TOOL_CALLS_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/cassettes/tool_calls"); const REASONING_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/cassettes/reasoning/responses"); const CODEX_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/cassettes/codex"); const WEB_SEARCH_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/cassettes/web_search"); +const TOOL_SEARCH_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/cassettes/tool_search"); const WEB_SEARCH_GATEWAY_MODEL: &str = "Qwen/Qwen3.5-35B-A3B-FP8"; const WEB_SEARCH_GATEWAY_MODEL_SLUG: &str = "Qwen-Qwen3.5-35B-A3B-FP8"; const WEB_SEARCH_OPENAI_MODEL: &str = "gpt-5.6"; const WEB_SEARCH_OPENAI_MODEL_SLUG: &str = "gpt-5.6"; +const TOOL_SEARCH_GATEWAY_MODEL: &str = "Qwen/Qwen3.6-35B-A3B"; +const TOOL_SEARCH_GATEWAY_MODEL_SLUG: &str = "Qwen-Qwen3.6-35B-A3B"; +const TOOL_SEARCH_OPENAI_MODEL: &str = "gpt-5.6"; +const TOOL_SEARCH_OPENAI_MODEL_SLUG: &str = "gpt-5.6"; // --- Legacy event cassette format --- @@ -67,6 +75,8 @@ struct TurnResponse { status_code: Option, #[serde(default)] sse: Vec, + #[serde(default)] + websocket: Vec, body: Option, } @@ -103,6 +113,31 @@ fn load_web_search_cassette_pair(streaming: bool) -> (TurnCassette, TurnCassette (openai, gateway) } +fn load_tool_search_cassette_pair(streaming: bool) -> (TurnCassette, TurnCassette) { + let mode = if streaming { "streaming" } else { "nonstreaming" }; + let openai = load_turn_cassette_from( + TOOL_SEARCH_DIR, + &format!("tool-search-openai-reference-{TOOL_SEARCH_OPENAI_MODEL_SLUG}-{mode}.yaml"), + ); + let gateway = load_turn_cassette_from( + TOOL_SEARCH_DIR, + &format!("tool-search-gateway-{TOOL_SEARCH_GATEWAY_MODEL_SLUG}-{mode}.yaml"), + ); + (openai, gateway) +} + +fn load_tool_search_websocket_cassette_pair() -> (TurnCassette, TurnCassette) { + let openai = load_turn_cassette_from( + TOOL_SEARCH_DIR, + &format!("tool-search-openai-reference-{TOOL_SEARCH_OPENAI_MODEL_SLUG}-websocket-streaming.yaml"), + ); + let gateway = load_turn_cassette_from( + TOOL_SEARCH_DIR, + &format!("tool-search-gateway-{TOOL_SEARCH_GATEWAY_MODEL_SLUG}-websocket-streaming.yaml"), + ); + (openai, gateway) +} + /// Extracts `data: ...` lines from raw SSE entries (which may include /// `event:` lines and blank separators). fn extract_data_lines(sse_entries: &[String]) -> Vec { @@ -160,6 +195,24 @@ fn process_codex_streaming_turn(cassette: &TurnCassette, turn_idx: usize, model: payload.output } +fn process_websocket_turn(cassette: &TurnCassette, turn_idx: usize, model: &str) -> Vec { + let data_lines = cassette.turns[turn_idx] + .response + .websocket + .iter() + .map(|message| format!("data: {message}")) + .collect::>(); + assert!( + !data_lines.is_empty(), + "WebSocket cassette turn {} must have messages", + turn_idx + 1 + ); + let acc = ResponseAccumulator::from_sse_lines(data_lines, None); + let payload = acc.finalize(model, None, None); + assert_eq!(payload.status, "completed"); + payload.output +} + fn first_function_call(output: &[OutputItem]) -> &FunctionToolCall { output .iter() @@ -943,6 +996,192 @@ fn assert_matching_web_search_output(openai: &[OutputItem], gateway: &[OutputIte ); } +fn assert_native_client_tool_search_request(provider: &str, cassette: &TurnCassette) { + assert_eq!(cassette.turns.len(), 1, "{provider} cassette should have one turn"); + let request = serde_json::to_value(&cassette.turns[0].request).expect("request must convert to JSON"); + let websocket = request["transport"] == "websocket"; + assert_eq!( + cassette.turns[0].response.status_code, + Some(if websocket { 101 } else { 200 }), + "{provider} cassette should record a successful response" + ); + let body = turn_request_body(&cassette.turns[0]); + if websocket { + assert_eq!(request["method"], "WEBSOCKET"); + assert_eq!(body["type"], "response.create"); + assert!( + body.get("stream").is_none(), + "WebSocket request must not contain stream" + ); + } + assert_eq!(body["tool_choice"], "required"); + let tools = body["tools"] + .as_array() + .unwrap_or_else(|| panic!("{provider} cassette request should declare tools")); + + let search_tools: Vec<_> = tools.iter().filter(|tool| tool["type"] == "tool_search").collect(); + assert_eq!( + search_tools.len(), + 1, + "{provider} request should contain one native tool_search declaration" + ); + assert_eq!(search_tools[0]["execution"], "client"); + assert!( + search_tools[0].get("name").is_none(), + "{provider} public request should not contain the internal function fallback" + ); + + let deferred = tools + .iter() + .find(|tool| tool["type"] == "function" && tool["name"] == "get_shipping_eta") + .unwrap_or_else(|| panic!("{provider} request should contain get_shipping_eta")); + assert_eq!(deferred["defer_loading"], true); + assert_eq!(deferred["strict"], false); +} + +fn assert_completed_client_tool_search<'a>(provider: &str, output: &'a [OutputItem]) -> &'a ToolSearchCall { + assert_eq!( + count_function_calls(output), + 0, + "{provider} public output must not leak the provider function fallback" + ); + let calls: Vec<_> = output + .iter() + .filter_map(|item| match item { + OutputItem::ToolSearchCall(call) => Some(call), + _ => None, + }) + .collect(); + assert_eq!(calls.len(), 1, "{provider} output should contain one tool_search_call"); + + let call = calls[0]; + assert_eq!(call.execution, Some(ToolSearchExecution::Client)); + assert_eq!(call.status, Some(ToolSearchStatus::Completed)); + assert!(call.requires_client_execution()); + assert!( + call.arguments + .get("goal") + .and_then(serde_json::Value::as_str) + .is_some_and(|goal| !goal.is_empty()), + "{provider} tool_search_call should contain a nonempty goal" + ); + call +} + +fn tool_search_sse_events(cassette: &TurnCassette) -> Vec { + extract_data_lines(&cassette.turns[0].response.sse) + .into_iter() + .filter_map(|line| { + let data = line.strip_prefix("data: ")?; + (data != "[DONE]").then(|| serde_json::from_str(data).expect("cassette SSE data should be JSON")) + }) + .collect() +} + +fn tool_search_websocket_events(cassette: &TurnCassette) -> Vec { + cassette.turns[0] + .response + .websocket + .iter() + .map(|message| serde_json::from_str(message).expect("cassette WebSocket message should be JSON")) + .collect() +} + +fn assert_tool_search_event_order(provider: &str, events: &[serde_json::Value]) { + let added_position = events + .iter() + .position(|event| event["type"] == "response.output_item.added" && event["item"]["type"] == "tool_search_call") + .unwrap_or_else(|| panic!("{provider} stream should add tool_search_call")); + let done_position = events + .iter() + .position(|event| event["type"] == "response.output_item.done" && event["item"]["type"] == "tool_search_call") + .unwrap_or_else(|| panic!("{provider} stream should complete tool_search_call")); + let completed_position = events + .iter() + .position(|event| event["type"] == "response.completed") + .unwrap_or_else(|| panic!("{provider} stream should complete the response")); + assert!( + added_position < done_position && done_position < completed_position, + "{provider} stream should add, finish, then publish the completed response" + ); + + let added = &events[added_position]; + let done = &events[done_position]; + assert_eq!(added["item"]["status"], "in_progress"); + assert_eq!(done["item"]["status"], "completed"); + assert_eq!(added["item"]["execution"], "client"); + assert_eq!(done["item"]["execution"], "client"); + assert_eq!(added["item"]["call_id"], done["item"]["call_id"]); + assert!( + added["item"]["call_id"] + .as_str() + .is_some_and(|call_id| !call_id.is_empty()), + "{provider} streaming tool_search_call should have a nonempty call_id" + ); + let completed_calls: Vec<_> = events[completed_position]["response"]["output"] + .as_array() + .unwrap_or_else(|| panic!("{provider} completed response should contain output")) + .iter() + .filter(|item| item["type"] == "tool_search_call") + .collect(); + assert_eq!( + completed_calls.len(), + 1, + "{provider} completed response should contain one tool_search_call" + ); + assert_eq!( + completed_calls[0]["call_id"], added["item"]["call_id"], + "{provider} tool_search_call should preserve call_id through response.completed output" + ); + assert_eq!(added["output_index"], done["output_index"]); + assert!( + !events + .iter() + .any(|event| { event["item"]["type"] == "function_call" && event["item"]["name"] == "tool_search" }) + ); +} + +fn assert_streaming_tool_search_order(provider: &str, cassette: &TurnCassette) { + assert_tool_search_event_order(provider, &tool_search_sse_events(cassette)); +} + +fn response_tool_summary(events: &[serde_json::Value], event_type: &str) -> serde_json::Value { + let lifecycle = events + .iter() + .find(|event| event["type"] == event_type) + .unwrap_or_else(|| panic!("streaming cassette should contain {event_type}")); + let tools = lifecycle["response"]["tools"] + .as_array() + .unwrap_or_else(|| panic!("{event_type} should expose tools")); + let search = tools + .iter() + .find(|tool| tool["type"] == "tool_search") + .unwrap_or_else(|| panic!("{event_type} should expose native tool_search")); + let deferred = tools + .iter() + .find(|tool| tool["type"] == "function" && tool["name"] == "get_shipping_eta") + .unwrap_or_else(|| panic!("{event_type} should expose get_shipping_eta")); + + serde_json::json!({ + "search": { + "execution": search["execution"], + "description": search["description"], + "parameters": search["parameters"], + }, + "deferred": { + "name": deferred["name"], + "description": deferred["description"], + "parameters": deferred["parameters"], + "strict": deferred["strict"], + "defer_loading": deferred["defer_loading"], + } + }) +} + +fn response_created_tool_summary(cassette: &TurnCassette) -> serde_json::Value { + response_tool_summary(&tool_search_sse_events(cassette), "response.created") +} + /// Extracts the `arguments` JSON string from the first function call in output items. fn get_first_fc_arguments(output: &[OutputItem]) -> String { output @@ -987,10 +1226,85 @@ fn test_web_search_accumulator_streaming_matches_openai() { assert_matching_web_search_output(&openai_output, &gateway_output); } +#[test] +fn test_tool_search_accumulator_nonstreaming_matches_openai_contract() { + let (openai, gateway) = load_tool_search_cassette_pair(false); + assert_native_client_tool_search_request("OpenAI", &openai); + assert_native_client_tool_search_request("gateway", &gateway); + + let openai_output = process_nonstreaming_turn(&openai, 0, TOOL_SEARCH_OPENAI_MODEL); + let gateway_output = process_nonstreaming_turn(&gateway, 0, TOOL_SEARCH_GATEWAY_MODEL); + let openai_call = assert_completed_client_tool_search("OpenAI", &openai_output); + let gateway_call = assert_completed_client_tool_search("gateway", &gateway_output); + + assert_eq!(gateway_call.execution, openai_call.execution); + assert_eq!(gateway_call.status, openai_call.status); +} + +#[test] +fn test_tool_search_accumulator_streaming_matches_openai_contract() { + let (openai, gateway) = load_tool_search_cassette_pair(true); + for (provider, cassette) in [("OpenAI", &openai), ("gateway", &gateway)] { + assert_native_client_tool_search_request(provider, cassette); + assert_streaming_tool_search_order(provider, cassette); + } + assert_eq!( + response_created_tool_summary(&gateway), + response_created_tool_summary(&openai), + "gateway response.created tools should match the OpenAI public surface" + ); + + let openai_output = process_streaming_turn(&openai, 0, TOOL_SEARCH_OPENAI_MODEL); + let gateway_output = process_streaming_turn(&gateway, 0, TOOL_SEARCH_GATEWAY_MODEL); + let openai_call = assert_completed_client_tool_search("OpenAI", &openai_output); + let gateway_call = assert_completed_client_tool_search("gateway", &gateway_output); + + assert_eq!(gateway_call.execution, openai_call.execution); + assert_eq!(gateway_call.status, openai_call.status); +} + +// ═══════════════════════════════════════════════════════════════════ +// Tool-search Responses WebSocket replay +// Raw WebSocket messages, not the recorder's SSE compatibility mirror // ═══════════════════════════════════════════════════════════════════ + +#[test] +fn test_tool_search_websocket_matches_openai_contract() { + let (openai, gateway) = load_tool_search_websocket_cassette_pair(); + let openai_events = tool_search_websocket_events(&openai); + let gateway_events = tool_search_websocket_events(&gateway); + + for (provider, cassette, events) in [ + ("OpenAI", &openai, openai_events.as_slice()), + ("gateway", &gateway, gateway_events.as_slice()), + ] { + assert_native_client_tool_search_request(provider, cassette); + assert_tool_search_event_order(provider, events); + assert!( + !events.iter().any(|event| event["type"] == "error"), + "{provider} WebSocket recording must not contain an error event" + ); + } + + for event_type in ["response.created", "response.in_progress", "response.completed"] { + assert_eq!( + response_tool_summary(&gateway_events, event_type), + response_tool_summary(&openai_events, event_type), + "gateway {event_type} tools should match the OpenAI public surface" + ); + } + + let openai_output = process_websocket_turn(&openai, 0, TOOL_SEARCH_OPENAI_MODEL); + let gateway_output = process_websocket_turn(&gateway, 0, TOOL_SEARCH_GATEWAY_MODEL); + let openai_call = assert_completed_client_tool_search("OpenAI WebSocket", &openai_output); + let gateway_call = assert_completed_client_tool_search("gateway WebSocket", &gateway_output); + + assert_eq!(gateway_call.execution, openai_call.execution); + assert_eq!(gateway_call.status, openai_call.status); +} + // Stateful 3-turn: get_job_status → get_error_logs → search_runbook // Non-streaming, store=true, previous_response_id chain -// ═══════════════════════════════════════════════════════════════════ #[test] fn test_stateful_responses_3turn_tool_calls() { diff --git a/crates/agentic-server-core/tests/cassettes/README.md b/crates/agentic-server-core/tests/cassettes/README.md index b5d31756..3b3c8d36 100644 --- a/crates/agentic-server-core/tests/cassettes/README.md +++ b/crates/agentic-server-core/tests/cassettes/README.md @@ -47,6 +47,7 @@ The recorder scripts (`record_reasoning_cassettes.sh`, `record_tool_call_cassett --output PATH Output YAML path --mode MODE responses | conv | isolation | mixed | store_true_then_store_false (default: conv) --stream / --no-stream Streaming or non-streaming (default: streaming) +--transport TRANSPORT http | websocket (default: http; WebSocket requires responses mode) --model NAME Model name sent in requests --no-store Set store=false --vllm URL vLLM upstream, e.g. http://localhost:8000 (responses mode only) @@ -158,6 +159,31 @@ turns: - "data: {...}\n" ``` +**Responses WebSocket turn -- `response.websocket` contains the raw JSON messages:** + +```yaml +turns: +- filename: t1 + request: + method: WEBSOCKET + path: /v1/responses + transport: websocket + body: + type: response.create + model: gpt-5.6 + input: Call tool_search. + response: + status_code: 101 + headers: + transport: websocket + websocket: + - '{"type":"response.created","response":{"status":"in_progress"}}' + - '{"type":"response.completed","response":{"status":"completed"}}' +``` + +The recorder also writes an SSE-formatted compatibility mirror for replay helpers, but WebSocket contract tests should +read `response.websocket` so they validate the recorded transport directly. + ## Recorder scripts | Script | Cassettes | Backend | @@ -168,6 +194,7 @@ turns: | `record_codex_cli_tool_call_cassettes.sh` | Codex function/namespace/custom-tool matrix | gateway, vLLM, and OpenAI | | `record_mcp_cassettes.sh` | Native MCP counter tool discovery and calls (streaming + non-streaming) | gateway and OpenAI reference | | `record_web_search_cassettes.sh` | Matching web-search calls (streaming + non-streaming) | gateway and OpenAI reference | +| `record_tool_search_cassettes.sh` | Client tool-search calls (HTTP streaming/non-streaming + Responses WebSocket) | gateway and OpenAI reference | ### Text-only (OpenAI) @@ -202,6 +229,27 @@ OPENAI_API_KEY=sk-... \ bash crates/agentic-server-core/tests/cassettes/record_web_search_cassettes.sh ``` +### Tool search (gateway and OpenAI) + +The wrapper defaults to both providers and both transport modes, producing six live recordings: HTTP streaming, +HTTP non-streaming, and Responses WebSocket for OpenAI `gpt-5.6`, plus the same three scenarios for the configured +gateway model. The default therefore calls the paid OpenAI API and the configured remote gateway/upstream. Use +`TOOL_SEARCH_RECORD_SET=gateway` or `TOOL_SEARCH_RECORD_SET=openai` for one provider, and use +`TOOL_SEARCH_TRANSPORT_SET=http` or `TOOL_SEARCH_TRANSPORT_SET=websocket` for one transport mode. + +```bash +OPENAI_API_KEY=sk-... GATEWAY_URL=http://127.0.0.1:3018 \ +bash crates/agentic-server-core/tests/cassettes/record_tool_search_cassettes.sh +``` + +Record only the Responses WebSocket cassettes: + +```bash +TOOL_SEARCH_TRANSPORT_SET=websocket OPENAI_API_KEY=sk-... \ +GATEWAY_URL=http://127.0.0.1:3018 \ +bash crates/agentic-server-core/tests/cassettes/record_tool_search_cassettes.sh +``` + ### Codex custom tools (gateway, vLLM, and OpenAI) The custom fixture uses a Lark grammar and records two turns: the model returns raw `custom_tool_call.input`, then the diff --git a/crates/agentic-server-core/tests/cassettes/record_tool_search_cassettes.sh b/crates/agentic-server-core/tests/cassettes/record_tool_search_cassettes.sh index 72f05755..79680456 100755 --- a/crates/agentic-server-core/tests/cassettes/record_tool_search_cassettes.sh +++ b/crates/agentic-server-core/tests/cassettes/record_tool_search_cassettes.sh @@ -1,36 +1,259 @@ #!/usr/bin/env bash -# Record the client-executed tool-search lifecycle against the OpenAI API. +# Records the same client-executed tool-search scenario against OpenAI and the gateway +# over HTTP and Responses WebSocket mode. # # Usage from the repository root: # OPENAI_API_KEY=sk-... \ # bash crates/agentic-server-core/tests/cassettes/record_tool_search_cassettes.sh +# TOOL_SEARCH_RECORD_SET=gateway GATEWAY_URL=http://127.0.0.1:3018 \ +# bash crates/agentic-server-core/tests/cassettes/record_tool_search_cassettes.sh +# TOOL_SEARCH_TRANSPORT_SET=websocket TOOL_SEARCH_RECORD_SET=all OPENAI_API_KEY=sk-... \ +# GATEWAY_URL=http://127.0.0.1:3018 \ +# bash crates/agentic-server-core/tests/cassettes/record_tool_search_cassettes.sh set -euo pipefail -CASSETTE_DIR="crates/agentic-server-core/tests/cassettes/tool_search" -PROMPT='You must call tool_search now to find the shipping ETA tool for order_42. Do not call get_shipping_eta yet and do not answer without calling tool_search.' +SCRIPTS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +BASE_DIR="$SCRIPTS_DIR/tool_search" +TOOLS_FILE="$BASE_DIR/tools.json" +GATEWAY_URL="${GATEWAY_URL:-http://localhost:9000}" +MODEL="${MODEL:-Qwen/Qwen3.6-35B-A3B}" +MODEL_SLUG="$(echo "$MODEL" | tr '/: ' '---')" +OPENAI_MODEL="${OPENAI_MODEL:-gpt-5.6}" +OPENAI_MODEL_SLUG="$(echo "$OPENAI_MODEL" | tr '/: ' '---')" +TOOL_SEARCH_RECORD_SET="${TOOL_SEARCH_RECORD_SET:-all}" +TOOL_SEARCH_TRANSPORT_SET="${TOOL_SEARCH_TRANSPORT_SET:-all}" +PROMPT='Call tool_search now to find the shipping ETA tool for order_42. Do not call get_shipping_eta yet and do not answer without calling tool_search.' + +validate_recording() { + local file="$1" + local stream_flag="$2" + local transport="$3" + + python - "$file" "$stream_flag" "$transport" <<'PY' +import json +import sys +from pathlib import Path + +import yaml + +path = Path(sys.argv[1]) +streaming = sys.argv[2] == "--stream" +transport = sys.argv[3] +document = yaml.safe_load(path.read_text(encoding="utf-8")) or {} +turns = document.get("turns") or [] +if len(turns) != 1: + raise SystemExit(f"ERROR: expected one recorded turn in {path}, found {len(turns)}") + +turn = turns[0] +request = (turn.get("request") or {}).get("body") or {} +tools = request.get("tools") or [] +search_tools = [tool for tool in tools if tool.get("type") == "tool_search"] +if len(search_tools) != 1 or search_tools[0].get("execution") != "client": + raise SystemExit("ERROR: cassette request must contain one client-executed tool_search declaration") +deferred = [tool for tool in tools if tool.get("name") == "get_shipping_eta"] +if ( + len(deferred) != 1 + or deferred[0].get("defer_loading") is not True + or deferred[0].get("strict") is not False +): + raise SystemExit("ERROR: cassette request must contain deferred get_shipping_eta with strict false") + +response = turn.get("response") or {} +if transport == "websocket": + if (turn.get("request") or {}).get("transport") != "websocket": + raise SystemExit("ERROR: WebSocket cassette request must identify the websocket transport") + if (turn.get("request") or {}).get("method") != "WEBSOCKET": + raise SystemExit("ERROR: WebSocket cassette request must use the WEBSOCKET method") + if request.get("type") != "response.create" or "stream" in request: + raise SystemExit("ERROR: WebSocket request must be response.create without the HTTP stream field") + if response.get("status_code") != 101: + raise SystemExit(f"ERROR: WebSocket recording did not upgrade: {response.get('status_code')}") +elif response.get("status_code") != 200: + raise SystemExit(f"ERROR: recording returned HTTP {response.get('status_code')}: {response.get('body')}") + +if streaming: + if transport == "websocket": + raw_events = response.get("websocket") or [] + if not raw_events: + raise SystemExit("ERROR: WebSocket recording must contain response.websocket messages") + else: + raw_events = [] + for raw in response.get("sse") or []: + raw_events.extend( + line.removeprefix("data: ") + for line in raw.splitlines() + if line.startswith("data: ") and line != "data: [DONE]" + ) + + events = [] + for raw in raw_events: + try: + events.append(json.loads(raw)) + except json.JSONDecodeError: + continue + errors = [event.get("error") for event in events if event.get("type") == "error"] + if errors: + raise SystemExit(f"ERROR: streaming recording returned an error event: {errors[0]}") + for event_type in ("response.created", "response.in_progress", "response.completed"): + lifecycle = [event.get("response") for event in events if event.get("type") == event_type] + if len(lifecycle) != 1: + raise SystemExit(f"ERROR: expected one {event_type} event, found {len(lifecycle)}") + lifecycle_tools = (lifecycle[0] or {}).get("tools") or [] + lifecycle_search = [tool for tool in lifecycle_tools if tool.get("type") == "tool_search"] + lifecycle_deferred = [tool for tool in lifecycle_tools if tool.get("name") == "get_shipping_eta"] + if len(lifecycle_search) != 1 or lifecycle_search[0].get("execution") != "client": + raise SystemExit(f"ERROR: {event_type} must expose native client tool_search") + if len(lifecycle_deferred) != 1 or lifecycle_deferred[0].get("defer_loading") is not True: + raise SystemExit(f"ERROR: {event_type} must preserve deferred get_shipping_eta") + if lifecycle_deferred[0].get("strict") is not False: + raise SystemExit(f"ERROR: {event_type} must preserve strict false on get_shipping_eta") + added = [ + (position, event.get("item") or {}) + for position, event in enumerate(events) + if event.get("type") == "response.output_item.added" + and (event.get("item") or {}).get("type") == "tool_search_call" + ] + done = [ + (position, event.get("item") or {}) + for position, event in enumerate(events) + if event.get("type") == "response.output_item.done" + and (event.get("item") or {}).get("type") == "tool_search_call" + ] + completed_positions = [ + position for position, event in enumerate(events) if event.get("type") == "response.completed" + ] + if len(added) != 1 or len(done) != 1 or len(completed_positions) != 1: + raise SystemExit("ERROR: expected one added, done, and completed tool-search lifecycle") + if not added[0][0] < done[0][0] < completed_positions[0]: + raise SystemExit("ERROR: tool-search lifecycle must be added, done, then response.completed") + added_call_id = added[0][1].get("call_id") + if not isinstance(added_call_id, str) or not added_call_id or done[0][1].get("call_id") != added_call_id: + raise SystemExit("ERROR: tool_search_call must preserve a nonempty call_id from added through done") + if added[0][1].get("status") != "in_progress" or done[0][1].get("status") != "completed": + raise SystemExit("ERROR: tool_search_call must transition from in_progress to completed") + completed = [event.get("response") for event in events if event.get("type") == "response.completed"] + body = completed[-1] if completed else None +else: + body = response.get("body") + +if not isinstance(body, dict) or body.get("status") != "completed": + raise SystemExit(f"ERROR: recording did not complete: {body}") +output = body.get("output") or [] +if any(item.get("type") == "function_call" and item.get("name") == "tool_search" for item in output): + raise SystemExit("ERROR: provider function fallback leaked instead of canonical tool_search_call") +if streaming and any( + event.get("item", {}).get("type") == "function_call" + and event.get("item", {}).get("name") == "tool_search" + for event in events +): + raise SystemExit("ERROR: provider function fallback leaked in a streaming event") +calls = [item for item in output if item.get("type") == "tool_search_call"] +if len(calls) != 1: + raise SystemExit(f"ERROR: expected one tool_search_call, found {len(calls)}") +call = calls[0] +if call.get("execution") != "client" or call.get("status") != "completed": + raise SystemExit(f"ERROR: tool_search_call is not a completed client call: {call}") +if not isinstance(call.get("call_id"), str) or not call["call_id"]: + raise SystemExit("ERROR: client tool_search_call must have a nonempty call_id") +if streaming and call["call_id"] != added_call_id: + raise SystemExit( + "ERROR: tool_search_call must preserve the same call_id in added, done, and response.completed output" + ) +PY +} -record_tool_search() { - local stream_flag="$1" - local suffix="$2" +record_single_turn() { + local endpoint_flag="$1" + local endpoint="$2" + local model="$3" + local output="$4" + local stream_flag="$5" + local transport="$6" + local temporary_output - printf '%s\n' "$PROMPT" \ - | python crates/agentic-server-core/tests/cassettes/record_cassette.py \ + temporary_output="$(mktemp "$BASE_DIR/.tool-search-cassette.XXXXXX")" + if ! printf '%s\n' "$PROMPT" \ + | python "$SCRIPTS_DIR/record_cassette.py" \ --mode responses \ --turns 1 \ + --transport "$transport" \ "$stream_flag" \ - --openai https://api.openai.com \ - --model "${OPENAI_TOOL_SEARCH_MODEL:-gpt-5.6}" \ - --tools "$CASSETTE_DIR/tools.json" \ + "$endpoint_flag" "$endpoint" \ + --model "$model" \ + --tools "$TOOLS_FILE" \ --tool-choice required \ --max-output-tokens 1024 \ - --output "$CASSETTE_DIR/tool-search-openai-reference-${OPENAI_TOOL_SEARCH_MODEL:-gpt-5.6}-${suffix}.yaml" + --output "$temporary_output" + then + rm -f -- "$temporary_output" + return 1 + fi + + if ! validate_recording "$temporary_output" "$stream_flag" "$transport"; then + rm -f -- "$temporary_output" + return 1 + fi + mv -- "$temporary_output" "$output" + printf 'Recorded %s\n' "$output" +} + +record_provider_suite() { + local endpoint_flag="$1" + local endpoint="$2" + local model="$3" + local output_prefix="$4" + + if [[ "$TOOL_SEARCH_TRANSPORT_SET" == "http" || "$TOOL_SEARCH_TRANSPORT_SET" == "all" ]]; then + record_single_turn \ + "$endpoint_flag" "$endpoint" "$model" "$BASE_DIR/${output_prefix}-streaming.yaml" --stream http + record_single_turn \ + "$endpoint_flag" "$endpoint" "$model" "$BASE_DIR/${output_prefix}-nonstreaming.yaml" --no-stream http + fi + if [[ "$TOOL_SEARCH_TRANSPORT_SET" == "websocket" || "$TOOL_SEARCH_TRANSPORT_SET" == "all" ]]; then + record_single_turn \ + "$endpoint_flag" "$endpoint" "$model" "$BASE_DIR/${output_prefix}-websocket-streaming.yaml" --stream websocket + fi } -if [[ -z "${OPENAI_API_KEY:-}" ]]; then - echo "ERROR: OPENAI_API_KEY must be set" >&2 +case "$TOOL_SEARCH_RECORD_SET" in + gateway|openai|all) ;; + *) + echo "ERROR: TOOL_SEARCH_RECORD_SET must be gateway, openai, or all" >&2 + exit 1 + ;; +esac + +case "$TOOL_SEARCH_TRANSPORT_SET" in + http|websocket|all) ;; + *) + echo "ERROR: TOOL_SEARCH_TRANSPORT_SET must be http, websocket, or all" >&2 + exit 1 + ;; +esac + +if [[ ! -f "$TOOLS_FILE" ]]; then + echo "ERROR: tool-search tools file does not exist: $TOOLS_FILE" >&2 exit 1 fi -record_tool_search --stream streaming -record_tool_search --no-stream nonstreaming +if [[ "$TOOL_SEARCH_RECORD_SET" == "openai" || "$TOOL_SEARCH_RECORD_SET" == "all" ]]; then + if [[ -z "${OPENAI_API_KEY:-}" ]]; then + echo "ERROR: OPENAI_API_KEY must be set for TOOL_SEARCH_RECORD_SET=$TOOL_SEARCH_RECORD_SET" >&2 + exit 1 + fi +fi + +mkdir -p "$BASE_DIR" + +if [[ "$TOOL_SEARCH_RECORD_SET" == "openai" || "$TOOL_SEARCH_RECORD_SET" == "all" ]]; then + record_provider_suite \ + --openai https://api.openai.com "$OPENAI_MODEL" \ + "tool-search-openai-reference-${OPENAI_MODEL_SLUG}" +fi + +if [[ "$TOOL_SEARCH_RECORD_SET" == "gateway" || "$TOOL_SEARCH_RECORD_SET" == "all" ]]; then + record_provider_suite \ + --gateway "$GATEWAY_URL" "$MODEL" \ + "tool-search-gateway-${MODEL_SLUG}" +fi diff --git a/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-nonstreaming.yaml b/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-nonstreaming.yaml new file mode 100644 index 00000000..dfb861bb --- /dev/null +++ b/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-nonstreaming.yaml @@ -0,0 +1,112 @@ +turns: +- filename: t1 + request: + body: + input: Call tool_search now to find the shipping ETA tool for order_42. Do not + call get_shipping_eta yet and do not answer without calling tool_search. + max_output_tokens: 1024 + model: Qwen/Qwen3.6-35B-A3B + store: true + stream: false + tool_choice: required + tools: + - description: Find the project-specific tools needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - defer_loading: true + description: Look up shipping ETA details for an order. + name: get_shipping_eta + parameters: + additionalProperties: false + properties: + order_id: + type: string + required: + - order_id + type: object + strict: false + type: function + headers: + accept: '*/*' + content-type: application/json + user-agent: python-httpx/0.28.1 + method: POST + path: /v1/responses + query_params: {} + response: + body: + conversation_id: null + created_at: 1785747790 + error: null + id: resp_019fc6dc-ce06-7692-9920-973930767b0a + incomplete_details: null + instructions: null + model: Qwen/Qwen3.6-35B-A3B + object: response + output: + - content: + - text: "The user wants me to call `tool_search` with the goal of finding\ + \ the shipping ETA tool for order_42.\nThey explicitly instructed me to\ + \ call `tool_search` now, not to call `get_shipping_eta` yet, and to answer\ + \ without calling `tool_search`.\nI will call `tool_search` with the goal\ + \ \"find the shipping ETA tool for order_42\".\nThen I will wait for the\ + \ response or provide the final answer based on the tool's response, but\ + \ the instruction says \"Do not call get_shipping_eta yet and do not answer\ + \ without calling tool_search.\" So I just need to make the tool call.\n\ + Parameters for tool_search:\ngoal: \"find the shipping ETA tool for order_42\"\ + \nLet's make the call. \nWait, the prompt says \"Call tool_search now\ + \ to find the shipping ETA tool for order_42.\"\nI will use the `tool_search`\ + \ tool.\nGoal: \"find the shipping ETA tool for order_42\"\nProceed. \n\ + Calling tool_search. \nThen I will output the result. \nWait, the instruction\ + \ says \"do not answer without calling tool_search\", which just means\ + \ I must call it first.\nI will generate the tool call now. \n`tool_search`\ + \ expects a string `goal`.\nLet's do it. \n`tool_search(goal=\"find the\ + \ shipping ETA tool for order_42\")`\nDone. \nWait, I should check the\ + \ exact wording. \"find the shipping ETA tool for order_42\" matches the\ + \ user request.\nProceeding. \n[Tool Call]\n`tool_search` with `goal:\ + \ \"find the shipping ETA tool for order_42\"`\nI will produce the tool\ + \ call. \n(Self-Correction/Verification during thought)\nIs there any\ + \ specific format needed? No, just standard tool calling.\nI'll proceed.\ + \ \nActually, the user said \"Call tool_search now to find the shipping\ + \ ETA tool for order_42.\"\nI will call `tool_search` with the exact goal.\n\ + Done. \nOutput matches. \nProceeding. \n[Tool Call Generation]\n`tool_search(goal=\"\ + find the shipping ETA tool for order_42\")`\n[Response Generation]\nI\ + \ will call the tool now. \n(Wait, I need to output the tool call in the\ + \ proper format)\nDone. \nProceeds. \n*Self-Correction/Note during generation*:\ + \ The prompt says \"Call tool_search now to find the shipping ETA tool\ + \ for order_42.\" I will just pass that string as the goal.\nReady. \n\ + Outputting tool call. \n`tool_search(goal=\"find the shipping ETA tool\ + \ for order_42\")`\nDone. \n[Proceeds]\n" + type: reasoning_text + encrypted_content: null + id: rs_019fc6dc-dac8-7eb0-9c66-9156fc668985 + status: null + summary: [] + type: reasoning + - arguments: + goal: find the shipping ETA tool for order_42 + call_id: chatcmpl-tool-a5590dca938d05db + execution: client + status: completed + type: tool_search_call + previous_response_id: null + status: completed + usage: + input_tokens: 390 + input_tokens_details: + cached_tokens: 0 + output_tokens: 612 + output_tokens_details: + reasoning_tokens: 536 + total_tokens: 1002 + headers: + content-type: application/json + status_code: 200 diff --git a/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-streaming.yaml b/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-streaming.yaml new file mode 100644 index 00000000..20e72436 --- /dev/null +++ b/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-streaming.yaml @@ -0,0 +1,1387 @@ +turns: +- filename: t1 + request: + body: + input: Call tool_search now to find the shipping ETA tool for order_42. Do not + call get_shipping_eta yet and do not answer without calling tool_search. + max_output_tokens: 1024 + model: Qwen/Qwen3.6-35B-A3B + store: true + stream: true + tool_choice: required + tools: + - description: Find the project-specific tools needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - defer_loading: true + description: Look up shipping ETA details for an order. + name: get_shipping_eta + parameters: + additionalProperties: false + properties: + order_id: + type: string + required: + - order_id + type: object + strict: false + type: function + headers: + accept: '*/*' + content-type: application/json + user-agent: python-httpx/0.28.1 + method: POST + path: /v1/responses + query_params: {} + response: + headers: + content-type: text/event-stream; charset=utf-8 + sse: + - 'data: {"type":"response.created","sequence_number":0,"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785748980,"error":null,"frequency_penalty":0.0,"id":"resp_019fc6ef-0379-72c3-8d97-7cd685cc7265","incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tools":[{"description":"Find + the project-specific tools needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"defer_loading":true,"description":"Look + up shipping ETA details for an order.","name":"get_shipping_eta","parameters":{"additionalProperties":false,"properties":{"order_id":{"type":"string"}},"required":["order_id"],"type":"object"},"strict":false,"type":"function"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null}} + + ' + - ' + + ' + - 'data: {"type":"response.in_progress","sequence_number":1,"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785748980,"error":null,"frequency_penalty":0.0,"id":"resp_019fc6ef-0379-72c3-8d97-7cd685cc7265","incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tools":[{"description":"Find + the project-specific tools needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"defer_loading":true,"description":"Look + up shipping ETA details for an order.","name":"get_shipping_eta","parameters":{"additionalProperties":false,"properties":{"order_id":{"type":"string"}},"required":["order_id"],"type":"object"},"strict":false,"type":"function"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null}} + + ' + - ' + + ' + - 'data: {"type":"response.output_item.added","sequence_number":2,"output_index":0,"item":{"content":[],"id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e","summary":[],"type":"reasoning"}} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":3,"output_index":0,"content_index":0,"delta":"The","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":4,"output_index":0,"content_index":0,"delta":" + user wants me","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":5,"output_index":0,"content_index":0,"delta":" + to call `","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":6,"output_index":0,"content_index":0,"delta":"tool_search`","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":7,"output_index":0,"content_index":0,"delta":" + with","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":8,"output_index":0,"content_index":0,"delta":" + the goal \"","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":9,"output_index":0,"content_index":0,"delta":"find + the shipping","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":10,"output_index":0,"content_index":0,"delta":" + ETA tool for","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":11,"output_index":0,"content_index":0,"delta":" + order_4","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":12,"output_index":0,"content_index":0,"delta":"2\".\n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":13,"output_index":0,"content_index":0,"delta":"I","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":14,"output_index":0,"content_index":0,"delta":" + must","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":15,"output_index":0,"content_index":0,"delta":" + not call `","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":16,"output_index":0,"content_index":0,"delta":"get_shipping_eta","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":17,"output_index":0,"content_index":0,"delta":"` + yet.","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":18,"output_index":0,"content_index":0,"delta":"\nI + must","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":19,"output_index":0,"content_index":0,"delta":" + call `tool","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":20,"output_index":0,"content_index":0,"delta":"_search` + first","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":21,"output_index":0,"content_index":0,"delta":".\n\nLet","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":22,"output_index":0,"content_index":0,"delta":"''s + construct","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":23,"output_index":0,"content_index":0,"delta":" + the `","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":24,"output_index":0,"content_index":0,"delta":"tool_search`","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":25,"output_index":0,"content_index":0,"delta":" + call.\n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":26,"output_index":0,"content_index":0,"delta":"`","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":27,"output_index":0,"content_index":0,"delta":"goal`: + \"","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":28,"output_index":0,"content_index":0,"delta":"find + the shipping","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":29,"output_index":0,"content_index":0,"delta":" + ETA tool for","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":30,"output_index":0,"content_index":0,"delta":" + order_4","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":31,"output_index":0,"content_index":0,"delta":"2\"\n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":32,"output_index":0,"content_index":0,"delta":"Then","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":33,"output_index":0,"content_index":0,"delta":",","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":34,"output_index":0,"content_index":0,"delta":" + I will proceed","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":35,"output_index":0,"content_index":0,"delta":".","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":36,"output_index":0,"content_index":0,"delta":"\n\nWait,","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":37,"output_index":0,"content_index":0,"delta":" + the prompt says","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":38,"output_index":0,"content_index":0,"delta":":","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":39,"output_index":0,"content_index":0,"delta":" + \"Call tool","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":40,"output_index":0,"content_index":0,"delta":"_search + now to","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":41,"output_index":0,"content_index":0,"delta":" + find the shipping","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":42,"output_index":0,"content_index":0,"delta":" + ETA tool for","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":43,"output_index":0,"content_index":0,"delta":" + order_4","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":44,"output_index":0,"content_index":0,"delta":"2. + Do","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":45,"output_index":0,"content_index":0,"delta":" + not call get","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":46,"output_index":0,"content_index":0,"delta":"_shipping_eta + yet","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":47,"output_index":0,"content_index":0,"delta":" + and do not","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":48,"output_index":0,"content_index":0,"delta":" + answer without calling","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":49,"output_index":0,"content_index":0,"delta":" + tool_search.\"","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":50,"output_index":0,"content_index":0,"delta":"\n\nI","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":51,"output_index":0,"content_index":0,"delta":" + will call `","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":52,"output_index":0,"content_index":0,"delta":"tool_search`","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":53,"output_index":0,"content_index":0,"delta":" + with the exact","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":54,"output_index":0,"content_index":0,"delta":" + goal.","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":55,"output_index":0,"content_index":0,"delta":"\nParameters","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":56,"output_index":0,"content_index":0,"delta":":\n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":57,"output_index":0,"content_index":0,"delta":"-","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":58,"output_index":0,"content_index":0,"delta":" + goal: \"","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":59,"output_index":0,"content_index":0,"delta":"find + the shipping","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":60,"output_index":0,"content_index":0,"delta":" + ETA tool for","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":61,"output_index":0,"content_index":0,"delta":" + order_4","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":62,"output_index":0,"content_index":0,"delta":"2\"\n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":63,"output_index":0,"content_index":0,"delta":"Type","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":64,"output_index":0,"content_index":0,"delta":": + object","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":65,"output_index":0,"content_index":0,"delta":".","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":66,"output_index":0,"content_index":0,"delta":"\nDone","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":67,"output_index":0,"content_index":0,"delta":". + \n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":68,"output_index":0,"content_index":0,"delta":"I","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":69,"output_index":0,"content_index":0,"delta":" + will generate","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":70,"output_index":0,"content_index":0,"delta":" + the tool call","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":71,"output_index":0,"content_index":0,"delta":" + now. \n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":72,"output_index":0,"content_index":0,"delta":"Checking","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":73,"output_index":0,"content_index":0,"delta":" + constraints","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":74,"output_index":0,"content_index":0,"delta":": + \"You","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":75,"output_index":0,"content_index":0,"delta":" + must call at","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":76,"output_index":0,"content_index":0,"delta":" + least one available","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":77,"output_index":0,"content_index":0,"delta":" + tool before producing","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":78,"output_index":0,"content_index":0,"delta":" + the final answer","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":79,"output_index":0,"content_index":0,"delta":".","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":80,"output_index":0,"content_index":0,"delta":" + Do not answer","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":81,"output_index":0,"content_index":0,"delta":" + directly without a","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":82,"output_index":0,"content_index":0,"delta":" + tool call.\"","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":83,"output_index":0,"content_index":0,"delta":" + -> S","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":84,"output_index":0,"content_index":0,"delta":"atisfied.\n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":85,"output_index":0,"content_index":0,"delta":"Proceed. + \n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":86,"output_index":0,"content_index":0,"delta":"Output","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":87,"output_index":0,"content_index":0,"delta":" + matches the","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":88,"output_index":0,"content_index":0,"delta":" + tool schema","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":89,"output_index":0,"content_index":0,"delta":".\n`","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":90,"output_index":0,"content_index":0,"delta":"tool_search(goal","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":91,"output_index":0,"content_index":0,"delta":"=\"find + the","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":92,"output_index":0,"content_index":0,"delta":" + shipping ETA tool","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":93,"output_index":0,"content_index":0,"delta":" + for order_","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":94,"output_index":0,"content_index":0,"delta":"42\")","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":95,"output_index":0,"content_index":0,"delta":"`\nDone","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":96,"output_index":0,"content_index":0,"delta":". + \nWait","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":97,"output_index":0,"content_index":0,"delta":", + should","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":98,"output_index":0,"content_index":0,"delta":" + I include","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":99,"output_index":0,"content_index":0,"delta":" + order","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":100,"output_index":0,"content_index":0,"delta":"_","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":101,"output_index":0,"content_index":0,"delta":"42 + in","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":102,"output_index":0,"content_index":0,"delta":" + the goal?","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":103,"output_index":0,"content_index":0,"delta":" + Yes, the","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":104,"output_index":0,"content_index":0,"delta":" + prompt says \"","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":105,"output_index":0,"content_index":0,"delta":"find","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":106,"output_index":0,"content_index":0,"delta":" + the shipping ETA","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":107,"output_index":0,"content_index":0,"delta":" + tool for order","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":108,"output_index":0,"content_index":0,"delta":"_42","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":109,"output_index":0,"content_index":0,"delta":"\". + I","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":110,"output_index":0,"content_index":0,"delta":"''ll + just pass","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":111,"output_index":0,"content_index":0,"delta":" + that string","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":112,"output_index":0,"content_index":0,"delta":".\nLet","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":113,"output_index":0,"content_index":0,"delta":"''s + call","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":114,"output_index":0,"content_index":0,"delta":" + it. \n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":115,"output_index":0,"content_index":0,"delta":"Proceed","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":116,"output_index":0,"content_index":0,"delta":".","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":117,"output_index":0,"content_index":0,"delta":" + \n[Tool","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":118,"output_index":0,"content_index":0,"delta":" + Call Generation","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":119,"output_index":0,"content_index":0,"delta":"]\n`","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":120,"output_index":0,"content_index":0,"delta":"{\"","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":121,"output_index":0,"content_index":0,"delta":"name\": + \"","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":122,"output_index":0,"content_index":0,"delta":"tool_search\",","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":123,"output_index":0,"content_index":0,"delta":" + \"arguments\":","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":124,"output_index":0,"content_index":0,"delta":" + {\"goal\":","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":125,"output_index":0,"content_index":0,"delta":" + \"find the","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":126,"output_index":0,"content_index":0,"delta":" + shipping ETA tool","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":127,"output_index":0,"content_index":0,"delta":" + for order_","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":128,"output_index":0,"content_index":0,"delta":"42\"}}","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":129,"output_index":0,"content_index":0,"delta":"`\nI","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":130,"output_index":0,"content_index":0,"delta":" + will output this","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":131,"output_index":0,"content_index":0,"delta":". + \nDone","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":132,"output_index":0,"content_index":0,"delta":". + \n(Self","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":133,"output_index":0,"content_index":0,"delta":"-Correction","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":134,"output_index":0,"content_index":0,"delta":"/Verification + during","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":135,"output_index":0,"content_index":0,"delta":" + thought)\n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":136,"output_index":0,"content_index":0,"delta":"Is","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":137,"output_index":0,"content_index":0,"delta":" + there","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":138,"output_index":0,"content_index":0,"delta":" + any specific","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":139,"output_index":0,"content_index":0,"delta":" + format?","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":140,"output_index":0,"content_index":0,"delta":" + Standard","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":141,"output_index":0,"content_index":0,"delta":" + JSON for","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":142,"output_index":0,"content_index":0,"delta":" + function","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":143,"output_index":0,"content_index":0,"delta":" + calling","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":144,"output_index":0,"content_index":0,"delta":".\nThe","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":145,"output_index":0,"content_index":0,"delta":" + goal","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":146,"output_index":0,"content_index":0,"delta":" + is exactly","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":147,"output_index":0,"content_index":0,"delta":" + as requested.","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":148,"output_index":0,"content_index":0,"delta":"\nReady.","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":149,"output_index":0,"content_index":0,"delta":" + \nProceeds","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":150,"output_index":0,"content_index":0,"delta":". + \n[","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":151,"output_index":0,"content_index":0,"delta":"Output + Generation]","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":152,"output_index":0,"content_index":0,"delta":" + -> calls","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":153,"output_index":0,"content_index":0,"delta":" + tool_search.","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":154,"output_index":0,"content_index":0,"delta":"\n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":155,"output_index":0,"content_index":0,"delta":"Wait","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":156,"output_index":0,"content_index":0,"delta":", + let","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":157,"output_index":0,"content_index":0,"delta":"''s + verify","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":158,"output_index":0,"content_index":0,"delta":" + the `","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":159,"output_index":0,"content_index":0,"delta":"get","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":160,"output_index":0,"content_index":0,"delta":"_shipping_eta`","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":161,"output_index":0,"content_index":0,"delta":" + tool","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":162,"output_index":0,"content_index":0,"delta":" + description.","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":163,"output_index":0,"content_index":0,"delta":" + It takes","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":164,"output_index":0,"content_index":0,"delta":" + `order_id","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":165,"output_index":0,"content_index":0,"delta":"`.\nThe","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":166,"output_index":0,"content_index":0,"delta":" + user specifically","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":167,"output_index":0,"content_index":0,"delta":" + says \"Call","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":168,"output_index":0,"content_index":0,"delta":" + tool_search now","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":169,"output_index":0,"content_index":0,"delta":" + to","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":170,"output_index":0,"content_index":0,"delta":" + find the shipping","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":171,"output_index":0,"content_index":0,"delta":" + ETA tool for","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":172,"output_index":0,"content_index":0,"delta":" + order_4","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":173,"output_index":0,"content_index":0,"delta":"2.\"","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":174,"output_index":0,"content_index":0,"delta":"\nSo + the","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":175,"output_index":0,"content_index":0,"delta":" + goal string is","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":176,"output_index":0,"content_index":0,"delta":" + fine","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":177,"output_index":0,"content_index":0,"delta":".\nAll","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":178,"output_index":0,"content_index":0,"delta":" + good. \n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":179,"output_index":0,"content_index":0,"delta":"Proceeds","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":180,"output_index":0,"content_index":0,"delta":". + \n[","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":181,"output_index":0,"content_index":0,"delta":"Output] + ->","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":182,"output_index":0,"content_index":0,"delta":" + tool_call","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":183,"output_index":0,"content_index":0,"delta":".\n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.done","sequence_number":184,"output_index":0,"content_index":0,"item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e","text":"The + user wants me to call `tool_search` with the goal \"find the shipping ETA tool + for order_42\".\nI must not call `get_shipping_eta` yet.\nI must call `tool_search` + first.\n\nLet''s construct the `tool_search` call.\n`goal`: \"find the shipping + ETA tool for order_42\"\nThen, I will proceed.\n\nWait, the prompt says: \"Call + tool_search now to find the shipping ETA tool for order_42. Do not call get_shipping_eta + yet and do not answer without calling tool_search.\"\n\nI will call `tool_search` + with the exact goal.\nParameters:\n- goal: \"find the shipping ETA tool for + order_42\"\nType: object.\nDone. \nI will generate the tool call now. \nChecking + constraints: \"You must call at least one available tool before producing the + final answer. Do not answer directly without a tool call.\" -> Satisfied.\nProceed. + \nOutput matches the tool schema.\n`tool_search(goal=\"find the shipping ETA + tool for order_42\")`\nDone. \nWait, should I include order_42 in the goal? + Yes, the prompt says \"find the shipping ETA tool for order_42\". I''ll just + pass that string.\nLet''s call it. \nProceed. \n[Tool Call Generation]\n`{\"name\": + \"tool_search\", \"arguments\": {\"goal\": \"find the shipping ETA tool for + order_42\"}}`\nI will output this. \nDone. \n(Self-Correction/Verification during + thought)\nIs there any specific format? Standard JSON for function calling.\nThe + goal is exactly as requested.\nReady. \nProceeds. \n[Output Generation] -> calls + tool_search.\nWait, let''s verify the `get_shipping_eta` tool description. It + takes `order_id`.\nThe user specifically says \"Call tool_search now to find + the shipping ETA tool for order_42.\"\nSo the goal string is fine.\nAll good. + \nProceeds. \n[Output] -> tool_call.\n"} + + ' + - ' + + ' + - 'data: {"type":"response.output_item.done","sequence_number":185,"output_index":0,"item":{"content":[{"text":"The + user wants me to call `tool_search` with the goal \"find the shipping ETA tool + for order_42\".\nI must not call `get_shipping_eta` yet.\nI must call `tool_search` + first.\n\nLet''s construct the `tool_search` call.\n`goal`: \"find the shipping + ETA tool for order_42\"\nThen, I will proceed.\n\nWait, the prompt says: \"Call + tool_search now to find the shipping ETA tool for order_42. Do not call get_shipping_eta + yet and do not answer without calling tool_search.\"\n\nI will call `tool_search` + with the exact goal.\nParameters:\n- goal: \"find the shipping ETA tool for + order_42\"\nType: object.\nDone. \nI will generate the tool call now. \nChecking + constraints: \"You must call at least one available tool before producing the + final answer. Do not answer directly without a tool call.\" -> Satisfied.\nProceed. + \nOutput matches the tool schema.\n`tool_search(goal=\"find the shipping ETA + tool for order_42\")`\nDone. \nWait, should I include order_42 in the goal? + Yes, the prompt says \"find the shipping ETA tool for order_42\". I''ll just + pass that string.\nLet''s call it. \nProceed. \n[Tool Call Generation]\n`{\"name\": + \"tool_search\", \"arguments\": {\"goal\": \"find the shipping ETA tool for + order_42\"}}`\nI will output this. \nDone. \n(Self-Correction/Verification during + thought)\nIs there any specific format? Standard JSON for function calling.\nThe + goal is exactly as requested.\nReady. \nProceeds. \n[Output Generation] -> calls + tool_search.\nWait, let''s verify the `get_shipping_eta` tool description. It + takes `order_id`.\nThe user specifically says \"Call tool_search now to find + the shipping ETA tool for order_42.\"\nSo the goal string is fine.\nAll good. + \nProceeds. \n[Output] -> tool_call.\n","type":"reasoning_text"}],"id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e","summary":[],"type":"reasoning"}} + + ' + - ' + + ' + - 'data: {"type":"response.output_item.added","sequence_number":186,"output_index":1,"item":{"arguments":{},"call_id":"chatcmpl-tool-829878a979789c2f","execution":"client","status":"in_progress","type":"tool_search_call"}} + + ' + - ' + + ' + - 'data: {"type":"response.output_item.done","sequence_number":187,"output_index":1,"item":{"arguments":{"goal":"find + the shipping ETA tool for order_42"},"call_id":"chatcmpl-tool-829878a979789c2f","execution":"client","status":"completed","type":"tool_search_call"}} + + ' + - ' + + ' + - 'data: {"type":"response.completed","sequence_number":188,"response":{"conversation_id":null,"created_at":1785748983,"error":null,"id":"resp_019fc6ef-0379-72c3-8d97-7cd685cc7265","incomplete_details":null,"instructions":null,"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[{"content":[{"text":"The + user wants me to call `tool_search` with the goal \"find the shipping ETA tool + for order_42\".\nI must not call `get_shipping_eta` yet.\nI must call `tool_search` + first.\n\nLet''s construct the `tool_search` call.\n`goal`: \"find the shipping + ETA tool for order_42\"\nThen, I will proceed.\n\nWait, the prompt says: \"Call + tool_search now to find the shipping ETA tool for order_42. Do not call get_shipping_eta + yet and do not answer without calling tool_search.\"\n\nI will call `tool_search` + with the exact goal.\nParameters:\n- goal: \"find the shipping ETA tool for + order_42\"\nType: object.\nDone. \nI will generate the tool call now. \nChecking + constraints: \"You must call at least one available tool before producing the + final answer. Do not answer directly without a tool call.\" -> Satisfied.\nProceed. + \nOutput matches the tool schema.\n`tool_search(goal=\"find the shipping ETA + tool for order_42\")`\nDone. \nWait, should I include order_42 in the goal? + Yes, the prompt says \"find the shipping ETA tool for order_42\". I''ll just + pass that string.\nLet''s call it. \nProceed. \n[Tool Call Generation]\n`{\"name\": + \"tool_search\", \"arguments\": {\"goal\": \"find the shipping ETA tool for + order_42\"}}`\nI will output this. \nDone. \n(Self-Correction/Verification during + thought)\nIs there any specific format? Standard JSON for function calling.\nThe + goal is exactly as requested.\nReady. \nProceeds. \n[Output Generation] -> calls + tool_search.\nWait, let''s verify the `get_shipping_eta` tool description. It + takes `order_id`.\nThe user specifically says \"Call tool_search now to find + the shipping ETA tool for order_42.\"\nSo the goal string is fine.\nAll good. + \nProceeds. \n[Output] -> tool_call.\n","type":"reasoning_text"}],"encrypted_content":null,"id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e","status":null,"summary":[],"type":"reasoning"},{"arguments":{"goal":"find + the shipping ETA tool for order_42"},"call_id":"chatcmpl-tool-829878a979789c2f","execution":"client","status":"completed","type":"tool_search_call"}],"previous_response_id":null,"status":"completed","tools":[{"description":"Find + the project-specific tools needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"defer_loading":true,"description":"Look + up shipping ETA details for an order.","name":"get_shipping_eta","parameters":{"additionalProperties":false,"properties":{"order_id":{"type":"string"}},"required":["order_id"],"type":"object"},"strict":false,"type":"function"}],"usage":{"input_tokens":390,"input_tokens_details":{"cached_tokens":0},"output_tokens":477,"output_tokens_details":{"reasoning_tokens":405},"total_tokens":867}}} + + ' + - ' + + ' + - 'data: [DONE] + + ' + - ' + + ' + status_code: 200 diff --git a/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-websocket-streaming.yaml b/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-websocket-streaming.yaml new file mode 100644 index 00000000..fc46d7d2 --- /dev/null +++ b/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-websocket-streaming.yaml @@ -0,0 +1,574 @@ +turns: +- filename: t1 + request: + body: + input: Call tool_search now to find the shipping ETA tool for order_42. Do not + call get_shipping_eta yet and do not answer without calling tool_search. + max_output_tokens: 1024 + model: Qwen/Qwen3.6-35B-A3B + store: true + tool_choice: required + tools: + - description: Find the project-specific tools needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - defer_loading: true + description: Look up shipping ETA details for an order. + name: get_shipping_eta + parameters: + additionalProperties: false + properties: + order_id: + type: string + required: + - order_id + type: object + strict: false + type: function + type: response.create + headers: {} + method: WEBSOCKET + path: /v1/responses + query_params: {} + transport: websocket + response: + headers: + transport: websocket + sse: + - 'data: {"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785752313,"error":null,"frequency_penalty":0.0,"id":"resp_019fc721-df81-7ea3-9e8d-c240136387c5","incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tools":[{"description":"Find + the project-specific tools needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"defer_loading":true,"description":"Look + up shipping ETA details for an order.","name":"get_shipping_eta","parameters":{"additionalProperties":false,"properties":{"order_id":{"type":"string"}},"required":["order_id"],"type":"object"},"strict":false,"type":"function"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null},"sequence_number":0,"type":"response.created"} + + ' + - 'data: {"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785752313,"error":null,"frequency_penalty":0.0,"id":"resp_019fc721-df81-7ea3-9e8d-c240136387c5","incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tools":[{"description":"Find + the project-specific tools needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"defer_loading":true,"description":"Look + up shipping ETA details for an order.","name":"get_shipping_eta","parameters":{"additionalProperties":false,"properties":{"order_id":{"type":"string"}},"required":["order_id"],"type":"object"},"strict":false,"type":"function"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null},"sequence_number":1,"type":"response.in_progress"} + + ' + - 'data: {"item":{"content":[],"id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","summary":[],"type":"reasoning"},"output_index":0,"sequence_number":2,"type":"response.output_item.added"} + + ' + - 'data: {"content_index":0,"delta":"The","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":3,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" user wants me","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":4,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" to call `","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":5,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"tool_search`","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":6,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" to find the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":7,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" shipping ETA tool","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":8,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" for \"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":9,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"order_4","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":10,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"2\".\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":11,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"They","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":12,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" explicitly state:","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":13,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":14,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"1","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":15,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":". Call tool","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":16,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_search now.","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":17,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\n2.","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":18,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" Do not call","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":19,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" get_shipping_eta","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":20,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" yet.\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":21,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"3. Do","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":22,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" not answer without","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":23,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" calling tool_search","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":24,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".\n\nThe","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":25,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" goal for","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":26,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" `tool_search","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":27,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"` is","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":28,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" to","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":29,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" find the project","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":30,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"-specific tools needed","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":31,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" to continue the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":32,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" task. The","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":33,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" goal string","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":34,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" should be \"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":35,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"shipping","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":36,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" ETA tool for","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":37,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" order_4","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":38,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"2\".\n\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":39,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Let''s call","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":40,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" `tool_search","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":41,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"` with the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":42,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" goal parameter","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":43,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".\nThen","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":44,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" I will wait","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":45,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" for the response","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":46,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" before doing","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":47,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" anything else.","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":48,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\nActually","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":49,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":", the prompt","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":50,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" says \"Call","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":51,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" tool_search now","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":52,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" to find the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":53,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" shipping ETA tool","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":54,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" for order_","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":55,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"42.\"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":56,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" So","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":57,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":58,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" goal is \"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":59,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"find","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":60,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" the shipping ETA","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":61,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" tool for order","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":62,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_42","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":63,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\".\n\nLet","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":64,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"''s make the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":65,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" tool call.","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":66,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" \n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":67,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Parameters","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":68,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":": goal =","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":69,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" \"find the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":70,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" shipping ETA tool","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":71,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" for order_","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":72,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"42\"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":73,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\nI","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":74,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" will execute this","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":75,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" now","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":76,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":". \nAfter","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":77,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" receiving","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":78,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" the result","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":79,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":", I will","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":80,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" proceed","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":81,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" according","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":82,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" to instructions","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":83,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":84,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":85,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Wait, the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":86,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" instruction says \"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":87,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Do not call","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":88,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" get_shipping_eta","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":89,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" yet and do","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":90,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" not answer without","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":91,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" calling tool_search","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":92,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".\" This","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":93,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" implies I just","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":94,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" need to call","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":95,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" tool_search first","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":96,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".\n\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":97,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"I","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":98,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"''ll","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":99,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" call tool_search","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":100,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":101,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":102,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":103,"text":"The + user wants me to call `tool_search` to find the shipping ETA tool for \"order_42\".\nThey + explicitly state:\n1. Call tool_search now.\n2. Do not call get_shipping_eta + yet.\n3. Do not answer without calling tool_search.\n\nThe goal for `tool_search` + is to find the project-specific tools needed to continue the task. The goal + string should be \"shipping ETA tool for order_42\".\n\nLet''s call `tool_search` + with the goal parameter.\nThen I will wait for the response before doing anything + else.\nActually, the prompt says \"Call tool_search now to find the shipping + ETA tool for order_42.\" So the goal is \"find the shipping ETA tool for order_42\".\n\nLet''s + make the tool call. \nParameters: goal = \"find the shipping ETA tool for order_42\"\nI + will execute this now. \nAfter receiving the result, I will proceed according + to instructions.\nWait, the instruction says \"Do not call get_shipping_eta + yet and do not answer without calling tool_search.\" This implies I just need + to call tool_search first.\n\nI''ll call tool_search.\n","type":"response.reasoning_text.done"} + + ' + - 'data: {"item":{"content":[{"text":"The user wants me to call `tool_search` + to find the shipping ETA tool for \"order_42\".\nThey explicitly state:\n1. + Call tool_search now.\n2. Do not call get_shipping_eta yet.\n3. Do not answer + without calling tool_search.\n\nThe goal for `tool_search` is to find the project-specific + tools needed to continue the task. The goal string should be \"shipping ETA + tool for order_42\".\n\nLet''s call `tool_search` with the goal parameter.\nThen + I will wait for the response before doing anything else.\nActually, the prompt + says \"Call tool_search now to find the shipping ETA tool for order_42.\" So + the goal is \"find the shipping ETA tool for order_42\".\n\nLet''s make the + tool call. \nParameters: goal = \"find the shipping ETA tool for order_42\"\nI + will execute this now. \nAfter receiving the result, I will proceed according + to instructions.\nWait, the instruction says \"Do not call get_shipping_eta + yet and do not answer without calling tool_search.\" This implies I just need + to call tool_search first.\n\nI''ll call tool_search.\n","type":"reasoning_text"}],"id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","summary":[],"type":"reasoning"},"output_index":0,"sequence_number":104,"type":"response.output_item.done"} + + ' + - 'data: {"item":{"arguments":{},"call_id":"chatcmpl-tool-9b30cda411635646","execution":"client","status":"in_progress","type":"tool_search_call"},"output_index":1,"sequence_number":105,"type":"response.output_item.added"} + + ' + - 'data: {"item":{"arguments":{"goal":"find the shipping ETA tool for order_42"},"call_id":"chatcmpl-tool-9b30cda411635646","execution":"client","status":"completed","type":"tool_search_call"},"output_index":1,"sequence_number":106,"type":"response.output_item.done"} + + ' + - 'data: {"response":{"conversation_id":null,"created_at":1785752315,"error":null,"id":"resp_019fc721-df81-7ea3-9e8d-c240136387c5","incomplete_details":null,"instructions":null,"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[{"content":[{"text":"The + user wants me to call `tool_search` to find the shipping ETA tool for \"order_42\".\nThey + explicitly state:\n1. Call tool_search now.\n2. Do not call get_shipping_eta + yet.\n3. Do not answer without calling tool_search.\n\nThe goal for `tool_search` + is to find the project-specific tools needed to continue the task. The goal + string should be \"shipping ETA tool for order_42\".\n\nLet''s call `tool_search` + with the goal parameter.\nThen I will wait for the response before doing anything + else.\nActually, the prompt says \"Call tool_search now to find the shipping + ETA tool for order_42.\" So the goal is \"find the shipping ETA tool for order_42\".\n\nLet''s + make the tool call. \nParameters: goal = \"find the shipping ETA tool for order_42\"\nI + will execute this now. \nAfter receiving the result, I will proceed according + to instructions.\nWait, the instruction says \"Do not call get_shipping_eta + yet and do not answer without calling tool_search.\" This implies I just need + to call tool_search first.\n\nI''ll call tool_search.\n","type":"reasoning_text"}],"encrypted_content":null,"id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","status":null,"summary":[],"type":"reasoning"},{"arguments":{"goal":"find + the shipping ETA tool for order_42"},"call_id":"chatcmpl-tool-9b30cda411635646","execution":"client","status":"completed","type":"tool_search_call"}],"previous_response_id":null,"status":"completed","tools":[{"description":"Find + the project-specific tools needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"defer_loading":true,"description":"Look + up shipping ETA details for an order.","name":"get_shipping_eta","parameters":{"additionalProperties":false,"properties":{"order_id":{"type":"string"}},"required":["order_id"],"type":"object"},"strict":false,"type":"function"}],"usage":{"input_tokens":390,"input_tokens_details":{"cached_tokens":0},"output_tokens":284,"output_tokens_details":{"reasoning_tokens":228},"total_tokens":674}},"sequence_number":107,"type":"response.completed"} + + ' + - 'data: [DONE] + + ' + status_code: 101 + websocket: + - '{"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785752313,"error":null,"frequency_penalty":0.0,"id":"resp_019fc721-df81-7ea3-9e8d-c240136387c5","incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tools":[{"description":"Find + the project-specific tools needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"defer_loading":true,"description":"Look + up shipping ETA details for an order.","name":"get_shipping_eta","parameters":{"additionalProperties":false,"properties":{"order_id":{"type":"string"}},"required":["order_id"],"type":"object"},"strict":false,"type":"function"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null},"sequence_number":0,"type":"response.created"}' + - '{"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785752313,"error":null,"frequency_penalty":0.0,"id":"resp_019fc721-df81-7ea3-9e8d-c240136387c5","incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tools":[{"description":"Find + the project-specific tools needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"defer_loading":true,"description":"Look + up shipping ETA details for an order.","name":"get_shipping_eta","parameters":{"additionalProperties":false,"properties":{"order_id":{"type":"string"}},"required":["order_id"],"type":"object"},"strict":false,"type":"function"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null},"sequence_number":1,"type":"response.in_progress"}' + - '{"item":{"content":[],"id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","summary":[],"type":"reasoning"},"output_index":0,"sequence_number":2,"type":"response.output_item.added"}' + - '{"content_index":0,"delta":"The","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":3,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" user wants me","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":4,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" to call `","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":5,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"tool_search`","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":6,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" to find the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":7,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" shipping ETA tool","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":8,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" for \"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":9,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"order_4","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":10,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"2\".\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":11,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"They","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":12,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" explicitly state:","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":13,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":14,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"1","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":15,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":". Call tool","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":16,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_search now.","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":17,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\n2.","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":18,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" Do not call","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":19,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" get_shipping_eta","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":20,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" yet.\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":21,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"3. Do","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":22,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" not answer without","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":23,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" calling tool_search","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":24,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".\n\nThe","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":25,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" goal for","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":26,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" `tool_search","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":27,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"` is","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":28,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" to","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":29,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" find the project","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":30,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"-specific tools needed","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":31,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" to continue the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":32,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" task. The","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":33,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" goal string","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":34,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" should be \"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":35,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"shipping","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":36,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" ETA tool for","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":37,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" order_4","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":38,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"2\".\n\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":39,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Let''s call","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":40,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" `tool_search","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":41,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"` with the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":42,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" goal parameter","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":43,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".\nThen","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":44,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" I will wait","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":45,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" for the response","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":46,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" before doing","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":47,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" anything else.","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":48,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\nActually","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":49,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":", the prompt","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":50,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" says \"Call","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":51,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" tool_search now","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":52,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" to find the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":53,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" shipping ETA tool","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":54,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" for order_","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":55,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"42.\"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":56,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" So","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":57,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":58,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" goal is \"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":59,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"find","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":60,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" the shipping ETA","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":61,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" tool for order","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":62,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_42","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":63,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\".\n\nLet","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":64,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"''s make the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":65,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" tool call.","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":66,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" \n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":67,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Parameters","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":68,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":": goal =","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":69,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" \"find the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":70,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" shipping ETA tool","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":71,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" for order_","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":72,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"42\"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":73,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\nI","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":74,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" will execute this","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":75,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" now","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":76,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":". \nAfter","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":77,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" receiving","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":78,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" the result","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":79,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":", I will","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":80,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" proceed","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":81,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" according","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":82,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" to instructions","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":83,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":84,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":85,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Wait, the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":86,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" instruction says \"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":87,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Do not call","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":88,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" get_shipping_eta","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":89,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" yet and do","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":90,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" not answer without","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":91,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" calling tool_search","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":92,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".\" This","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":93,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" implies I just","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":94,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" need to call","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":95,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" tool_search first","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":96,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".\n\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":97,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"I","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":98,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"''ll","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":99,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" call tool_search","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":100,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":101,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":102,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":103,"text":"The + user wants me to call `tool_search` to find the shipping ETA tool for \"order_42\".\nThey + explicitly state:\n1. Call tool_search now.\n2. Do not call get_shipping_eta + yet.\n3. Do not answer without calling tool_search.\n\nThe goal for `tool_search` + is to find the project-specific tools needed to continue the task. The goal + string should be \"shipping ETA tool for order_42\".\n\nLet''s call `tool_search` + with the goal parameter.\nThen I will wait for the response before doing anything + else.\nActually, the prompt says \"Call tool_search now to find the shipping + ETA tool for order_42.\" So the goal is \"find the shipping ETA tool for order_42\".\n\nLet''s + make the tool call. \nParameters: goal = \"find the shipping ETA tool for order_42\"\nI + will execute this now. \nAfter receiving the result, I will proceed according + to instructions.\nWait, the instruction says \"Do not call get_shipping_eta + yet and do not answer without calling tool_search.\" This implies I just need + to call tool_search first.\n\nI''ll call tool_search.\n","type":"response.reasoning_text.done"}' + - '{"item":{"content":[{"text":"The user wants me to call `tool_search` to find + the shipping ETA tool for \"order_42\".\nThey explicitly state:\n1. Call tool_search + now.\n2. Do not call get_shipping_eta yet.\n3. Do not answer without calling + tool_search.\n\nThe goal for `tool_search` is to find the project-specific tools + needed to continue the task. The goal string should be \"shipping ETA tool for + order_42\".\n\nLet''s call `tool_search` with the goal parameter.\nThen I will + wait for the response before doing anything else.\nActually, the prompt says + \"Call tool_search now to find the shipping ETA tool for order_42.\" So the + goal is \"find the shipping ETA tool for order_42\".\n\nLet''s make the tool + call. \nParameters: goal = \"find the shipping ETA tool for order_42\"\nI will + execute this now. \nAfter receiving the result, I will proceed according to + instructions.\nWait, the instruction says \"Do not call get_shipping_eta yet + and do not answer without calling tool_search.\" This implies I just need to + call tool_search first.\n\nI''ll call tool_search.\n","type":"reasoning_text"}],"id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","summary":[],"type":"reasoning"},"output_index":0,"sequence_number":104,"type":"response.output_item.done"}' + - '{"item":{"arguments":{},"call_id":"chatcmpl-tool-9b30cda411635646","execution":"client","status":"in_progress","type":"tool_search_call"},"output_index":1,"sequence_number":105,"type":"response.output_item.added"}' + - '{"item":{"arguments":{"goal":"find the shipping ETA tool for order_42"},"call_id":"chatcmpl-tool-9b30cda411635646","execution":"client","status":"completed","type":"tool_search_call"},"output_index":1,"sequence_number":106,"type":"response.output_item.done"}' + - '{"response":{"conversation_id":null,"created_at":1785752315,"error":null,"id":"resp_019fc721-df81-7ea3-9e8d-c240136387c5","incomplete_details":null,"instructions":null,"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[{"content":[{"text":"The + user wants me to call `tool_search` to find the shipping ETA tool for \"order_42\".\nThey + explicitly state:\n1. Call tool_search now.\n2. Do not call get_shipping_eta + yet.\n3. Do not answer without calling tool_search.\n\nThe goal for `tool_search` + is to find the project-specific tools needed to continue the task. The goal + string should be \"shipping ETA tool for order_42\".\n\nLet''s call `tool_search` + with the goal parameter.\nThen I will wait for the response before doing anything + else.\nActually, the prompt says \"Call tool_search now to find the shipping + ETA tool for order_42.\" So the goal is \"find the shipping ETA tool for order_42\".\n\nLet''s + make the tool call. \nParameters: goal = \"find the shipping ETA tool for order_42\"\nI + will execute this now. \nAfter receiving the result, I will proceed according + to instructions.\nWait, the instruction says \"Do not call get_shipping_eta + yet and do not answer without calling tool_search.\" This implies I just need + to call tool_search first.\n\nI''ll call tool_search.\n","type":"reasoning_text"}],"encrypted_content":null,"id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","status":null,"summary":[],"type":"reasoning"},{"arguments":{"goal":"find + the shipping ETA tool for order_42"},"call_id":"chatcmpl-tool-9b30cda411635646","execution":"client","status":"completed","type":"tool_search_call"}],"previous_response_id":null,"status":"completed","tools":[{"description":"Find + the project-specific tools needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"defer_loading":true,"description":"Look + up shipping ETA details for an order.","name":"get_shipping_eta","parameters":{"additionalProperties":false,"properties":{"order_id":{"type":"string"}},"required":["order_id"],"type":"object"},"strict":false,"type":"function"}],"usage":{"input_tokens":390,"input_tokens_details":{"cached_tokens":0},"output_tokens":284,"output_tokens_details":{"reasoning_tokens":228},"total_tokens":674}},"sequence_number":107,"type":"response.completed"}' diff --git a/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-nonstreaming.yaml b/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-nonstreaming.yaml new file mode 100644 index 00000000..82a258a8 --- /dev/null +++ b/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-nonstreaming.yaml @@ -0,0 +1,146 @@ +turns: +- filename: t1 + request: + body: + input: Call tool_search now to find the shipping ETA tool for order_42. Do not + call get_shipping_eta yet and do not answer without calling tool_search. + max_output_tokens: 1024 + model: gpt-5.6 + store: true + stream: false + tool_choice: required + tools: + - description: Find the project-specific tools needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - defer_loading: true + description: Look up shipping ETA details for an order. + name: get_shipping_eta + parameters: + additionalProperties: false + properties: + order_id: + type: string + required: + - order_id + type: object + strict: false + type: function + headers: + accept: '*/*' + authorization: Bearer *** + content-type: application/json + user-agent: python-httpx/0.28.1 + method: POST + path: /v1/responses + query_params: {} + response: + body: + background: false + billing: + payer: developer + completed_at: 1785747781 + created_at: 1785747780 + error: null + frequency_penalty: 0.0 + id: resp_06d8a729a99ad4f6006a7059446b088199af936a420fe410b6 + incomplete_details: null + instructions: null + max_output_tokens: 1024 + max_tool_calls: null + metadata: {} + model: gpt-5.6-sol + moderation: null + object: response + output: + - arguments: + goal: Find the shipping ETA tool for order_42, but do not call the shipping + ETA tool yet. + call_id: call_oCdMDc2odqbljhEn6pLI4fpA + execution: client + id: tsc_06d8a729a99ad4f6006a70594547348199a213edfe7aba43a4 + status: completed + type: tool_search_call + parallel_tool_calls: true + presence_penalty: 0.0 + previous_response_id: null + prompt_cache_key: null + prompt_cache_retention: 24h + reasoning: + context: all_turns + effort: medium + mode: standard + summary: null + safety_identifier: null + service_tier: default + status: completed + store: true + temperature: 1.0 + text: + format: + type: text + verbosity: medium + tool_choice: required + tool_usage: + image_gen: + input_tokens: 0 + input_tokens_details: + image_tokens: 0 + text_tokens: 0 + output_tokens: 0 + output_tokens_details: + image_tokens: 0 + text_tokens: 0 + total_tokens: 0 + web_search: + num_requests: 0 + tools: + - defer_loading: true + description: Look up shipping ETA details for an order. + name: get_shipping_eta + output_schema: null + parameters: + additionalProperties: false + properties: + order_id: + type: string + required: + - order_id + type: object + strict: false + type: function + - description: Find the project-specific tools needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + top_logprobs: 0 + top_p: 0.98 + truncation: disabled + usage: + input_tokens: 80 + input_tokens_details: + cache_write_tokens: 0 + cached_tokens: 0 + output_tokens: 39 + output_tokens_details: + reasoning_tokens: 0 + total_tokens: 119 + user: null + headers: + content-type: application/json + status_code: 200 diff --git a/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-streaming.yaml b/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-streaming.yaml new file mode 100644 index 00000000..f2f211d8 --- /dev/null +++ b/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-streaming.yaml @@ -0,0 +1,102 @@ +turns: +- filename: t1 + request: + body: + input: Call tool_search now to find the shipping ETA tool for order_42. Do not + call get_shipping_eta yet and do not answer without calling tool_search. + max_output_tokens: 1024 + model: gpt-5.6 + store: true + stream: true + tool_choice: required + tools: + - description: Find the project-specific tools needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - defer_loading: true + description: Look up shipping ETA details for an order. + name: get_shipping_eta + parameters: + additionalProperties: false + properties: + order_id: + type: string + required: + - order_id + type: object + strict: false + type: function + headers: + accept: '*/*' + authorization: Bearer *** + content-type: application/json + user-agent: python-httpx/0.28.1 + method: POST + path: /v1/responses + query_params: {} + response: + headers: + content-type: text/event-stream; charset=utf-8 + sse: + - 'event: response.created + + ' + - 'data: {"type":"response.created","response":{"id":"resp_0448c545147bd0a5006a7059405224819ba4d6496860ecd479","object":"response","created_at":1785747776,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"function","defer_loading":true,"description":"Look + up shipping ETA details for an order.","name":"get_shipping_eta","output_schema":null,"parameters":{"type":"object","properties":{"order_id":{"type":"string"}},"required":["order_id"],"additionalProperties":false},"strict":false},{"type":"tool_search","description":"Find + the project-specific tools needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} + + ' + - ' + + ' + - 'event: response.in_progress + + ' + - 'data: {"type":"response.in_progress","response":{"id":"resp_0448c545147bd0a5006a7059405224819ba4d6496860ecd479","object":"response","created_at":1785747776,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"function","defer_loading":true,"description":"Look + up shipping ETA details for an order.","name":"get_shipping_eta","output_schema":null,"parameters":{"type":"object","properties":{"order_id":{"type":"string"}},"required":["order_id"],"additionalProperties":false},"strict":false},{"type":"tool_search","description":"Find + the project-specific tools needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} + + ' + - ' + + ' + - 'event: response.output_item.added + + ' + - 'data: {"type":"response.output_item.added","item":{"id":"tsc_0448c545147bd0a5006a70594131e4819bae8db6fe4ebb2aeb","type":"tool_search_call","status":"in_progress","arguments":{},"call_id":"call_9Z5acWsJ9IoUsyGaEQNbr30L","execution":"client"},"output_index":0,"sequence_number":2} + + ' + - ' + + ' + - 'event: response.output_item.done + + ' + - 'data: {"type":"response.output_item.done","item":{"id":"tsc_0448c545147bd0a5006a70594131e4819bae8db6fe4ebb2aeb","type":"tool_search_call","status":"completed","arguments":{"goal":"Find + the shipping ETA tool for order_42, but do not call the shipping ETA tool yet."},"call_id":"call_9Z5acWsJ9IoUsyGaEQNbr30L","execution":"client"},"output_index":0,"sequence_number":3} + + ' + - ' + + ' + - 'event: response.completed + + ' + - 'data: {"type":"response.completed","response":{"id":"resp_0448c545147bd0a5006a7059405224819ba4d6496860ecd479","object":"response","created_at":1785747776,"status":"completed","background":false,"completed_at":1785747777,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[{"id":"tsc_0448c545147bd0a5006a70594131e4819bae8db6fe4ebb2aeb","type":"tool_search_call","status":"completed","arguments":{"goal":"Find + the shipping ETA tool for order_42, but do not call the shipping ETA tool yet."},"call_id":"call_9Z5acWsJ9IoUsyGaEQNbr30L","execution":"client"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"function","defer_loading":true,"description":"Look + up shipping ETA details for an order.","name":"get_shipping_eta","output_schema":null,"parameters":{"type":"object","properties":{"order_id":{"type":"string"}},"required":["order_id"],"additionalProperties":false},"strict":false},{"type":"tool_search","description":"Find + the project-specific tools needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":{"input_tokens":80,"input_tokens_details":{"cache_write_tokens":0,"cached_tokens":0},"output_tokens":39,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":119},"user":null,"metadata":{}},"sequence_number":4} + + ' + - ' + + ' + status_code: 200 diff --git a/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-websocket-streaming.yaml b/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-websocket-streaming.yaml new file mode 100644 index 00000000..1dd84b87 --- /dev/null +++ b/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-websocket-streaming.yaml @@ -0,0 +1,91 @@ +turns: +- filename: t1 + request: + body: + input: Call tool_search now to find the shipping ETA tool for order_42. Do not + call get_shipping_eta yet and do not answer without calling tool_search. + max_output_tokens: 1024 + model: gpt-5.6 + store: true + tool_choice: required + tools: + - description: Find the project-specific tools needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - defer_loading: true + description: Look up shipping ETA details for an order. + name: get_shipping_eta + parameters: + additionalProperties: false + properties: + order_id: + type: string + required: + - order_id + type: object + strict: false + type: function + type: response.create + headers: + Authorization: Bearer *** + method: WEBSOCKET + path: /v1/responses + query_params: {} + transport: websocket + response: + headers: + transport: websocket + sse: + - 'data: {"type":"response.created","response":{"id":"resp_09a5e9add27752d6006a706af5d520819886572d852c73dfc0","object":"response","created_at":1785752309,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"function","defer_loading":true,"description":"Look + up shipping ETA details for an order.","name":"get_shipping_eta","output_schema":null,"parameters":{"type":"object","properties":{"order_id":{"type":"string"}},"required":["order_id"],"additionalProperties":false},"strict":false},{"type":"tool_search","description":"Find + the project-specific tools needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} + + ' + - 'data: {"type":"response.in_progress","response":{"id":"resp_09a5e9add27752d6006a706af5d520819886572d852c73dfc0","object":"response","created_at":1785752309,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"function","defer_loading":true,"description":"Look + up shipping ETA details for an order.","name":"get_shipping_eta","output_schema":null,"parameters":{"type":"object","properties":{"order_id":{"type":"string"}},"required":["order_id"],"additionalProperties":false},"strict":false},{"type":"tool_search","description":"Find + the project-specific tools needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} + + ' + - 'data: {"type":"response.output_item.added","item":{"id":"tsc_09a5e9add27752d6006a706af7d0f881988fc1fce2ad18142a","type":"tool_search_call","status":"in_progress","arguments":{},"call_id":"call_JgjLCxUScPajmBYpzO0KWWRH","execution":"client"},"output_index":0,"sequence_number":2} + + ' + - 'data: {"type":"response.output_item.done","item":{"id":"tsc_09a5e9add27752d6006a706af7d0f881988fc1fce2ad18142a","type":"tool_search_call","status":"completed","arguments":{"goal":"Find + the shipping ETA tool that can retrieve the estimated delivery time for order_42. + Do not invoke the shipping ETA tool yet."},"call_id":"call_JgjLCxUScPajmBYpzO0KWWRH","execution":"client"},"output_index":0,"sequence_number":3} + + ' + - 'data: {"type":"response.completed","response":{"id":"resp_09a5e9add27752d6006a706af5d520819886572d852c73dfc0","object":"response","created_at":1785752309,"status":"completed","background":false,"completed_at":1785752312,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[{"id":"tsc_09a5e9add27752d6006a706af7d0f881988fc1fce2ad18142a","type":"tool_search_call","status":"completed","arguments":{"goal":"Find + the shipping ETA tool that can retrieve the estimated delivery time for order_42. + Do not invoke the shipping ETA tool yet."},"call_id":"call_JgjLCxUScPajmBYpzO0KWWRH","execution":"client"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"function","defer_loading":true,"description":"Look + up shipping ETA details for an order.","name":"get_shipping_eta","output_schema":null,"parameters":{"type":"object","properties":{"order_id":{"type":"string"}},"required":["order_id"],"additionalProperties":false},"strict":false},{"type":"tool_search","description":"Find + the project-specific tools needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":{"input_tokens":80,"input_tokens_details":{"cache_write_tokens":0,"cached_tokens":0},"output_tokens":45,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":125},"user":null,"metadata":{}},"sequence_number":4} + + ' + - 'data: [DONE] + + ' + status_code: 101 + websocket: + - '{"type":"response.created","response":{"id":"resp_09a5e9add27752d6006a706af5d520819886572d852c73dfc0","object":"response","created_at":1785752309,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"function","defer_loading":true,"description":"Look + up shipping ETA details for an order.","name":"get_shipping_eta","output_schema":null,"parameters":{"type":"object","properties":{"order_id":{"type":"string"}},"required":["order_id"],"additionalProperties":false},"strict":false},{"type":"tool_search","description":"Find + the project-specific tools needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0}' + - '{"type":"response.in_progress","response":{"id":"resp_09a5e9add27752d6006a706af5d520819886572d852c73dfc0","object":"response","created_at":1785752309,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"function","defer_loading":true,"description":"Look + up shipping ETA details for an order.","name":"get_shipping_eta","output_schema":null,"parameters":{"type":"object","properties":{"order_id":{"type":"string"}},"required":["order_id"],"additionalProperties":false},"strict":false},{"type":"tool_search","description":"Find + the project-specific tools needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1}' + - '{"type":"response.output_item.added","item":{"id":"tsc_09a5e9add27752d6006a706af7d0f881988fc1fce2ad18142a","type":"tool_search_call","status":"in_progress","arguments":{},"call_id":"call_JgjLCxUScPajmBYpzO0KWWRH","execution":"client"},"output_index":0,"sequence_number":2}' + - '{"type":"response.output_item.done","item":{"id":"tsc_09a5e9add27752d6006a706af7d0f881988fc1fce2ad18142a","type":"tool_search_call","status":"completed","arguments":{"goal":"Find + the shipping ETA tool that can retrieve the estimated delivery time for order_42. + Do not invoke the shipping ETA tool yet."},"call_id":"call_JgjLCxUScPajmBYpzO0KWWRH","execution":"client"},"output_index":0,"sequence_number":3}' + - '{"type":"response.completed","response":{"id":"resp_09a5e9add27752d6006a706af5d520819886572d852c73dfc0","object":"response","created_at":1785752309,"status":"completed","background":false,"completed_at":1785752312,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[{"id":"tsc_09a5e9add27752d6006a706af7d0f881988fc1fce2ad18142a","type":"tool_search_call","status":"completed","arguments":{"goal":"Find + the shipping ETA tool that can retrieve the estimated delivery time for order_42. + Do not invoke the shipping ETA tool yet."},"call_id":"call_JgjLCxUScPajmBYpzO0KWWRH","execution":"client"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"function","defer_loading":true,"description":"Look + up shipping ETA details for an order.","name":"get_shipping_eta","output_schema":null,"parameters":{"type":"object","properties":{"order_id":{"type":"string"}},"required":["order_id"],"additionalProperties":false},"strict":false},{"type":"tool_search","description":"Find + the project-specific tools needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":{"input_tokens":80,"input_tokens_details":{"cache_write_tokens":0,"cached_tokens":0},"output_tokens":45,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":125},"user":null,"metadata":{}},"sequence_number":4}' diff --git a/crates/agentic-server-core/tests/cassettes/tool_search/tools.json b/crates/agentic-server-core/tests/cassettes/tool_search/tools.json index 31db0a18..1dcd84fe 100644 --- a/crates/agentic-server-core/tests/cassettes/tool_search/tools.json +++ b/crates/agentic-server-core/tests/cassettes/tool_search/tools.json @@ -21,6 +21,7 @@ "name": "get_shipping_eta", "description": "Look up shipping ETA details for an order.", "defer_loading": true, + "strict": false, "parameters": { "type": "object", "properties": { diff --git a/crates/agentic-server-core/tests/tool_normalization_test.rs b/crates/agentic-server-core/tests/tool_normalization_test.rs index d108692f..5249c3d3 100644 --- a/crates/agentic-server-core/tests/tool_normalization_test.rs +++ b/crates/agentic-server-core/tests/tool_normalization_test.rs @@ -17,6 +17,7 @@ use agentic_core::utils::common::serialize_to_string; const MULTI_TURN_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/cassettes/tool_calls/multi_turn"); const CODEX_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/cassettes/codex"); +const TOOL_SEARCH_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/cassettes/tool_search"); const CODEX_CASSETTES: &[&str] = &[ "codex-direct-vllm-http-custom-tool-Qwen-Qwen3.6-35B-A3B-streaming.yaml", @@ -504,3 +505,43 @@ fn web_search_preview_normalizes_to_gateway_function() { assert_eq!(tools[0].get("name").and_then(Value::as_str), Some("web_search")); assert_eq!(tools[0]["parameters"]["required"], serde_json::json!(["query"])); } + +#[test] +fn tool_search_gateway_cassette_normalizes_client_declaration_to_strict_function() { + let filename = "tool-search-gateway-Qwen-Qwen3.6-35B-A3B-streaming.yaml"; + let cassette = load_cassette_from(TOOL_SEARCH_DIR, filename); + assert_eq!(cassette.turns.len(), 1); + + let request = request_body_from_turn(&cassette.turns[0]); + let public_tools = request["tools"] + .as_array() + .expect("cassette request should declare tools"); + assert!( + public_tools.iter().any(|tool| { + tool["type"] == "tool_search" && tool["execution"] == "client" && tool.get("name").is_none() + }) + ); + + let payload: RequestPayload = serde_json::from_value(request).expect("cassette request should parse"); + let upstream = upstream_request_value(payload, true); + let upstream_tools = upstream["tools"] + .as_array() + .expect("upstream request should declare tools"); + assert!(!upstream_tools.iter().any(|tool| tool["type"] == "tool_search")); + + let search_fallbacks: Vec<_> = upstream_tools + .iter() + .filter(|tool| tool["name"] == "tool_search") + .collect(); + assert_eq!(search_fallbacks.len(), 1); + assert_eq!(search_fallbacks[0]["type"], "function"); + assert_eq!(search_fallbacks[0]["strict"], false); + + let deferred = upstream_tools + .iter() + .find(|tool| tool["name"] == "get_shipping_eta") + .expect("upstream request should preserve the deferred tool"); + assert_eq!(deferred["type"], "function"); + assert_eq!(deferred["strict"], false); + assert_eq!(deferred["defer_loading"], true); +} From cbb49b539e8b7fd77c7b1efcdd7ced10a022902c Mon Sep 17 00:00:00 2001 From: haoshan98 Date: Mon, 3 Aug 2026 15:15:15 +0000 Subject: [PATCH 9/9] Update cassette recordings Signed-off-by: haoshan98 --- .../src/executor/accumulator.rs | 1 + .../src/executor/engine.rs | 2 +- crates/agentic-server-core/src/tool/mod.rs | 4 +- .../agentic-server-core/src/tool/registry.rs | 271 +- .../src/tool/tool_search.rs | 68 + .../src/types/request_response.rs | 153 +- .../tests/accumulator_cassette_test.rs | 593 +- .../tests/cassettes/README.md | 50 +- ...rch-Qwen-Qwen3.6-35B-A3B-nonstreaming.yaml | 472 ++ ...search-Qwen-Qwen3.6-35B-A3B-streaming.yaml | 5091 +++++++++++++++++ ...search-Qwen-Qwen3.6-35B-A3B-streaming.yaml | 2449 ++++++++ ...ttps-tool-search-gpt-5.6-nonstreaming.yaml | 509 ++ ...i-https-tool-search-gpt-5.6-streaming.yaml | 553 ++ ...bsocket-tool-search-gpt-5.6-streaming.yaml | 410 ++ .../tools/tool_search_namespace_tool.json | 45 + .../codex/tools/tool_search_outputs.json | 38 + .../tests/cassettes/record_cassette.py | 42 +- .../record_codex_cli_tool_call_cassettes.sh | 217 +- .../cassettes/record_tool_search_cassettes.sh | 259 - ...way-Qwen-Qwen3.6-35B-A3B-nonstreaming.yaml | 112 - ...ateway-Qwen-Qwen3.6-35B-A3B-streaming.yaml | 1387 ----- ...n-Qwen3.6-35B-A3B-websocket-streaming.yaml | 574 -- ...openai-reference-gpt-5.6-nonstreaming.yaml | 146 - ...ch-openai-reference-gpt-5.6-streaming.yaml | 102 - ...reference-gpt-5.6-websocket-streaming.yaml | 91 - .../tests/cassettes/tool_search/tools.json | 38 - .../tests/tool_normalization_test.rs | 41 - 27 files changed, 10634 insertions(+), 3084 deletions(-) create mode 100644 crates/agentic-server-core/tests/cassettes/codex/codex-gateway-http-tool-search-Qwen-Qwen3.6-35B-A3B-nonstreaming.yaml create mode 100644 crates/agentic-server-core/tests/cassettes/codex/codex-gateway-http-tool-search-Qwen-Qwen3.6-35B-A3B-streaming.yaml create mode 100644 crates/agentic-server-core/tests/cassettes/codex/codex-gateway-websocket-tool-search-Qwen-Qwen3.6-35B-A3B-streaming.yaml create mode 100644 crates/agentic-server-core/tests/cassettes/codex/codex-openai-https-tool-search-gpt-5.6-nonstreaming.yaml create mode 100644 crates/agentic-server-core/tests/cassettes/codex/codex-openai-https-tool-search-gpt-5.6-streaming.yaml create mode 100644 crates/agentic-server-core/tests/cassettes/codex/codex-openai-websocket-tool-search-gpt-5.6-streaming.yaml create mode 100644 crates/agentic-server-core/tests/cassettes/codex/tools/tool_search_namespace_tool.json create mode 100644 crates/agentic-server-core/tests/cassettes/codex/tools/tool_search_outputs.json delete mode 100755 crates/agentic-server-core/tests/cassettes/record_tool_search_cassettes.sh delete mode 100644 crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-nonstreaming.yaml delete mode 100644 crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-streaming.yaml delete mode 100644 crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-websocket-streaming.yaml delete mode 100644 crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-nonstreaming.yaml delete mode 100644 crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-streaming.yaml delete mode 100644 crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-websocket-streaming.yaml delete mode 100644 crates/agentic-server-core/tests/cassettes/tool_search/tools.json diff --git a/crates/agentic-server-core/src/executor/accumulator.rs b/crates/agentic-server-core/src/executor/accumulator.rs index 4ce90212..ae67dda7 100644 --- a/crates/agentic-server-core/src/executor/accumulator.rs +++ b/crates/agentic-server-core/src/executor/accumulator.rs @@ -538,6 +538,7 @@ impl ResponseAccumulator { model: model.to_string(), status: self.status.as_str().to_string(), output: self.output, + tools: None, usage: self.usage, incomplete_details: self.incomplete_details, error: self.error, diff --git a/crates/agentic-server-core/src/executor/engine.rs b/crates/agentic-server-core/src/executor/engine.rs index ab99069e..d8be0164 100644 --- a/crates/agentic-server-core/src/executor/engine.rs +++ b/crates/agentic-server-core/src/executor/engine.rs @@ -129,7 +129,7 @@ async fn run_until_gateway_tools_complete( } else { (fetch_blocking_payload(&ctx, exec_ctx, auth).await?, Vec::new()) }; - registry.restore_final_payload_output(&mut payload.output); + registry.restore_final_payload(&mut payload); accumulate_usage(&mut combined_usage, payload.usage.take()); let current_output = std::mem::take(&mut payload.output); log_client_execution_items(&ctx.response_id, ¤t_output); diff --git a/crates/agentic-server-core/src/tool/mod.rs b/crates/agentic-server-core/src/tool/mod.rs index 0b45bb69..684fb1e9 100644 --- a/crates/agentic-server-core/src/tool/mod.rs +++ b/crates/agentic-server-core/src/tool/mod.rs @@ -19,5 +19,7 @@ pub use function::FunctionHandler; pub use handler::{GatewayExecutor, ToolError, ToolHandler, ToolOutput}; pub use mcp::{McpClient, McpClientPool, McpDiscoveredHandler, McpError, McpHandler, McpOperation, McpServerEntry}; pub use registry::{GatewayDispatchResult, ToolEntry, ToolRegistry, ToolType}; -pub(crate) use tool_search::{TOOL_SEARCH_NAME, loaded_function_names, loaded_function_tools}; +pub(crate) use tool_search::{ + TOOL_SEARCH_NAME, loaded_function_identities, loaded_function_names, loaded_function_tools, +}; pub use web_search::WebSearchHandler; diff --git a/crates/agentic-server-core/src/tool/registry.rs b/crates/agentic-server-core/src/tool/registry.rs index 73425ebd..37ecf1cf 100644 --- a/crates/agentic-server-core/src/tool/registry.rs +++ b/crates/agentic-server-core/src/tool/registry.rs @@ -17,7 +17,10 @@ use crate::events::WireEvent; use crate::types::io::OutputItem; use crate::types::io::output::FunctionToolCall; -use crate::types::tools::{CodeInterpreterToolParam, FileSearchToolParam, ResponsesTool, ToolSearchExecution}; +use crate::types::request_response::ResponsePayload; +use crate::types::tools::{ + CodeInterpreterToolParam, CodexNamespaceMember, FileSearchToolParam, ResponsesTool, ToolSearchExecution, +}; use crate::utils::common::serialize_to_value_or_custom_default; #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] @@ -171,11 +174,50 @@ pub struct ToolRegistry { /// Tool-search identity is request-scoped: only a declared client search /// may restore the provider's ordinary function fallback. client_tool_search: bool, - client_tool_search_declarations: Option, + client_tool_search_declarations: Option, loaded_tool_namespaces: HashMap, tool_search_name_owned: bool, } +#[derive(Debug)] +struct ClientToolSearchDeclarations { + typed: Vec, + wire: Value, +} + +impl ClientToolSearchDeclarations { + fn mark_loaded(&mut self, loaded: &tool_search::LoadedFunctionIdentities) { + for declaration in &mut self.typed { + match declaration { + ResponsesTool::Function(function) + if function.defer_loading == Some(true) && loaded.contains_top_level(function.name.as_ref()) => + { + function.defer_loading = None; + } + ResponsesTool::Namespace(namespace) => { + for member in &mut namespace.tools { + let CodexNamespaceMember::Function(function) = member else { + continue; + }; + if function.defer_loading == Some(true) + && loaded.contains_namespaced(&namespace.name, function.name.as_ref()) + { + function.defer_loading = None; + } + } + } + _ => {} + } + } + self.wire = serialize_to_value_or_custom_default( + &self.typed, + "failed to update loaded client tool-search response declarations", + |wire| wire, + self.wire.clone(), + ); + } +} + impl ToolRegistry { /// Build a registry from declared tools and attach gateway handlers for dispatchable tool types. /// @@ -207,12 +249,16 @@ impl ToolRegistry { declarations .iter_mut() .for_each(ResponsesTool::sanitize_for_persistence); - serialize_to_value_or_custom_default( + let wire = serialize_to_value_or_custom_default( &declarations, "failed to preserve client tool-search response declarations", Some, None, - ) + ); + wire.map(|wire| ClientToolSearchDeclarations { + typed: declarations, + wire, + }) } else { None }; @@ -313,12 +359,23 @@ impl ToolRegistry { tool_search::restore_output_items(output, self.can_restore_tool_search_fallback()); } + pub fn restore_final_payload(&self, payload: &mut ResponsePayload) { + self.restore_final_payload_output(&mut payload.output); + if let Some(declarations) = &self.client_tool_search_declarations { + payload.tools = Some(declarations.typed.clone()); + } + } + pub fn restore_stream_event_wire(&self, wire: &mut WireEvent) -> bool { let mut changed = CodexNamespaceHandler.restore_response_wire(wire, self.namespace_map.as_ref()); changed |= tool_search::restore_loaded_namespace_response_wire(wire, &self.loaded_tool_namespaces); changed |= tool_search::restore_response_wire(wire, self.can_restore_tool_search_fallback()); - changed |= - tool_search::restore_response_tool_declarations_wire(wire, self.client_tool_search_declarations.as_ref()); + changed |= tool_search::restore_response_tool_declarations_wire( + wire, + self.client_tool_search_declarations + .as_ref() + .map(|declarations| &declarations.wire), + ); changed } @@ -329,6 +386,10 @@ impl ToolRegistry { /// Load request-scoped identities returned by a completed client search. pub(crate) fn load_tool_search_output(&mut self, input: &crate::types::io::ResponsesInput) { + let loaded_function_identities = tool_search::loaded_function_identities(input); + if let Some(declarations) = &mut self.client_tool_search_declarations { + declarations.mark_loaded(&loaded_function_identities); + } self.loaded_tool_namespaces = tool_search::loaded_namespace_members(input); self.loaded_tool_namespaces .retain(|name, _| !self.entries.contains_key(name)); @@ -745,6 +806,187 @@ mod tests { assert!(registry.restore_stream_event_wire(&mut wire)); assert_eq!(wire.rest["response"]["tools"], declarations); } + + let mut payload: ResponsePayload = serde_json::from_value(serde_json::json!({ + "id": "resp_1", + "object": "response", + "created_at": 0, + "model": "test", + "status": "completed", + "output": [{ + "type": "function_call", + "id": "fc_1", + "call_id": "call_1", + "name": "tool_search", + "arguments": "{\"goal\":\"find deferred tool\"}", + "status": "completed" + }], + "usage": null, + "incomplete_details": null, + "error": null, + "previous_response_id": null, + "conversation_id": null, + "instructions": null + })) + .expect("valid response payload"); + registry.restore_final_payload(&mut payload); + + assert_eq!(serde_json::to_value(&payload.tools).unwrap(), declarations); + assert!(matches!(payload.output.as_slice(), [OutputItem::ToolSearchCall(_)])); + } + + #[tokio::test] + async fn client_tool_search_marks_only_loaded_response_declarations_non_deferred() { + let declarations = serde_json::json!([ + {"type": "tool_search", "execution": "client", "parameters": {"type": "object"}}, + {"type": "function", "name": "top_loaded", "defer_loading": true}, + {"type": "function", "name": "top_still_deferred", "defer_loading": true}, + { + "type": "namespace", + "name": "fixture", + "tools": [ + {"type": "function", "name": "add_numbers", "defer_loading": true}, + {"type": "function", "name": "still_deferred", "defer_loading": true} + ] + }, + { + "type": "namespace", + "name": "other_fixture", + "tools": [{"type": "function", "name": "add_numbers", "defer_loading": true}] + } + ]); + let expected_loaded = serde_json::json!([ + {"type": "tool_search", "execution": "client", "parameters": {"type": "object"}}, + {"type": "function", "name": "top_loaded"}, + {"type": "function", "name": "top_still_deferred", "defer_loading": true}, + { + "type": "namespace", + "name": "fixture", + "tools": [ + {"type": "function", "name": "add_numbers"}, + {"type": "function", "name": "still_deferred", "defer_loading": true} + ] + }, + { + "type": "namespace", + "name": "other_fixture", + "tools": [{"type": "function", "name": "add_numbers", "defer_loading": true}] + } + ]); + let mut tools: Vec = + serde_json::from_value(declarations.clone()).expect("valid client tool-search declarations"); + let mut executors = GatewayExecutors::default(); + let mut registry = ToolRegistry::build_with_handlers(&mut tools, &mut executors) + .await + .expect("valid registry"); + + let mut initial_wire = WireEvent::new("response.created"); + initial_wire + .rest + .insert("response".to_owned(), serde_json::json!({"tools": []})); + assert!(registry.restore_stream_event_wire(&mut initial_wire)); + assert_eq!(initial_wire.rest["response"]["tools"], declarations); + + let loaded_input = serde_json::from_value(serde_json::json!([ + { + "type": "tool_search_call", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "arguments": {"goal": "load tools"} + }, + { + "type": "tool_search_output", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "tools": [ + {"type": "function", "name": "top_loaded", "defer_loading": true}, + { + "type": "namespace", + "name": "fixture", + "tools": [{"type": "function", "name": "add_numbers", "defer_loading": true}] + } + ] + } + ])) + .expect("valid loaded client tool-search output"); + registry.load_tool_search_output(&loaded_input); + + let mut loaded_wire = WireEvent::new("response.completed"); + loaded_wire + .rest + .insert("response".to_owned(), serde_json::json!({"tools": []})); + assert!(registry.restore_stream_event_wire(&mut loaded_wire)); + assert_eq!(loaded_wire.rest["response"]["tools"], expected_loaded); + + let mut payload: ResponsePayload = serde_json::from_value(serde_json::json!({ + "id": "resp_loaded", + "object": "response", + "created_at": 0, + "model": "test", + "status": "completed", + "output": [], + "usage": null, + "incomplete_details": null, + "error": null, + "previous_response_id": null, + "conversation_id": null, + "instructions": null + })) + .expect("valid response payload"); + registry.restore_final_payload(&mut payload); + assert_eq!(serde_json::to_value(payload.tools).unwrap(), expected_loaded); + } + + #[tokio::test] + async fn client_tool_search_preserves_explicit_false_defer_loading() { + let declarations = serde_json::json!([ + {"type": "tool_search", "execution": "client", "parameters": {"type": "object"}}, + {"type": "function", "name": "top_level", "defer_loading": false}, + { + "type": "namespace", + "name": "fixture", + "tools": [{"type": "function", "name": "member", "defer_loading": false}] + } + ]); + let mut tools: Vec = + serde_json::from_value(declarations.clone()).expect("valid client tool-search declarations"); + let mut executors = GatewayExecutors::default(); + let mut registry = ToolRegistry::build_with_handlers(&mut tools, &mut executors) + .await + .expect("valid registry"); + let loaded_input = serde_json::from_value(serde_json::json!([ + { + "type": "tool_search_call", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "arguments": {"goal": "load names"} + }, + { + "type": "tool_search_output", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "tools": [ + {"type": "function", "name": "top_level"}, + { + "type": "namespace", + "name": "fixture", + "tools": [{"type": "function", "name": "member"}] + } + ] + } + ])) + .expect("valid loaded client tool-search output"); + registry.load_tool_search_output(&loaded_input); + + let mut wire = WireEvent::new("response.completed"); + wire.rest + .insert("response".to_owned(), serde_json::json!({"tools": []})); + assert!(registry.restore_stream_event_wire(&mut wire)); + assert_eq!(wire.rest["response"]["tools"], declarations); } #[tokio::test] @@ -761,6 +1003,23 @@ mod tests { .expect("valid registry"); assert!(!registry.can_restore_tool_search_fallback()); + let mut payload: ResponsePayload = serde_json::from_value(serde_json::json!({ + "id": "resp_hosted", + "object": "response", + "created_at": 0, + "model": "test", + "status": "completed", + "output": [], + "usage": null, + "incomplete_details": null, + "error": null, + "previous_response_id": null, + "conversation_id": null, + "instructions": null + })) + .expect("valid response payload"); + registry.restore_final_payload(&mut payload); + assert!(payload.tools.is_none()); } } diff --git a/crates/agentic-server-core/src/tool/tool_search.rs b/crates/agentic-server-core/src/tool/tool_search.rs index 43ff7667..d2702645 100644 --- a/crates/agentic-server-core/src/tool/tool_search.rs +++ b/crates/agentic-server-core/src/tool/tool_search.rs @@ -83,6 +83,74 @@ fn top_level_function_names(outputs: &[&ToolSearchOutput]) -> HashSet { .collect() } +#[derive(Debug, Default)] +pub(crate) struct LoadedFunctionIdentities { + top_level: HashSet, + namespaced: HashMap>, +} + +impl LoadedFunctionIdentities { + pub(crate) fn contains_top_level(&self, name: &str) -> bool { + self.top_level.contains(name) + } + + pub(crate) fn contains_namespaced(&self, namespace: &str, name: &str) -> bool { + self.namespaced + .get(namespace) + .is_some_and(|members| members.contains(name)) + } +} + +/// Return the exact public identities loaded by completed client tool-search +/// outputs. Top-level functions and namespace members are kept separate so a +/// same-named declaration in another scope is not marked as loaded. +pub(crate) fn loaded_function_identities(input: &ResponsesInput) -> LoadedFunctionIdentities { + let outputs = valid_client_tool_search_outputs(input); + let mut identities = LoadedFunctionIdentities { + top_level: top_level_function_names(&outputs), + namespaced: HashMap::new(), + }; + + for output in outputs { + for tool in &output.tools { + let Some(tool) = tool.as_object() else { + continue; + }; + let Some(namespace) = tool + .get("type") + .and_then(Value::as_str) + .filter(|tool_type| *tool_type == "namespace") + .and_then(|_| tool.get("name")) + .and_then(Value::as_str) + .filter(|namespace| !namespace.is_empty()) + else { + continue; + }; + let Some(members) = tool.get("tools").and_then(Value::as_array) else { + continue; + }; + for member in members { + let Some(name) = member + .as_object() + .filter(|member| member.get("type").and_then(Value::as_str) == Some("function")) + .and_then(|member| member.get("name")) + .and_then(Value::as_str) + .filter(|name| !name.is_empty()) + else { + continue; + }; + identities + .namespaced + .entry(namespace.to_owned()) + .or_default() + .insert(name.to_owned()); + } + } + } + + identities +} + /// Build an unqualified member-name to namespace map from client-provided /// `tool_search_output` items. /// diff --git a/crates/agentic-server-core/src/types/request_response.rs b/crates/agentic-server-core/src/types/request_response.rs index e3aa2dba..97069ee6 100644 --- a/crates/agentic-server-core/src/types/request_response.rs +++ b/crates/agentic-server-core/src/types/request_response.rs @@ -8,7 +8,10 @@ use super::io::{ FunctionTool, InputItem, InputMessage, InputMessageContent, OutputItem, ResponseUsage, ResponsesInput, ToolChoice, }; use super::tools::{CustomToolParam, ResponsesTool, ToolSearchExecution, ToolSearchToolParam}; -use crate::tool::{CodexNamespaceHandler, TOOL_SEARCH_NAME, ToolError, loaded_function_names, loaded_function_tools}; +use crate::tool::{ + CodexNamespaceHandler, TOOL_SEARCH_NAME, ToolError, loaded_function_identities, loaded_function_names, + loaded_function_tools, +}; use crate::utils::common::serialize_to_string; #[derive(Debug, Clone, Serialize, Deserialize)] @@ -170,7 +173,8 @@ impl RequestPayload { .as_deref() .map(|tools| CodexNamespaceHandler.resolve_namespace_members(tools)) .transpose()?; - let loaded_tools: Vec = loaded_function_tools(&self.input); + let loaded_function_identities = loaded_function_identities(&self.input); + let mut loaded_tools: Vec = loaded_function_tools(&self.input); let tool_search_name_is_owned = renamed_tools.as_deref().is_some_and(|tools| { tools.iter().any( |tool| matches!(tool, ResponsesTool::Function(function) if function.name.as_str() == TOOL_SEARCH_NAME), @@ -189,11 +193,34 @@ impl RequestPayload { tracing::debug!("omitting provider tool_search fallback because the function name is already owned"); continue; } - tools.extend( - upstream_tools(tool).into_iter().filter(|tool| { - provider_function_name(tool).is_none_or(|name| provider_names.insert(name.to_owned())) - }), + let loaded_replacement = match &tool { + ResponsesTool::Function(function) + if function.defer_loading == Some(true) + && loaded_function_identities.contains_top_level(function.name.as_str()) => + { + loaded_tools + .iter() + .position(|loaded| loaded.name == function.name.as_str()) + .map(|index| loaded_tools.remove(index)) + } + _ => None, + }; + let upstream = loaded_replacement.map_or_else( + || upstream_tools(tool), + |loaded| { + tracing::debug!( + name = %loaded.name, + "replacing deferred top-level declaration with client-loaded tool" + ); + vec![UpstreamTool::Function(loaded)] + }, ); + for upstream_tool in upstream { + if let Some(name) = provider_function_name(&upstream_tool) { + provider_names.insert(name.to_owned()); + } + tools.push(upstream_tool); + } } for loaded in loaded_tools { if provider_names.insert(loaded.name.clone()) { @@ -302,8 +329,7 @@ fn upstream_tools(tool: ResponsesTool) -> Vec { fn provider_function_name(tool: &UpstreamTool) -> Option<&str> { match tool { UpstreamTool::Function(tool) => Some(&tool.name), - UpstreamTool::Custom(tool) => Some(tool.name.as_str()), - UpstreamTool::ToolSearch(_) => None, + UpstreamTool::Custom(_) | UpstreamTool::ToolSearch(_) => None, } } @@ -321,6 +347,8 @@ pub struct ResponsePayload { pub status: String, #[serde(default)] pub output: Vec, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub tools: Option>, pub usage: Option, pub incomplete_details: Option, pub error: Option, @@ -883,6 +911,113 @@ mod tests { assert!(tools[1].get("defer_loading").is_none()); } + #[test] + fn completed_client_search_replaces_matching_deferred_top_level_function() { + let payload: RequestPayload = serde_json::from_value(serde_json::json!({ + "model": "test", + "input": [ + { + "type": "tool_search_call", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "arguments": {"goal": "load current definition"} + }, + { + "type": "tool_search_output", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "tools": [{ + "type": "function", + "name": "shared_tool", + "description": "Loaded definition.", + "parameters": {"type": "object", "properties": {"fresh": {"type": "boolean"}}} + }] + } + ], + "tools": [ + { + "type": "function", + "name": "shared_tool", + "description": "Deferred stale definition.", + "parameters": {"type": "object", "properties": {"stale": {"type": "boolean"}}}, + "defer_loading": true + }, + { + "type": "tool_search", + "execution": "client", + "parameters": {"type": "object"} + } + ] + })) + .expect("valid deferred replacement request"); + + let upstream = serde_json::to_value(payload.to_upstream_request(false).expect("valid upstream request")) + .expect("serializable upstream request"); + let tools = upstream["tools"].as_array().expect("upstream tools"); + assert_eq!(tools.len(), 2); + assert_eq!(tools[0]["name"], "shared_tool"); + assert_eq!(tools[0]["description"], "Loaded definition."); + assert_eq!(tools[0]["parameters"]["properties"]["fresh"]["type"], "boolean"); + assert!(tools[0].get("defer_loading").is_none()); + assert_eq!(tools[1]["name"], TOOL_SEARCH_NAME); + } + + #[test] + fn same_name_original_declarations_survive_loaded_tool_deduplication() { + let payload: RequestPayload = serde_json::from_value(serde_json::json!({ + "model": "test", + "input": [ + { + "type": "tool_search_call", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "arguments": {"goal": "load tools"} + }, + { + "type": "tool_search_output", + "execution": "client", + "call_id": "call_search", + "status": "completed", + "tools": [ + {"type": "function", "name": "shared_tool", "description": "Loaded duplicate."}, + {"type": "function", "name": "custom_only", "description": "Loaded alongside custom."} + ] + } + ], + "tools": [ + {"type": "function", "name": "shared_tool", "description": "Original function."}, + {"type": "custom", "name": "shared_tool", "description": "Original custom."}, + {"type": "custom", "name": "custom_only", "description": "Custom does not claim function name."}, + {"type": "tool_search", "execution": "client", "parameters": {"type": "object"}} + ] + })) + .expect("valid same-name request"); + + let upstream = serde_json::to_value(payload.to_upstream_request(false).expect("valid upstream request")) + .expect("serializable upstream request"); + let tools = upstream["tools"].as_array().expect("upstream tools"); + assert_eq!(tools.len(), 5); + assert_eq!(tools[0]["type"], "function"); + assert_eq!(tools[0]["name"], "shared_tool"); + assert_eq!(tools[0]["description"], "Original function."); + assert_eq!(tools[1]["type"], "custom"); + assert_eq!(tools[1]["name"], "shared_tool"); + assert_eq!(tools[2]["type"], "custom"); + assert_eq!(tools[2]["name"], "custom_only"); + assert_eq!(tools[3]["name"], TOOL_SEARCH_NAME); + assert_eq!(tools[4]["type"], "function"); + assert_eq!(tools[4]["name"], "custom_only"); + assert_eq!(tools[4]["description"], "Loaded alongside custom."); + assert_eq!( + tools.iter().filter(|tool| tool["name"] == "shared_tool").count(), + 2, + "loaded duplicate should not replace or duplicate original declarations" + ); + } + #[test] fn responses_input_discards_unknown_items_when_converted_for_storage() { let input: ResponsesInput = serde_json::from_value(serde_json::json!([ @@ -905,6 +1040,7 @@ mod tests { model: "test-model".to_string(), status: "completed".to_string(), output: Vec::new(), + tools: None, usage: None, incomplete_details: None, error: None, @@ -938,6 +1074,7 @@ mod tests { model: "test-model".to_string(), status: "completed".to_string(), output: Vec::new(), + tools: None, usage: None, incomplete_details: None, error: None, diff --git a/crates/agentic-server-core/tests/accumulator_cassette_test.rs b/crates/agentic-server-core/tests/accumulator_cassette_test.rs index 9a600908..a4165cf5 100644 --- a/crates/agentic-server-core/tests/accumulator_cassette_test.rs +++ b/crates/agentic-server-core/tests/accumulator_cassette_test.rs @@ -19,15 +19,12 @@ const TOOL_CALLS_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/cassett const REASONING_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/cassettes/reasoning/responses"); const CODEX_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/cassettes/codex"); const WEB_SEARCH_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/cassettes/web_search"); -const TOOL_SEARCH_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/cassettes/tool_search"); const WEB_SEARCH_GATEWAY_MODEL: &str = "Qwen/Qwen3.5-35B-A3B-FP8"; const WEB_SEARCH_GATEWAY_MODEL_SLUG: &str = "Qwen-Qwen3.5-35B-A3B-FP8"; const WEB_SEARCH_OPENAI_MODEL: &str = "gpt-5.6"; const WEB_SEARCH_OPENAI_MODEL_SLUG: &str = "gpt-5.6"; const TOOL_SEARCH_GATEWAY_MODEL: &str = "Qwen/Qwen3.6-35B-A3B"; -const TOOL_SEARCH_GATEWAY_MODEL_SLUG: &str = "Qwen-Qwen3.6-35B-A3B"; const TOOL_SEARCH_OPENAI_MODEL: &str = "gpt-5.6"; -const TOOL_SEARCH_OPENAI_MODEL_SLUG: &str = "gpt-5.6"; // --- Legacy event cassette format --- @@ -113,31 +110,6 @@ fn load_web_search_cassette_pair(streaming: bool) -> (TurnCassette, TurnCassette (openai, gateway) } -fn load_tool_search_cassette_pair(streaming: bool) -> (TurnCassette, TurnCassette) { - let mode = if streaming { "streaming" } else { "nonstreaming" }; - let openai = load_turn_cassette_from( - TOOL_SEARCH_DIR, - &format!("tool-search-openai-reference-{TOOL_SEARCH_OPENAI_MODEL_SLUG}-{mode}.yaml"), - ); - let gateway = load_turn_cassette_from( - TOOL_SEARCH_DIR, - &format!("tool-search-gateway-{TOOL_SEARCH_GATEWAY_MODEL_SLUG}-{mode}.yaml"), - ); - (openai, gateway) -} - -fn load_tool_search_websocket_cassette_pair() -> (TurnCassette, TurnCassette) { - let openai = load_turn_cassette_from( - TOOL_SEARCH_DIR, - &format!("tool-search-openai-reference-{TOOL_SEARCH_OPENAI_MODEL_SLUG}-websocket-streaming.yaml"), - ); - let gateway = load_turn_cassette_from( - TOOL_SEARCH_DIR, - &format!("tool-search-gateway-{TOOL_SEARCH_GATEWAY_MODEL_SLUG}-websocket-streaming.yaml"), - ); - (openai, gateway) -} - /// Extracts `data: ...` lines from raw SSE entries (which may include /// `event:` lines and blank separators). fn extract_data_lines(sse_entries: &[String]) -> Vec { @@ -244,6 +216,44 @@ fn turn_request_body(turn: &Turn) -> serde_json::Value { serde_json::to_value(body).expect("request body must convert to JSON") } +#[derive(Clone, Copy)] +enum CodexToolSearchTransport { + HttpStreaming, + HttpNonStreaming, + WebSocket, +} + +fn recorded_completed_response(turn: &Turn) -> serde_json::Value { + if let Some(body) = &turn.response.body { + return body.clone(); + } + if !turn.response.websocket.is_empty() { + return turn + .response + .websocket + .iter() + .filter_map(|message| serde_json::from_str::(message).ok()) + .find(|event| event["type"] == "response.completed") + .map(|event| event["response"].clone()) + .expect("WebSocket turn must contain response.completed"); + } + extract_data_lines(&turn.response.sse) + .iter() + .find_map(|line| { + let data = line.strip_prefix("data: ")?; + let event: serde_json::Value = serde_json::from_str(data).ok()?; + (event["type"] == "response.completed").then(|| event["response"].clone()) + }) + .expect("HTTP streaming turn must contain response.completed") +} + +fn recorded_completed_response_id(turn: &Turn) -> String { + recorded_completed_response(turn)["id"] + .as_str() + .map(ToOwned::to_owned) + .expect("completed response must contain an id") +} + // === Legacy cassette tests === /// Feeds a real vLLM `function_call` SSE recording through the accumulator and @@ -684,6 +694,299 @@ fn test_codex_gateway_websocket_cassettes_preserve_function_and_namespace_calls( } } +fn assert_codex_tool_search_declarations(tools: &serde_json::Value, expected_defer_loading: Option, label: &str) { + let tools = tools + .as_array() + .unwrap_or_else(|| panic!("{label} should declare tools")); + let search: Vec<_> = tools.iter().filter(|tool| tool["type"] == "tool_search").collect(); + assert_eq!(search.len(), 1, "{label} should declare one native tool_search"); + assert_eq!(search[0]["execution"], "client"); + assert!( + !tools + .iter() + .any(|tool| tool["type"] == "function" && tool["name"] == "tool_search"), + "{label} should not leak the provider function fallback" + ); + let namespaces: Vec<_> = tools + .iter() + .filter(|tool| tool["type"] == "namespace" && tool["name"] == "mcp__agentic_fixture") + .collect(); + assert_eq!(namespaces.len(), 1, "{label} should declare one fixture namespace"); + let members = namespaces[0]["tools"] + .as_array() + .unwrap_or_else(|| panic!("{label} namespace should contain tools")); + let add_numbers: Vec<_> = members.iter().filter(|tool| tool["name"] == "add_numbers").collect(); + assert_eq!(add_numbers.len(), 1, "{label} should declare add_numbers exactly once"); + if let Some(expected_defer_loading) = expected_defer_loading { + assert_eq!( + add_numbers[0].get("defer_loading").and_then(serde_json::Value::as_bool), + Some(expected_defer_loading), + "{label} add_numbers defer_loading" + ); + } else { + assert!( + add_numbers[0].get("defer_loading").is_none(), + "{label} should omit add_numbers defer_loading after loading" + ); + } +} + +fn assert_loaded_codex_add_numbers(tools: &serde_json::Value, label: &str) { + let tools = tools.as_array().unwrap_or_else(|| panic!("{label} should load tools")); + let namespaces: Vec<_> = tools + .iter() + .filter(|tool| tool["type"] == "namespace" && tool["name"] == "mcp__agentic_fixture") + .collect(); + assert_eq!(namespaces.len(), 1, "{label} should load one fixture namespace"); + let members = namespaces[0]["tools"] + .as_array() + .unwrap_or_else(|| panic!("{label} loaded namespace should contain tools")); + assert_eq!( + members.iter().filter(|tool| tool["name"] == "add_numbers").count(), + 1, + "{label} should load add_numbers exactly once" + ); +} + +fn assert_codex_tool_search_lifecycle(cassette: &TurnCassette, transport: CodexToolSearchTransport, label: &str) { + for (turn_idx, turn) in cassette.turns.iter().enumerate() { + let turn_label = format!("{label} turn {}", turn_idx + 1); + let expected_defer_loading = (turn_idx == 0).then_some(true); + if matches!(transport, CodexToolSearchTransport::HttpNonStreaming) { + assert_codex_tool_search_declarations( + &recorded_completed_response(turn)["tools"], + expected_defer_loading, + &turn_label, + ); + continue; + } + let events: Vec = match transport { + CodexToolSearchTransport::HttpStreaming => extract_data_lines(&turn.response.sse) + .iter() + .filter_map(|line| line.strip_prefix("data: ")) + .filter(|data| *data != "[DONE]") + .map(|data| serde_json::from_str(data).expect("SSE event should be JSON")) + .collect(), + CodexToolSearchTransport::WebSocket => turn + .response + .websocket + .iter() + .map(|message| serde_json::from_str(message).expect("WebSocket message should be JSON")) + .collect(), + CodexToolSearchTransport::HttpNonStreaming => unreachable!(), + }; + for event_type in ["response.created", "response.in_progress", "response.completed"] { + let lifecycle: Vec<_> = events.iter().filter(|event| event["type"] == event_type).collect(); + assert_eq!(lifecycle.len(), 1, "{turn_label} should contain one {event_type}"); + assert_codex_tool_search_declarations( + &lifecycle[0]["response"]["tools"], + expected_defer_loading, + &turn_label, + ); + } + assert!( + !events + .iter() + .any(|event| { event["item"]["type"] == "function_call" && event["item"]["name"] == "tool_search" }), + "{turn_label} should not leak fallback function-call events" + ); + } +} + +fn assert_codex_tool_search_transport( + cassette: &TurnCassette, + transport: CodexToolSearchTransport, + model: &str, + label: &str, +) { + assert_eq!(cassette.turns.len(), 3, "{label} should have three turns"); + for (turn_idx, turn) in cassette.turns.iter().enumerate() { + let request = serde_json::to_value(&turn.request).expect("request should convert to JSON"); + let body = turn_request_body(turn); + let turn_label = format!("{label} request turn {}", turn_idx + 1); + assert_codex_tool_search_declarations(&body["tools"], Some(true), &turn_label); + assert_eq!(body["model"], model, "{label} should use the expected model"); + match transport { + CodexToolSearchTransport::HttpStreaming => { + assert_eq!(turn.response.status_code, Some(200)); + assert_eq!(body["stream"], true); + assert!(!turn.response.sse.is_empty(), "{label} should contain SSE events"); + assert!(turn.response.body.is_none()); + } + CodexToolSearchTransport::HttpNonStreaming => { + assert_eq!(turn.response.status_code, Some(200)); + assert_eq!(body["stream"], false); + assert!(turn.response.sse.is_empty()); + assert!(turn.response.body.is_some(), "{label} should contain an HTTP body"); + } + CodexToolSearchTransport::WebSocket => { + assert_eq!(turn.response.status_code, Some(101)); + assert_eq!(request["transport"], "websocket"); + assert_eq!(request["method"], "WEBSOCKET"); + assert_eq!(body["type"], "response.create"); + assert!(body.get("stream").is_none()); + assert!( + !turn.response.websocket.is_empty(), + "{label} should contain WebSocket messages" + ); + } + } + } +} + +fn process_codex_tool_search_turn( + cassette: &TurnCassette, + turn_idx: usize, + transport: CodexToolSearchTransport, + model: &str, +) -> Vec { + match transport { + CodexToolSearchTransport::HttpStreaming => process_codex_streaming_turn(cassette, turn_idx, model), + CodexToolSearchTransport::HttpNonStreaming => process_nonstreaming_turn(cassette, turn_idx, model), + CodexToolSearchTransport::WebSocket => process_websocket_turn(cassette, turn_idx, model), + } +} + +fn assert_exact_codex_tool_search_message(output: &[OutputItem], label: &str) { + let messages: Vec<_> = output + .iter() + .filter_map(|item| match item { + OutputItem::Message(message) => Some(message), + _ => None, + }) + .collect(); + assert_eq!(messages.len(), 1, "{label} should contain one assistant message"); + let text = messages[0] + .content + .iter() + .map(|content| content.text.as_str()) + .collect::(); + assert_eq!(text.trim(), "TOOL_SEARCH_CODEX_OK_42", "{label} final message"); +} + +fn assert_codex_tool_search_full_client_flow( + cassette: &TurnCassette, + transport: CodexToolSearchTransport, + model: &str, + label: &str, +) { + assert_codex_tool_search_transport(cassette, transport, model, label); + assert_codex_tool_search_lifecycle(cassette, transport, label); + let completed1 = recorded_completed_response(&cassette.turns[0]); + let raw_calls: Vec<_> = completed1["output"] + .as_array() + .unwrap_or_else(|| panic!("{label} turn 1 should contain output")) + .iter() + .filter(|item| item["type"] == "tool_search_call") + .collect(); + assert_eq!( + raw_calls.len(), + 1, + "{label} should expose one canonical tool_search_call" + ); + + let output1 = process_codex_tool_search_turn(cassette, 0, transport, model); + let search_call = assert_completed_client_tool_search(label, &output1); + let search_call_id = search_call + .call_id + .as_deref() + .expect("tool_search_call should have call_id"); + let turn2 = turn_request_body(&cassette.turns[1]); + let response1_id = recorded_completed_response_id(&cassette.turns[0]); + assert_eq!(turn2["previous_response_id"].as_str(), Some(response1_id.as_str())); + let search_outputs: Vec<_> = turn2["input"] + .as_array() + .expect("turn 2 input should be an array") + .iter() + .filter(|item| item["type"] == "tool_search_output") + .collect(); + assert_eq!(search_outputs.len(), 1, "{label} should return one tool_search_output"); + let search_output = search_outputs[0]; + assert_eq!(search_output["call_id"], search_call_id); + assert_eq!(search_output["execution"], "client"); + assert_eq!(search_output["status"], "completed"); + assert_loaded_codex_add_numbers(&search_output["tools"], label); + + let output2 = process_codex_tool_search_turn(cassette, 1, transport, model); + assert_eq!(count_function_calls(&output2), 1, "{label} turn 2 should have one call"); + let function_call = first_function_call(&output2); + assert_eq!(function_call.namespace.as_deref(), Some("mcp__agentic_fixture")); + assert_eq!(function_call.name, "add_numbers"); + let arguments: serde_json::Value = + serde_json::from_str(&function_call.arguments).expect("arguments should be JSON"); + assert_eq!(arguments["numbers"], serde_json::json!([8, 13, 21])); + assert!(!function_call.call_id.is_empty()); + assert_ne!( + search_call_id, + function_call.call_id.as_str(), + "{label} search and function calls should use distinct IDs" + ); + + let turn3 = turn_request_body(&cassette.turns[2]); + let response2_id = recorded_completed_response_id(&cassette.turns[1]); + assert_eq!(turn3["previous_response_id"].as_str(), Some(response2_id.as_str())); + let function_outputs: Vec<_> = turn3["input"] + .as_array() + .expect("turn 3 input should be an array") + .iter() + .filter(|item| item["type"] == "function_call_output") + .collect(); + assert_eq!(function_outputs.len(), 1, "{label} should return one function output"); + assert_eq!(function_outputs[0]["call_id"], function_call.call_id); + assert_eq!(function_outputs[0]["output"], r#"{"sum":42,"count":3}"#); + + let output3 = process_codex_tool_search_turn(cassette, 2, transport, model); + assert_exact_codex_tool_search_message(&output3, label); + assert_eq!(count_function_calls(&output3), 0); + assert!(!output3.iter().any(|item| matches!(item, OutputItem::ToolSearchCall(_)))); +} + +#[test] +fn test_codex_tool_search_full_client_flow_matrix() { + let cases = [ + ( + "gateway HTTP streaming", + "codex-gateway-http-tool-search-Qwen-Qwen3.6-35B-A3B-streaming.yaml", + TOOL_SEARCH_GATEWAY_MODEL, + CodexToolSearchTransport::HttpStreaming, + ), + ( + "gateway HTTP non-streaming", + "codex-gateway-http-tool-search-Qwen-Qwen3.6-35B-A3B-nonstreaming.yaml", + TOOL_SEARCH_GATEWAY_MODEL, + CodexToolSearchTransport::HttpNonStreaming, + ), + ( + "gateway WebSocket", + "codex-gateway-websocket-tool-search-Qwen-Qwen3.6-35B-A3B-streaming.yaml", + TOOL_SEARCH_GATEWAY_MODEL, + CodexToolSearchTransport::WebSocket, + ), + ( + "OpenAI HTTPS streaming", + "codex-openai-https-tool-search-gpt-5.6-streaming.yaml", + TOOL_SEARCH_OPENAI_MODEL, + CodexToolSearchTransport::HttpStreaming, + ), + ( + "OpenAI HTTPS non-streaming", + "codex-openai-https-tool-search-gpt-5.6-nonstreaming.yaml", + TOOL_SEARCH_OPENAI_MODEL, + CodexToolSearchTransport::HttpNonStreaming, + ), + ( + "OpenAI WebSocket", + "codex-openai-websocket-tool-search-gpt-5.6-streaming.yaml", + TOOL_SEARCH_OPENAI_MODEL, + CodexToolSearchTransport::WebSocket, + ), + ]; + for (label, filename, model, transport) in cases { + let cassette = load_codex_cassette(filename); + assert_codex_tool_search_full_client_flow(&cassette, transport, model, label); + } +} + #[test] fn test_codex_custom_tool_cassettes_preserve_raw_input() { let gateway_http = load_codex_cassette("codex-gateway-http-custom-tool-Qwen-Qwen3.6-35B-A3B-streaming.yaml"); @@ -996,49 +1299,6 @@ fn assert_matching_web_search_output(openai: &[OutputItem], gateway: &[OutputIte ); } -fn assert_native_client_tool_search_request(provider: &str, cassette: &TurnCassette) { - assert_eq!(cassette.turns.len(), 1, "{provider} cassette should have one turn"); - let request = serde_json::to_value(&cassette.turns[0].request).expect("request must convert to JSON"); - let websocket = request["transport"] == "websocket"; - assert_eq!( - cassette.turns[0].response.status_code, - Some(if websocket { 101 } else { 200 }), - "{provider} cassette should record a successful response" - ); - let body = turn_request_body(&cassette.turns[0]); - if websocket { - assert_eq!(request["method"], "WEBSOCKET"); - assert_eq!(body["type"], "response.create"); - assert!( - body.get("stream").is_none(), - "WebSocket request must not contain stream" - ); - } - assert_eq!(body["tool_choice"], "required"); - let tools = body["tools"] - .as_array() - .unwrap_or_else(|| panic!("{provider} cassette request should declare tools")); - - let search_tools: Vec<_> = tools.iter().filter(|tool| tool["type"] == "tool_search").collect(); - assert_eq!( - search_tools.len(), - 1, - "{provider} request should contain one native tool_search declaration" - ); - assert_eq!(search_tools[0]["execution"], "client"); - assert!( - search_tools[0].get("name").is_none(), - "{provider} public request should not contain the internal function fallback" - ); - - let deferred = tools - .iter() - .find(|tool| tool["type"] == "function" && tool["name"] == "get_shipping_eta") - .unwrap_or_else(|| panic!("{provider} request should contain get_shipping_eta")); - assert_eq!(deferred["defer_loading"], true); - assert_eq!(deferred["strict"], false); -} - fn assert_completed_client_tool_search<'a>(provider: &str, output: &'a [OutputItem]) -> &'a ToolSearchCall { assert_eq!( count_function_calls(output), @@ -1068,120 +1328,6 @@ fn assert_completed_client_tool_search<'a>(provider: &str, output: &'a [OutputIt call } -fn tool_search_sse_events(cassette: &TurnCassette) -> Vec { - extract_data_lines(&cassette.turns[0].response.sse) - .into_iter() - .filter_map(|line| { - let data = line.strip_prefix("data: ")?; - (data != "[DONE]").then(|| serde_json::from_str(data).expect("cassette SSE data should be JSON")) - }) - .collect() -} - -fn tool_search_websocket_events(cassette: &TurnCassette) -> Vec { - cassette.turns[0] - .response - .websocket - .iter() - .map(|message| serde_json::from_str(message).expect("cassette WebSocket message should be JSON")) - .collect() -} - -fn assert_tool_search_event_order(provider: &str, events: &[serde_json::Value]) { - let added_position = events - .iter() - .position(|event| event["type"] == "response.output_item.added" && event["item"]["type"] == "tool_search_call") - .unwrap_or_else(|| panic!("{provider} stream should add tool_search_call")); - let done_position = events - .iter() - .position(|event| event["type"] == "response.output_item.done" && event["item"]["type"] == "tool_search_call") - .unwrap_or_else(|| panic!("{provider} stream should complete tool_search_call")); - let completed_position = events - .iter() - .position(|event| event["type"] == "response.completed") - .unwrap_or_else(|| panic!("{provider} stream should complete the response")); - assert!( - added_position < done_position && done_position < completed_position, - "{provider} stream should add, finish, then publish the completed response" - ); - - let added = &events[added_position]; - let done = &events[done_position]; - assert_eq!(added["item"]["status"], "in_progress"); - assert_eq!(done["item"]["status"], "completed"); - assert_eq!(added["item"]["execution"], "client"); - assert_eq!(done["item"]["execution"], "client"); - assert_eq!(added["item"]["call_id"], done["item"]["call_id"]); - assert!( - added["item"]["call_id"] - .as_str() - .is_some_and(|call_id| !call_id.is_empty()), - "{provider} streaming tool_search_call should have a nonempty call_id" - ); - let completed_calls: Vec<_> = events[completed_position]["response"]["output"] - .as_array() - .unwrap_or_else(|| panic!("{provider} completed response should contain output")) - .iter() - .filter(|item| item["type"] == "tool_search_call") - .collect(); - assert_eq!( - completed_calls.len(), - 1, - "{provider} completed response should contain one tool_search_call" - ); - assert_eq!( - completed_calls[0]["call_id"], added["item"]["call_id"], - "{provider} tool_search_call should preserve call_id through response.completed output" - ); - assert_eq!(added["output_index"], done["output_index"]); - assert!( - !events - .iter() - .any(|event| { event["item"]["type"] == "function_call" && event["item"]["name"] == "tool_search" }) - ); -} - -fn assert_streaming_tool_search_order(provider: &str, cassette: &TurnCassette) { - assert_tool_search_event_order(provider, &tool_search_sse_events(cassette)); -} - -fn response_tool_summary(events: &[serde_json::Value], event_type: &str) -> serde_json::Value { - let lifecycle = events - .iter() - .find(|event| event["type"] == event_type) - .unwrap_or_else(|| panic!("streaming cassette should contain {event_type}")); - let tools = lifecycle["response"]["tools"] - .as_array() - .unwrap_or_else(|| panic!("{event_type} should expose tools")); - let search = tools - .iter() - .find(|tool| tool["type"] == "tool_search") - .unwrap_or_else(|| panic!("{event_type} should expose native tool_search")); - let deferred = tools - .iter() - .find(|tool| tool["type"] == "function" && tool["name"] == "get_shipping_eta") - .unwrap_or_else(|| panic!("{event_type} should expose get_shipping_eta")); - - serde_json::json!({ - "search": { - "execution": search["execution"], - "description": search["description"], - "parameters": search["parameters"], - }, - "deferred": { - "name": deferred["name"], - "description": deferred["description"], - "parameters": deferred["parameters"], - "strict": deferred["strict"], - "defer_loading": deferred["defer_loading"], - } - }) -} - -fn response_created_tool_summary(cassette: &TurnCassette) -> serde_json::Value { - response_tool_summary(&tool_search_sse_events(cassette), "response.created") -} - /// Extracts the `arguments` JSON string from the first function call in output items. fn get_first_fc_arguments(output: &[OutputItem]) -> String { output @@ -1226,83 +1372,6 @@ fn test_web_search_accumulator_streaming_matches_openai() { assert_matching_web_search_output(&openai_output, &gateway_output); } -#[test] -fn test_tool_search_accumulator_nonstreaming_matches_openai_contract() { - let (openai, gateway) = load_tool_search_cassette_pair(false); - assert_native_client_tool_search_request("OpenAI", &openai); - assert_native_client_tool_search_request("gateway", &gateway); - - let openai_output = process_nonstreaming_turn(&openai, 0, TOOL_SEARCH_OPENAI_MODEL); - let gateway_output = process_nonstreaming_turn(&gateway, 0, TOOL_SEARCH_GATEWAY_MODEL); - let openai_call = assert_completed_client_tool_search("OpenAI", &openai_output); - let gateway_call = assert_completed_client_tool_search("gateway", &gateway_output); - - assert_eq!(gateway_call.execution, openai_call.execution); - assert_eq!(gateway_call.status, openai_call.status); -} - -#[test] -fn test_tool_search_accumulator_streaming_matches_openai_contract() { - let (openai, gateway) = load_tool_search_cassette_pair(true); - for (provider, cassette) in [("OpenAI", &openai), ("gateway", &gateway)] { - assert_native_client_tool_search_request(provider, cassette); - assert_streaming_tool_search_order(provider, cassette); - } - assert_eq!( - response_created_tool_summary(&gateway), - response_created_tool_summary(&openai), - "gateway response.created tools should match the OpenAI public surface" - ); - - let openai_output = process_streaming_turn(&openai, 0, TOOL_SEARCH_OPENAI_MODEL); - let gateway_output = process_streaming_turn(&gateway, 0, TOOL_SEARCH_GATEWAY_MODEL); - let openai_call = assert_completed_client_tool_search("OpenAI", &openai_output); - let gateway_call = assert_completed_client_tool_search("gateway", &gateway_output); - - assert_eq!(gateway_call.execution, openai_call.execution); - assert_eq!(gateway_call.status, openai_call.status); -} - -// ═══════════════════════════════════════════════════════════════════ -// Tool-search Responses WebSocket replay -// Raw WebSocket messages, not the recorder's SSE compatibility mirror -// ═══════════════════════════════════════════════════════════════════ - -#[test] -fn test_tool_search_websocket_matches_openai_contract() { - let (openai, gateway) = load_tool_search_websocket_cassette_pair(); - let openai_events = tool_search_websocket_events(&openai); - let gateway_events = tool_search_websocket_events(&gateway); - - for (provider, cassette, events) in [ - ("OpenAI", &openai, openai_events.as_slice()), - ("gateway", &gateway, gateway_events.as_slice()), - ] { - assert_native_client_tool_search_request(provider, cassette); - assert_tool_search_event_order(provider, events); - assert!( - !events.iter().any(|event| event["type"] == "error"), - "{provider} WebSocket recording must not contain an error event" - ); - } - - for event_type in ["response.created", "response.in_progress", "response.completed"] { - assert_eq!( - response_tool_summary(&gateway_events, event_type), - response_tool_summary(&openai_events, event_type), - "gateway {event_type} tools should match the OpenAI public surface" - ); - } - - let openai_output = process_websocket_turn(&openai, 0, TOOL_SEARCH_OPENAI_MODEL); - let gateway_output = process_websocket_turn(&gateway, 0, TOOL_SEARCH_GATEWAY_MODEL); - let openai_call = assert_completed_client_tool_search("OpenAI WebSocket", &openai_output); - let gateway_call = assert_completed_client_tool_search("gateway WebSocket", &gateway_output); - - assert_eq!(gateway_call.execution, openai_call.execution); - assert_eq!(gateway_call.status, openai_call.status); -} - // Stateful 3-turn: get_job_status → get_error_logs → search_runbook // Non-streaming, store=true, previous_response_id chain diff --git a/crates/agentic-server-core/tests/cassettes/README.md b/crates/agentic-server-core/tests/cassettes/README.md index 3b3c8d36..e4e035c4 100644 --- a/crates/agentic-server-core/tests/cassettes/README.md +++ b/crates/agentic-server-core/tests/cassettes/README.md @@ -191,10 +191,9 @@ read `response.websocket` so they validate the recorded transport directly. | `record_text_only_cassettes.sh` | 10 text-only cassettes (responses + conv modes, streaming + non-streaming) | OpenAI (`OPENAI_API_KEY`) | | `record_reasoning_cassettes.sh` | 2 reasoning cassettes (single turn, streaming + non-streaming) | vLLM | | `record_tool_call_cassettes.sh` | 8 tool-call cassettes (4 tool_choice modes x streaming + non-streaming) | vLLM | -| `record_codex_cli_tool_call_cassettes.sh` | Codex function/namespace/custom-tool matrix | gateway, vLLM, and OpenAI | +| `record_codex_cli_tool_call_cassettes.sh` | Codex function/namespace/custom-tool matrix plus full client tool-search flows | gateway, vLLM, and OpenAI | | `record_mcp_cassettes.sh` | Native MCP counter tool discovery and calls (streaming + non-streaming) | gateway and OpenAI reference | | `record_web_search_cassettes.sh` | Matching web-search calls (streaming + non-streaming) | gateway and OpenAI reference | -| `record_tool_search_cassettes.sh` | Client tool-search calls (HTTP streaming/non-streaming + Responses WebSocket) | gateway and OpenAI reference | ### Text-only (OpenAI) @@ -229,28 +228,7 @@ OPENAI_API_KEY=sk-... \ bash crates/agentic-server-core/tests/cassettes/record_web_search_cassettes.sh ``` -### Tool search (gateway and OpenAI) - -The wrapper defaults to both providers and both transport modes, producing six live recordings: HTTP streaming, -HTTP non-streaming, and Responses WebSocket for OpenAI `gpt-5.6`, plus the same three scenarios for the configured -gateway model. The default therefore calls the paid OpenAI API and the configured remote gateway/upstream. Use -`TOOL_SEARCH_RECORD_SET=gateway` or `TOOL_SEARCH_RECORD_SET=openai` for one provider, and use -`TOOL_SEARCH_TRANSPORT_SET=http` or `TOOL_SEARCH_TRANSPORT_SET=websocket` for one transport mode. - -```bash -OPENAI_API_KEY=sk-... GATEWAY_URL=http://127.0.0.1:3018 \ -bash crates/agentic-server-core/tests/cassettes/record_tool_search_cassettes.sh -``` - -Record only the Responses WebSocket cassettes: - -```bash -TOOL_SEARCH_TRANSPORT_SET=websocket OPENAI_API_KEY=sk-... \ -GATEWAY_URL=http://127.0.0.1:3018 \ -bash crates/agentic-server-core/tests/cassettes/record_tool_search_cassettes.sh -``` - -### Codex custom tools (gateway, vLLM, and OpenAI) +### Codex tools (gateway, vLLM, and OpenAI) The custom fixture uses a Lark grammar and records two turns: the model returns raw `custom_tool_call.input`, then the recorder submits the matching `custom_tool_call_output` before the follow-up user message. @@ -269,6 +247,30 @@ OPENAI_CUSTOM_MODEL=gpt-5.6 \ bash tests/cassettes/record_codex_cli_tool_call_cassettes.sh openai-custom ``` +The Codex tool-search matrix records the full three-turn client continuation against the gateway and OpenAI using +HTTP streaming, HTTP non-streaming, and Responses WebSocket. The `all` and `experimental-all` targets include all six +recordings. Record only the tool-search matrix with: + +```bash +OPENAI_API_KEY=sk-... \ +GATEWAY_URL=http://127.0.0.1:3018 \ +V_MODEL=Qwen/Qwen3.6-35B-A3B \ +OPENAI_TOOL_SEARCH_MODEL=gpt-5.6 \ +bash crates/agentic-server-core/tests/cassettes/record_codex_cli_tool_call_cassettes.sh \ + tool-search +``` + +Provider-focused targets are `gateway-tool-search` and `openai-tool-search`. Transport-focused targets are +`gateway-http-tool-search`, `gateway-ws-tool-search`, `openai-https-tool-search`, and `openai-ws-tool-search`. For +example, record only the gateway WebSocket flow with: + +```bash +GATEWAY_URL=http://127.0.0.1:3018 \ +V_MODEL=Qwen/Qwen3.6-35B-A3B \ +bash crates/agentic-server-core/tests/cassettes/record_codex_cli_tool_call_cassettes.sh \ + gateway-ws-tool-search +``` + ### Compaction replay (OpenAI) These recordings capture the non-streaming `/v1/responses` inference calls replayed by the compaction integration diff --git a/crates/agentic-server-core/tests/cassettes/codex/codex-gateway-http-tool-search-Qwen-Qwen3.6-35B-A3B-nonstreaming.yaml b/crates/agentic-server-core/tests/cassettes/codex/codex-gateway-http-tool-search-Qwen-Qwen3.6-35B-A3B-nonstreaming.yaml new file mode 100644 index 00000000..9bca67a0 --- /dev/null +++ b/crates/agentic-server-core/tests/cassettes/codex/codex-gateway-http-tool-search-Qwen-Qwen3.6-35B-A3B-nonstreaming.yaml @@ -0,0 +1,472 @@ +turns: +- filename: t1 + request: + body: + input: Call tool_search to load mcp__agentic_fixture.add_numbers for adding + [8, 13, 21]. Do not call add_numbers yet. + max_output_tokens: 4096 + model: Qwen/Qwen3.6-35B-A3B + store: true + stream: false + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + headers: + accept: '*/*' + content-type: application/json + user-agent: python-httpx/0.28.1 + method: POST + path: /v1/responses + query_params: {} + response: + body: + conversation_id: null + created_at: 1785759519 + error: null + id: resp_019fc78f-bf53-7660-8362-5931c6f2b73b + incomplete_details: null + instructions: null + model: Qwen/Qwen3.6-35B-A3B + object: response + output: + - content: + - text: "The user wants me to call `tool_search` to find/load the `mcp__agentic_fixture.add_numbers`\ + \ function.\nThe goal for `tool_search` should be related to adding numbers\ + \ or specifically finding `add_numbers`.\nI must not call `add_numbers`\ + \ yet.\n\nParameters for `tool_search`:\n- goal: \"load mcp__agentic_fixture.add_numbers\ + \ for adding [8, 13, 21]\" or simply \"find add_numbers tool\"\n\nLet's\ + \ construct the call.\n`tool_search(goal=\"load mcp__agentic_fixture.add_numbers\ + \ for adding [8, 13, 21]\")` or similar.\nThe prompt says: \"Call tool_search\ + \ to load mcp__agentic_fixture.add_numbers for adding [8, 13, 21].\"\n\ + I will use exactly that or a close variation for the goal.\nActually,\ + \ the tool description says `tool_search` is \"Find the project-specific\ + \ function needed to continue the task.\"\nSo I'll set goal to \"load\ + \ mcp__agentic_fixture.add_numbers\".\nLet's proceed. \nWait, the prompt\ + \ says \"Call tool_search to load mcp__agentic_fixture.add_numbers for\ + \ adding [8, 13, 21].\"\nI will pass this exact phrase or a concise version.\n\ + `tool_search(goal=\"load mcp__agentic_fixture.add_numbers for adding [8,\ + \ 13, 21]\")`\nDone. \nCalling tool. \nProceeds. \nOutput matches expected.\n\ + Let's generate. \nWait, checking the tool name: `tool_search`.\nParameters:\ + \ `goal` (string).\nReady. \nI will call `tool_search` with goal=\"load\ + \ mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\".\nDone. \n\ + Proceeding. \n[Self-Correction/Verification]\nThe instruction says \"\ + Do not call add_numbers yet.\" So only `tool_search`.\nAll good. \nOutput\ + \ matches tool call format. \nProceeds. \n`tool_search(goal=\"load mcp__agentic_fixture.add_numbers\ + \ for adding [8, 13, 21]\")`\nDone. \nExecuting. \n[Output Generation]\ + \ -> tool call. \nDone. \n(Self-Correction/Refinement during thought)\n\ + Actually, the tool might just need a simple goal. I'll stick to the exact\ + \ phrasing or a clear description.\n\"load mcp__agentic_fixture.add_numbers\ + \ for adding [8, 13, 21]\" is fine.\nLet's output. \n[Done] \n`call: default_api:tool_search{\"\ + goal\": \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\"\ + }`\nWait, checking format: `tool_search` expects `goal`.\nAll good. \n\ + Proceeds. \n[Final Check]\nUser: \"Call tool_search to load mcp__agentic_fixture.add_numbers\ + \ for adding [8, 13, 21]. Do not call add_numbers yet.\"\nAction: Call\ + \ `tool_search` with `goal` = \"load mcp__agentic_fixture.add_numbers\ + \ for adding [8, 13, 21]\".\nMatches instructions.\nReady. \nOutput matches.\ + \ \n[Proceeds] \n(Note: I will generate the tool call exactly as requested.)\ + \ \n`call: default_api:tool_search{\"goal\": \"load mcp__agentic_fixture.add_numbers\ + \ for adding [8, 13, 21]\"}` \nDone. \n(Self-Correction/Note during generation\ + \ prep)\nActually, the prompt says \"Call tool_search to load mcp__agentic_fixture.add_numbers\ + \ for adding [8, 13, 21].\"\nI'll just use that as the goal.\nProceeds.\ + \ \n[Output Generation] -> Tool call.\n" + type: reasoning_text + encrypted_content: null + id: rs_019fc78f-d0bf-7a41-a089-fecb0756fa47 + status: null + summary: [] + type: reasoning + - arguments: + goal: load mcp__agentic_fixture.add_numbers for adding [8, 13, 21] + call_id: chatcmpl-tool-af42afb5d9509721 + execution: client + status: completed + type: tool_search_call + previous_response_id: null + status: completed + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + usage: + input_tokens: 392 + input_tokens_details: + cached_tokens: 0 + output_tokens: 876 + output_tokens_details: + reasoning_tokens: 771 + total_tokens: 1268 + headers: + content-type: application/json + status_code: 200 +- filename: t2 + request: + body: + input: + - call_id: chatcmpl-tool-af42afb5d9509721 + execution: client + status: completed + tools: + - description: Loaded Codex namespace fixture. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + type: tool_search_output + - content: Call the loaded mcp__agentic_fixture.add_numbers function with numbers + [8, 13, 21]. + role: user + type: message + max_output_tokens: 4096 + model: Qwen/Qwen3.6-35B-A3B + previous_response_id: resp_019fc78f-bf53-7660-8362-5931c6f2b73b + store: true + stream: false + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + headers: + accept: '*/*' + content-type: application/json + user-agent: python-httpx/0.28.1 + method: POST + path: /v1/responses + query_params: {} + response: + body: + conversation_id: null + created_at: 1785759521 + error: null + id: resp_019fc78f-d156-7432-84bc-84b98ce92f15 + incomplete_details: null + instructions: null + model: Qwen/Qwen3.6-35B-A3B + object: response + output: + - content: + - text: 'The user wants to call the `mcp__agentic_fixture.add_numbers` function + with the numbers `[8, 13, 21]`. + + I have already called `tool_search` to load it, and the result shows that + `mcp__agentic_fixture` namespace is loaded with `add_numbers` tool. + + Now I will call `mcp__agentic_fixture.add_numbers` with the specified + numbers. + + Wait, the available tools in the environment are: + + 1. `agentic_ns__mcp__agentic_fixture__add_numbers` (which corresponds + to `mcp__agentic_fixture.add_numbers`) + + 2. `add_numbers` + + + I will use `agentic_ns__mcp__agentic_fixture__add_numbers` with `numbers: + [8, 13, 21]`. + + Let''s verify the tool name mapping. Usually, `mcp__agentic_fixture__add_numbers` + or `agentic_ns__mcp__agentic_fixture__add_numbers`. + + Looking at the tools list provided in the prompt: + + `agentic_ns__mcp__agentic_fixture__add_numbers` + + `add_numbers` + + I will use `agentic_ns__mcp__agentic_fixture__add_numbers`. + + Parameters: `{"numbers": [8, 13, 21]}` + + Let''s make the call. + + ' + type: reasoning_text + encrypted_content: null + id: rs_019fc78f-d8e6-7751-b91a-658097acf2e5 + status: null + summary: [] + type: reasoning + - arguments: '{"numbers": [8, 13, 21]}' + call_id: chatcmpl-tool-8e2b71fa7650197a + id: fc_019fc78f-d90c-75e2-a3c5-7229100e775e + name: add_numbers + namespace: mcp__agentic_fixture + status: completed + type: function_call + previous_response_id: resp_019fc78f-bf53-7660-8362-5931c6f2b73b + status: completed + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + usage: + input_tokens: 688 + input_tokens_details: + cached_tokens: 0 + output_tokens: 339 + output_tokens_details: + reasoning_tokens: 269 + total_tokens: 1027 + headers: + content-type: application/json + status_code: 200 +- filename: t3 + request: + body: + input: + - call_id: chatcmpl-tool-8e2b71fa7650197a + output: '{"sum":42,"count":3}' + type: function_call_output + - content: Use the function output and return exactly TOOL_SEARCH_CODEX_OK_42. + role: user + type: message + max_output_tokens: 4096 + model: Qwen/Qwen3.6-35B-A3B + previous_response_id: resp_019fc78f-d156-7432-84bc-84b98ce92f15 + store: true + stream: false + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + headers: + accept: '*/*' + content-type: application/json + user-agent: python-httpx/0.28.1 + method: POST + path: /v1/responses + query_params: {} + response: + body: + conversation_id: null + created_at: 1785759522 + error: null + id: resp_019fc78f-d96c-79d0-b6a7-a0775450f3cd + incomplete_details: null + instructions: null + model: Qwen/Qwen3.6-35B-A3B + object: response + output: + - content: + - text: "The user wants me to return the string \"TOOL_SEARCH_CODEX_OK_42\"\ + \ based on the previous output.\nThe previous output from `mcp__agentic_fixtureadd_numbers`\ + \ was `{\"sum\":42,\"count\":3}`.\nThe user explicitly instructs: \"return\ + \ exactly TOOL_SEARCH_CODEX_OK_42.\"\nI will just output this string.\n\ + I don't need to call any tools.\nI'll just output the text.\nCheck format:\ + \ \"TOOL_SEARCH_CODEX_OK_42\"\nDone. \nProceeding. \nOutput: TOOL_SEARCH_CODEX_OK_42\n" + type: reasoning_text + encrypted_content: null + id: rs_019fc78f-dd83-7172-979b-dbdaaa92a606 + status: null + summary: [] + type: reasoning + - content: + - annotations: [] + text: ' + + + TOOL_SEARCH_CODEX_OK_42' + type: output_text + id: msg_019fc78f-dd9b-7e40-823a-de6c7791dc6b + role: assistant + status: completed + type: message + previous_response_id: resp_019fc78f-d156-7432-84bc-84b98ce92f15 + status: completed + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + usage: + input_tokens: 774 + input_tokens_details: + cached_tokens: 0 + output_tokens: 144 + output_tokens_details: + reasoning_tokens: 120 + total_tokens: 918 + headers: + content-type: application/json + status_code: 200 diff --git a/crates/agentic-server-core/tests/cassettes/codex/codex-gateway-http-tool-search-Qwen-Qwen3.6-35B-A3B-streaming.yaml b/crates/agentic-server-core/tests/cassettes/codex/codex-gateway-http-tool-search-Qwen-Qwen3.6-35B-A3B-streaming.yaml new file mode 100644 index 00000000..ae1ea708 --- /dev/null +++ b/crates/agentic-server-core/tests/cassettes/codex/codex-gateway-http-tool-search-Qwen-Qwen3.6-35B-A3B-streaming.yaml @@ -0,0 +1,5091 @@ +turns: +- filename: t1 + request: + body: + input: Call tool_search to load mcp__agentic_fixture.add_numbers for adding + [8, 13, 21]. Do not call add_numbers yet. + max_output_tokens: 4096 + model: Qwen/Qwen3.6-35B-A3B + store: true + stream: true + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + headers: + accept: '*/*' + content-type: application/json + user-agent: python-httpx/0.28.1 + method: POST + path: /v1/responses + query_params: {} + response: + headers: + content-type: text/event-stream; charset=utf-8 + sse: + - 'data: {"type":"response.created","sequence_number":0,"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785759501,"error":null,"frequency_penalty":0.0,"id":"resp_019fc78f-8ded-7ba0-824f-0786e6908dde","incomplete_details":null,"instructions":null,"max_output_tokens":4096,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"defer_loading":true,"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null}} + + ' + - ' + + ' + - 'data: {"type":"response.in_progress","sequence_number":1,"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785759501,"error":null,"frequency_penalty":0.0,"id":"resp_019fc78f-8ded-7ba0-824f-0786e6908dde","incomplete_details":null,"instructions":null,"max_output_tokens":4096,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"defer_loading":true,"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null}} + + ' + - ' + + ' + - 'data: {"type":"response.output_item.added","sequence_number":2,"output_index":0,"item":{"content":[],"id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd","summary":[],"type":"reasoning"}} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":3,"output_index":0,"content_index":0,"delta":"The","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":4,"output_index":0,"content_index":0,"delta":" + user wants me","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":5,"output_index":0,"content_index":0,"delta":" + to call `","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":6,"output_index":0,"content_index":0,"delta":"tool_search`","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":7,"output_index":0,"content_index":0,"delta":" + to load a","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":8,"output_index":0,"content_index":0,"delta":" + specific tool","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":9,"output_index":0,"content_index":0,"delta":" + named","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":10,"output_index":0,"content_index":0,"delta":" + `mcp","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":11,"output_index":0,"content_index":0,"delta":"__agentic","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":12,"output_index":0,"content_index":0,"delta":"_fixture.add_numbers","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":13,"output_index":0,"content_index":0,"delta":"`","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":14,"output_index":0,"content_index":0,"delta":" + for the","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":15,"output_index":0,"content_index":0,"delta":" + purpose of adding","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":16,"output_index":0,"content_index":0,"delta":" + the numbers [","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":17,"output_index":0,"content_index":0,"delta":"8, + ","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":18,"output_index":0,"content_index":0,"delta":"13,","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":19,"output_index":0,"content_index":0,"delta":" + 21","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":20,"output_index":0,"content_index":0,"delta":"].\nThe","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":21,"output_index":0,"content_index":0,"delta":" + user explicitly instruct","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":22,"output_index":0,"content_index":0,"delta":"s + me *","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":23,"output_index":0,"content_index":0,"delta":"not* + to","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":24,"output_index":0,"content_index":0,"delta":" + call `add","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":25,"output_index":0,"content_index":0,"delta":"_numbers` + yet","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":26,"output_index":0,"content_index":0,"delta":".\n","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":27,"output_index":0,"content_index":0,"delta":"So","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":28,"output_index":0,"content_index":0,"delta":" + I just","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":29,"output_index":0,"content_index":0,"delta":" + need to call","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":30,"output_index":0,"content_index":0,"delta":" + `tool_search","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":31,"output_index":0,"content_index":0,"delta":"` + with a","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":32,"output_index":0,"content_index":0,"delta":" + goal that","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":33,"output_index":0,"content_index":0,"delta":" + reflects","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":34,"output_index":0,"content_index":0,"delta":" + this intent","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":35,"output_index":0,"content_index":0,"delta":".\n\nGoal","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":36,"output_index":0,"content_index":0,"delta":" + string","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":37,"output_index":0,"content_index":0,"delta":" + could","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":38,"output_index":0,"content_index":0,"delta":" + be something like","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":39,"output_index":0,"content_index":0,"delta":" + \"","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":40,"output_index":0,"content_index":0,"delta":"load + mcp","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":41,"output_index":0,"content_index":0,"delta":"__agentic","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":42,"output_index":0,"content_index":0,"delta":"_fixture.add_numbers","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":43,"output_index":0,"content_index":0,"delta":" + for adding [","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":44,"output_index":0,"content_index":0,"delta":"8, + ","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":45,"output_index":0,"content_index":0,"delta":"13,","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":46,"output_index":0,"content_index":0,"delta":" + 21","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":47,"output_index":0,"content_index":0,"delta":"]\" + or just","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":48,"output_index":0,"content_index":0,"delta":" + mention","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":49,"output_index":0,"content_index":0,"delta":" + the tool name","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":50,"output_index":0,"content_index":0,"delta":".\n","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":51,"output_index":0,"content_index":0,"delta":"Let''s + look","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":52,"output_index":0,"content_index":0,"delta":" + at the `","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":53,"output_index":0,"content_index":0,"delta":"tool_search`","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":54,"output_index":0,"content_index":0,"delta":" + function:","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":55,"output_index":0,"content_index":0,"delta":"\n`tool","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":56,"output_index":0,"content_index":0,"delta":"_search(goal","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":57,"output_index":0,"content_index":0,"delta":":","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":58,"output_index":0,"content_index":0,"delta":" + string)`","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":59,"output_index":0,"content_index":0,"delta":"\n\nI + will","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":60,"output_index":0,"content_index":0,"delta":" + pass","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":61,"output_index":0,"content_index":0,"delta":" + the exact","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":62,"output_index":0,"content_index":0,"delta":" + tool","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":63,"output_index":0,"content_index":0,"delta":" + name or a","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":64,"output_index":0,"content_index":0,"delta":" + descriptive","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":65,"output_index":0,"content_index":0,"delta":" + goal to `","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":66,"output_index":0,"content_index":0,"delta":"tool_search`.","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":67,"output_index":0,"content_index":0,"delta":"\n`tool","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":68,"output_index":0,"content_index":0,"delta":"_search(\"","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":69,"output_index":0,"content_index":0,"delta":"load + mcp","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":70,"output_index":0,"content_index":0,"delta":"__agentic","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":71,"output_index":0,"content_index":0,"delta":"_fixture.add_numbers","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":72,"output_index":0,"content_index":0,"delta":" + for adding [","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":73,"output_index":0,"content_index":0,"delta":"8, + ","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":74,"output_index":0,"content_index":0,"delta":"13,","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":75,"output_index":0,"content_index":0,"delta":" + 21","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":76,"output_index":0,"content_index":0,"delta":"]\")`\n\n","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":77,"output_index":0,"content_index":0,"delta":"Wait, + the","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":78,"output_index":0,"content_index":0,"delta":" + prompt says \"","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":79,"output_index":0,"content_index":0,"delta":"Call + tool_search","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":80,"output_index":0,"content_index":0,"delta":" + to load m","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":81,"output_index":0,"content_index":0,"delta":"cp__ag","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":82,"output_index":0,"content_index":0,"delta":"entic_fixture.add","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":83,"output_index":0,"content_index":0,"delta":"_numbers + for adding","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":84,"output_index":0,"content_index":0,"delta":" + [8,","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":85,"output_index":0,"content_index":0,"delta":" + 13","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":86,"output_index":0,"content_index":0,"delta":", + 2","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":87,"output_index":0,"content_index":0,"delta":"1].\"","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":88,"output_index":0,"content_index":0,"delta":"\nI + will","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":89,"output_index":0,"content_index":0,"delta":" + use that","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":90,"output_index":0,"content_index":0,"delta":" + exact phrase","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":91,"output_index":0,"content_index":0,"delta":" + or something","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":92,"output_index":0,"content_index":0,"delta":" + similar as","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":93,"output_index":0,"content_index":0,"delta":" + the goal.","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":94,"output_index":0,"content_index":0,"delta":"\nLet''s","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":95,"output_index":0,"content_index":0,"delta":" + just","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":96,"output_index":0,"content_index":0,"delta":" + pass","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":97,"output_index":0,"content_index":0,"delta":" + the goal.","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":98,"output_index":0,"content_index":0,"delta":"\nProceed","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":99,"output_index":0,"content_index":0,"delta":". + \nWait","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":100,"output_index":0,"content_index":0,"delta":", + should","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":101,"output_index":0,"content_index":0,"delta":" + I include","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":102,"output_index":0,"content_index":0,"delta":" + the numbers","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":103,"output_index":0,"content_index":0,"delta":" + in the goal","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":104,"output_index":0,"content_index":0,"delta":"? + \"","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":105,"output_index":0,"content_index":0,"delta":"load + mcp","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":106,"output_index":0,"content_index":0,"delta":"__agentic","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":107,"output_index":0,"content_index":0,"delta":"_fixture.add_numbers","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":108,"output_index":0,"content_index":0,"delta":" + for adding [","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":109,"output_index":0,"content_index":0,"delta":"8, + ","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":110,"output_index":0,"content_index":0,"delta":"13,","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":111,"output_index":0,"content_index":0,"delta":" + 21","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":112,"output_index":0,"content_index":0,"delta":"]\" + is","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":113,"output_index":0,"content_index":0,"delta":" + fine.\n","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":114,"output_index":0,"content_index":0,"delta":"I''ll + make","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":115,"output_index":0,"content_index":0,"delta":" + the function","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":116,"output_index":0,"content_index":0,"delta":" + call. \n","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":117,"output_index":0,"content_index":0,"delta":"Checking","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":118,"output_index":0,"content_index":0,"delta":" + parameters","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":119,"output_index":0,"content_index":0,"delta":": + `","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":120,"output_index":0,"content_index":0,"delta":"goal` + is","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":121,"output_index":0,"content_index":0,"delta":" + required.\n","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":122,"output_index":0,"content_index":0,"delta":"All","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":123,"output_index":0,"content_index":0,"delta":" + good. \n","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":124,"output_index":0,"content_index":0,"delta":"Calling + tool_search","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":125,"output_index":0,"content_index":0,"delta":". + \nI","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":126,"output_index":0,"content_index":0,"delta":"''ll","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":127,"output_index":0,"content_index":0,"delta":" + format","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":128,"output_index":0,"content_index":0,"delta":" + it","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":129,"output_index":0,"content_index":0,"delta":" + correctly. \n","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":130,"output_index":0,"content_index":0,"delta":"`tool_search","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":131,"output_index":0,"content_index":0,"delta":"(goal=\"load","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":132,"output_index":0,"content_index":0,"delta":" + mcp__","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":133,"output_index":0,"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":134,"output_index":0,"content_index":0,"delta":".add_numbers + for","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":135,"output_index":0,"content_index":0,"delta":" + adding [8","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":136,"output_index":0,"content_index":0,"delta":", + 1","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":137,"output_index":0,"content_index":0,"delta":"3, + ","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":138,"output_index":0,"content_index":0,"delta":"21]\")","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":139,"output_index":0,"content_index":0,"delta":"`\nDone","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":140,"output_index":0,"content_index":0,"delta":". + \nLet","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":141,"output_index":0,"content_index":0,"delta":"''s + output","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":142,"output_index":0,"content_index":0,"delta":".","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":143,"output_index":0,"content_index":0,"delta":" + \nActually","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":144,"output_index":0,"content_index":0,"delta":", + I should","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":145,"output_index":0,"content_index":0,"delta":" + just use the","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":146,"output_index":0,"content_index":0,"delta":" + tool","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":147,"output_index":0,"content_index":0,"delta":".","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":148,"output_index":0,"content_index":0,"delta":"\nWait","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":149,"output_index":0,"content_index":0,"delta":", + `","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":150,"output_index":0,"content_index":0,"delta":"tool_search`","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":151,"output_index":0,"content_index":0,"delta":" + returns","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":152,"output_index":0,"content_index":0,"delta":" + the tool","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":153,"output_index":0,"content_index":0,"delta":" + definition or","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":154,"output_index":0,"content_index":0,"delta":" + configuration","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":155,"output_index":0,"content_index":0,"delta":". + I","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":156,"output_index":0,"content_index":0,"delta":" + don","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":157,"output_index":0,"content_index":0,"delta":"''t + need to","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":158,"output_index":0,"content_index":0,"delta":" + simulate","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":159,"output_index":0,"content_index":0,"delta":" + it,","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":160,"output_index":0,"content_index":0,"delta":" + I just call","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":161,"output_index":0,"content_index":0,"delta":" + it.\n","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":162,"output_index":0,"content_index":0,"delta":"Proceed","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":163,"output_index":0,"content_index":0,"delta":"ing","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":164,"output_index":0,"content_index":0,"delta":". + \n`","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":165,"output_index":0,"content_index":0,"delta":"call","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":166,"output_index":0,"content_index":0,"delta":": + default","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":167,"output_index":0,"content_index":0,"delta":"_api:tool","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":168,"output_index":0,"content_index":0,"delta":"_search{\"","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":169,"output_index":0,"content_index":0,"delta":"goal\": + \"","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":170,"output_index":0,"content_index":0,"delta":"load + mcp","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":171,"output_index":0,"content_index":0,"delta":"__agentic","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":172,"output_index":0,"content_index":0,"delta":"_fixture.add_numbers","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":173,"output_index":0,"content_index":0,"delta":" + for adding [","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":174,"output_index":0,"content_index":0,"delta":"8, + ","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":175,"output_index":0,"content_index":0,"delta":"13,","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":176,"output_index":0,"content_index":0,"delta":" + 21","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":177,"output_index":0,"content_index":0,"delta":"]\"}`\n","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":178,"output_index":0,"content_index":0,"delta":"Wait","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":179,"output_index":0,"content_index":0,"delta":", + the user","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":180,"output_index":0,"content_index":0,"delta":" + says","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":181,"output_index":0,"content_index":0,"delta":" + \"Call tool","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":182,"output_index":0,"content_index":0,"delta":"_search + to load","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":183,"output_index":0,"content_index":0,"delta":" + mcp__","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":184,"output_index":0,"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":185,"output_index":0,"content_index":0,"delta":".add_numbers + for","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":186,"output_index":0,"content_index":0,"delta":" + adding [8","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":187,"output_index":0,"content_index":0,"delta":", + 1","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":188,"output_index":0,"content_index":0,"delta":"3, + ","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":189,"output_index":0,"content_index":0,"delta":"21].\"","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":190,"output_index":0,"content_index":0,"delta":"\nI''ll","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":191,"output_index":0,"content_index":0,"delta":" + stick","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":192,"output_index":0,"content_index":0,"delta":" + to that.","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":193,"output_index":0,"content_index":0,"delta":"\nDone.","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":194,"output_index":0,"content_index":0,"delta":" + \nOutput matches","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":195,"output_index":0,"content_index":0,"delta":" + requirement","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":196,"output_index":0,"content_index":0,"delta":".\n","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":197,"output_index":0,"content_index":0,"delta":"Let","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":198,"output_index":0,"content_index":0,"delta":"''s + generate.","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":199,"output_index":0,"content_index":0,"delta":" + \n(Self","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":200,"output_index":0,"content_index":0,"delta":"-Correction","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":201,"output_index":0,"content_index":0,"delta":"/Ref","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":202,"output_index":0,"content_index":0,"delta":"inement + during thought","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":203,"output_index":0,"content_index":0,"delta":")\nIs","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":204,"output_index":0,"content_index":0,"delta":" + there","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":205,"output_index":0,"content_index":0,"delta":" + any specific","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":206,"output_index":0,"content_index":0,"delta":" + format required","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":207,"output_index":0,"content_index":0,"delta":"?","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":208,"output_index":0,"content_index":0,"delta":" + No","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":209,"output_index":0,"content_index":0,"delta":".\nI","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":210,"output_index":0,"content_index":0,"delta":" + will just call","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":211,"output_index":0,"content_index":0,"delta":" + the tool.","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":212,"output_index":0,"content_index":0,"delta":"\nDone","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":213,"output_index":0,"content_index":0,"delta":". + \nProceed","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":214,"output_index":0,"content_index":0,"delta":".","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":215,"output_index":0,"content_index":0,"delta":" + \n`","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":216,"output_index":0,"content_index":0,"delta":"tool_search`","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":217,"output_index":0,"content_index":0,"delta":" + with goal `","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":218,"output_index":0,"content_index":0,"delta":"load + mcp","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":219,"output_index":0,"content_index":0,"delta":"__agentic","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":220,"output_index":0,"content_index":0,"delta":"_fixture.add_numbers","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":221,"output_index":0,"content_index":0,"delta":" + for adding [","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":222,"output_index":0,"content_index":0,"delta":"8, + ","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":223,"output_index":0,"content_index":0,"delta":"13,","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":224,"output_index":0,"content_index":0,"delta":" + 21","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":225,"output_index":0,"content_index":0,"delta":"]`\n","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":226,"output_index":0,"content_index":0,"delta":"Done","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":227,"output_index":0,"content_index":0,"delta":". + \nOutput","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":228,"output_index":0,"content_index":0,"delta":" + matches. \n","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":229,"output_index":0,"content_index":0,"delta":"Proceeds.","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":230,"output_index":0,"content_index":0,"delta":" + \n[Final","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":231,"output_index":0,"content_index":0,"delta":" + Check]\n","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":232,"output_index":0,"content_index":0,"delta":"Function: + tool","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":233,"output_index":0,"content_index":0,"delta":"_search\nParameter","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":234,"output_index":0,"content_index":0,"delta":": + goal =","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":235,"output_index":0,"content_index":0,"delta":" + \"load m","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":236,"output_index":0,"content_index":0,"delta":"cp__ag","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":237,"output_index":0,"content_index":0,"delta":"entic_fixture.add","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":238,"output_index":0,"content_index":0,"delta":"_numbers + for adding","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":239,"output_index":0,"content_index":0,"delta":" + [8,","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":240,"output_index":0,"content_index":0,"delta":" + 13","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":241,"output_index":0,"content_index":0,"delta":", + 2","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":242,"output_index":0,"content_index":0,"delta":"1]\"\n","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":243,"output_index":0,"content_index":0,"delta":"User","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":244,"output_index":0,"content_index":0,"delta":" + explicitly","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":245,"output_index":0,"content_index":0,"delta":" + says","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":246,"output_index":0,"content_index":0,"delta":" + \"Do not","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":247,"output_index":0,"content_index":0,"delta":" + call add_numbers","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":248,"output_index":0,"content_index":0,"delta":" + yet.\"\n","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":249,"output_index":0,"content_index":0,"delta":"All","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":250,"output_index":0,"content_index":0,"delta":" + constraints met.","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":251,"output_index":0,"content_index":0,"delta":"\nOutput","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":252,"output_index":0,"content_index":0,"delta":"ting","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":253,"output_index":0,"content_index":0,"delta":". + \n[","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":254,"output_index":0,"content_index":0,"delta":"Done] + \n","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":255,"output_index":0,"content_index":0,"delta":"`call","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":256,"output_index":0,"content_index":0,"delta":":default","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":257,"output_index":0,"content_index":0,"delta":"_api:tool","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":258,"output_index":0,"content_index":0,"delta":"_search{\"goal","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":259,"output_index":0,"content_index":0,"delta":"\":\"load + m","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":260,"output_index":0,"content_index":0,"delta":"cp__ag","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":261,"output_index":0,"content_index":0,"delta":"entic_fixture.add","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":262,"output_index":0,"content_index":0,"delta":"_numbers + for adding","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":263,"output_index":0,"content_index":0,"delta":" + [8,","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":264,"output_index":0,"content_index":0,"delta":" + 13","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":265,"output_index":0,"content_index":0,"delta":", + 2","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":266,"output_index":0,"content_index":0,"delta":"1]\"}`","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":267,"output_index":0,"content_index":0,"delta":"\nWait,","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":268,"output_index":0,"content_index":0,"delta":" + checking","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":269,"output_index":0,"content_index":0,"delta":" + the exact tool","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":270,"output_index":0,"content_index":0,"delta":" + name in","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":271,"output_index":0,"content_index":0,"delta":" + the prompt:","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":272,"output_index":0,"content_index":0,"delta":" + `mcp","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":273,"output_index":0,"content_index":0,"delta":"__agentic","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":274,"output_index":0,"content_index":0,"delta":"_fixture.add_numbers","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":275,"output_index":0,"content_index":0,"delta":"`","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":276,"output_index":0,"content_index":0,"delta":"\nI","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":277,"output_index":0,"content_index":0,"delta":"''ll","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":278,"output_index":0,"content_index":0,"delta":" + use exactly that","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":279,"output_index":0,"content_index":0,"delta":".\nDone","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":280,"output_index":0,"content_index":0,"delta":". + \nProceed","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":281,"output_index":0,"content_index":0,"delta":"s. + \n","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":282,"output_index":0,"content_index":0,"delta":"Output","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":283,"output_index":0,"content_index":0,"delta":" + Generation","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":284,"output_index":0,"content_index":0,"delta":". + \n(Note","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":285,"output_index":0,"content_index":0,"delta":": + I will","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":286,"output_index":0,"content_index":0,"delta":" + format","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":287,"output_index":0,"content_index":0,"delta":" + it","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":288,"output_index":0,"content_index":0,"delta":" + as a standard","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":289,"output_index":0,"content_index":0,"delta":" + tool call)","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":290,"output_index":0,"content_index":0,"delta":"\n`\n","item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.done","sequence_number":291,"output_index":0,"content_index":0,"item_id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd","text":"The + user wants me to call `tool_search` to load a specific tool named `mcp__agentic_fixture.add_numbers` + for the purpose of adding the numbers [8, 13, 21].\nThe user explicitly instructs + me *not* to call `add_numbers` yet.\nSo I just need to call `tool_search` with + a goal that reflects this intent.\n\nGoal string could be something like \"load + mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\" or just mention the + tool name.\nLet''s look at the `tool_search` function:\n`tool_search(goal: string)`\n\nI + will pass the exact tool name or a descriptive goal to `tool_search`.\n`tool_search(\"load + mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\")`\n\nWait, the prompt + says \"Call tool_search to load mcp__agentic_fixture.add_numbers for adding + [8, 13, 21].\"\nI will use that exact phrase or something similar as the goal.\nLet''s + just pass the goal.\nProceed. \nWait, should I include the numbers in the goal? + \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\" is fine.\nI''ll + make the function call. \nChecking parameters: `goal` is required.\nAll good. + \nCalling tool_search. \nI''ll format it correctly. \n`tool_search(goal=\"load + mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\")`\nDone. \nLet''s + output. \nActually, I should just use the tool.\nWait, `tool_search` returns + the tool definition or configuration. I don''t need to simulate it, I just call + it.\nProceeding. \n`call: default_api:tool_search{\"goal\": \"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\"}`\nWait, the user says \"Call tool_search to load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21].\"\nI''ll stick to that.\nDone. \nOutput matches requirement.\nLet''s + generate. \n(Self-Correction/Refinement during thought)\nIs there any specific + format required? No.\nI will just call the tool.\nDone. \nProceed. \n`tool_search` + with goal `load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]`\nDone. + \nOutput matches. \nProceeds. \n[Final Check]\nFunction: tool_search\nParameter: + goal = \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\"\nUser + explicitly says \"Do not call add_numbers yet.\"\nAll constraints met.\nOutputting. + \n[Done] \n`call:default_api:tool_search{\"goal\":\"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\"}`\nWait, checking the exact tool name in the prompt: + `mcp__agentic_fixture.add_numbers`\nI''ll use exactly that.\nDone. \nProceeds. + \nOutput Generation. \n(Note: I will format it as a standard tool call)\n`\n"} + + ' + - ' + + ' + - 'data: {"type":"response.output_item.done","sequence_number":292,"output_index":0,"item":{"content":[{"text":"The + user wants me to call `tool_search` to load a specific tool named `mcp__agentic_fixture.add_numbers` + for the purpose of adding the numbers [8, 13, 21].\nThe user explicitly instructs + me *not* to call `add_numbers` yet.\nSo I just need to call `tool_search` with + a goal that reflects this intent.\n\nGoal string could be something like \"load + mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\" or just mention the + tool name.\nLet''s look at the `tool_search` function:\n`tool_search(goal: string)`\n\nI + will pass the exact tool name or a descriptive goal to `tool_search`.\n`tool_search(\"load + mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\")`\n\nWait, the prompt + says \"Call tool_search to load mcp__agentic_fixture.add_numbers for adding + [8, 13, 21].\"\nI will use that exact phrase or something similar as the goal.\nLet''s + just pass the goal.\nProceed. \nWait, should I include the numbers in the goal? + \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\" is fine.\nI''ll + make the function call. \nChecking parameters: `goal` is required.\nAll good. + \nCalling tool_search. \nI''ll format it correctly. \n`tool_search(goal=\"load + mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\")`\nDone. \nLet''s + output. \nActually, I should just use the tool.\nWait, `tool_search` returns + the tool definition or configuration. I don''t need to simulate it, I just call + it.\nProceeding. \n`call: default_api:tool_search{\"goal\": \"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\"}`\nWait, the user says \"Call tool_search to load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21].\"\nI''ll stick to that.\nDone. \nOutput matches requirement.\nLet''s + generate. \n(Self-Correction/Refinement during thought)\nIs there any specific + format required? No.\nI will just call the tool.\nDone. \nProceed. \n`tool_search` + with goal `load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]`\nDone. + \nOutput matches. \nProceeds. \n[Final Check]\nFunction: tool_search\nParameter: + goal = \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\"\nUser + explicitly says \"Do not call add_numbers yet.\"\nAll constraints met.\nOutputting. + \n[Done] \n`call:default_api:tool_search{\"goal\":\"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\"}`\nWait, checking the exact tool name in the prompt: + `mcp__agentic_fixture.add_numbers`\nI''ll use exactly that.\nDone. \nProceeds. + \nOutput Generation. \n(Note: I will format it as a standard tool call)\n`\n","type":"reasoning_text"}],"id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd","summary":[],"type":"reasoning"}} + + ' + - ' + + ' + - 'data: {"type":"response.output_item.added","sequence_number":293,"output_index":1,"item":{"arguments":{},"call_id":"chatcmpl-tool-9caaa2c05e6f4666","execution":"client","status":"in_progress","type":"tool_search_call"}} + + ' + - ' + + ' + - 'data: {"type":"response.output_item.done","sequence_number":294,"output_index":1,"item":{"arguments":{"goal":"load + mcp__agentic_fixture.add_numbers for adding [8, 13, 21]"},"call_id":"chatcmpl-tool-9caaa2c05e6f4666","execution":"client","status":"completed","type":"tool_search_call"}} + + ' + - ' + + ' + - 'data: {"type":"response.completed","sequence_number":295,"response":{"conversation_id":null,"created_at":1785759505,"error":null,"id":"resp_019fc78f-8ded-7ba0-824f-0786e6908dde","incomplete_details":null,"instructions":null,"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[{"content":[{"text":"The + user wants me to call `tool_search` to load a specific tool named `mcp__agentic_fixture.add_numbers` + for the purpose of adding the numbers [8, 13, 21].\nThe user explicitly instructs + me *not* to call `add_numbers` yet.\nSo I just need to call `tool_search` with + a goal that reflects this intent.\n\nGoal string could be something like \"load + mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\" or just mention the + tool name.\nLet''s look at the `tool_search` function:\n`tool_search(goal: string)`\n\nI + will pass the exact tool name or a descriptive goal to `tool_search`.\n`tool_search(\"load + mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\")`\n\nWait, the prompt + says \"Call tool_search to load mcp__agentic_fixture.add_numbers for adding + [8, 13, 21].\"\nI will use that exact phrase or something similar as the goal.\nLet''s + just pass the goal.\nProceed. \nWait, should I include the numbers in the goal? + \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\" is fine.\nI''ll + make the function call. \nChecking parameters: `goal` is required.\nAll good. + \nCalling tool_search. \nI''ll format it correctly. \n`tool_search(goal=\"load + mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\")`\nDone. \nLet''s + output. \nActually, I should just use the tool.\nWait, `tool_search` returns + the tool definition or configuration. I don''t need to simulate it, I just call + it.\nProceeding. \n`call: default_api:tool_search{\"goal\": \"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\"}`\nWait, the user says \"Call tool_search to load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21].\"\nI''ll stick to that.\nDone. \nOutput matches requirement.\nLet''s + generate. \n(Self-Correction/Refinement during thought)\nIs there any specific + format required? No.\nI will just call the tool.\nDone. \nProceed. \n`tool_search` + with goal `load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]`\nDone. + \nOutput matches. \nProceeds. \n[Final Check]\nFunction: tool_search\nParameter: + goal = \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\"\nUser + explicitly says \"Do not call add_numbers yet.\"\nAll constraints met.\nOutputting. + \n[Done] \n`call:default_api:tool_search{\"goal\":\"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\"}`\nWait, checking the exact tool name in the prompt: + `mcp__agentic_fixture.add_numbers`\nI''ll use exactly that.\nDone. \nProceeds. + \nOutput Generation. \n(Note: I will format it as a standard tool call)\n`\n","type":"reasoning_text"}],"encrypted_content":null,"id":"rs_019fc78f-9d88-7362-a810-02e7b8f267cd","status":null,"summary":[],"type":"reasoning"},{"arguments":{"goal":"load + mcp__agentic_fixture.add_numbers for adding [8, 13, 21]"},"call_id":"chatcmpl-tool-9caaa2c05e6f4666","execution":"client","status":"completed","type":"tool_search_call"}],"previous_response_id":null,"status":"completed","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"defer_loading":true,"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"usage":{"input_tokens":392,"input_tokens_details":{"cached_tokens":0},"output_tokens":761,"output_tokens_details":{"reasoning_tokens":661},"total_tokens":1153}}} + + ' + - ' + + ' + - 'data: [DONE] + + ' + - ' + + ' + status_code: 200 +- filename: t2 + request: + body: + input: + - call_id: chatcmpl-tool-9caaa2c05e6f4666 + execution: client + status: completed + tools: + - description: Loaded Codex namespace fixture. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + type: tool_search_output + - content: Call the loaded mcp__agentic_fixture.add_numbers function with numbers + [8, 13, 21]. + role: user + type: message + max_output_tokens: 4096 + model: Qwen/Qwen3.6-35B-A3B + previous_response_id: resp_019fc78f-8ded-7ba0-824f-0786e6908dde + store: true + stream: true + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + headers: + accept: '*/*' + content-type: application/json + user-agent: python-httpx/0.28.1 + method: POST + path: /v1/responses + query_params: {} + response: + headers: + content-type: text/event-stream; charset=utf-8 + sse: + - 'data: {"type":"response.created","sequence_number":0,"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785759506,"error":null,"frequency_penalty":0.0,"id":"resp_019fc78f-9ed8-7b93-b51e-56bb7e5134e0","incomplete_details":null,"instructions":null,"max_output_tokens":4096,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_019fc78f-8ded-7ba0-824f-0786e6908dde","prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null}} + + ' + - ' + + ' + - 'data: {"type":"response.in_progress","sequence_number":1,"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785759506,"error":null,"frequency_penalty":0.0,"id":"resp_019fc78f-9ed8-7b93-b51e-56bb7e5134e0","incomplete_details":null,"instructions":null,"max_output_tokens":4096,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_019fc78f-8ded-7ba0-824f-0786e6908dde","prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null}} + + ' + - ' + + ' + - 'data: {"type":"response.output_item.added","sequence_number":2,"output_index":0,"item":{"content":[],"id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d","summary":[],"type":"reasoning"}} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":3,"output_index":0,"content_index":0,"delta":"The","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":4,"output_index":0,"content_index":0,"delta":" + user wants to","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":5,"output_index":0,"content_index":0,"delta":" + call the `","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":6,"output_index":0,"content_index":0,"delta":"mcp__","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":7,"output_index":0,"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":8,"output_index":0,"content_index":0,"delta":".add_numbers`","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":9,"output_index":0,"content_index":0,"delta":" + function with the","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":10,"output_index":0,"content_index":0,"delta":" + numbers `[8","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":11,"output_index":0,"content_index":0,"delta":", + 1","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":12,"output_index":0,"content_index":0,"delta":"3, + ","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":13,"output_index":0,"content_index":0,"delta":"21]","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":14,"output_index":0,"content_index":0,"delta":"`.\nI","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":15,"output_index":0,"content_index":0,"delta":" + have already loaded","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":16,"output_index":0,"content_index":0,"delta":" + this","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":17,"output_index":0,"content_index":0,"delta":" + tool using","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":18,"output_index":0,"content_index":0,"delta":" + `tool_search","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":19,"output_index":0,"content_index":0,"delta":"`.\nNow","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":20,"output_index":0,"content_index":0,"delta":" + I need to","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":21,"output_index":0,"content_index":0,"delta":" + call the tool","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":22,"output_index":0,"content_index":0,"delta":" + with","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":23,"output_index":0,"content_index":0,"delta":" + the specified","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":24,"output_index":0,"content_index":0,"delta":" + parameters.\n","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":25,"output_index":0,"content_index":0,"delta":"Parameters","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":26,"output_index":0,"content_index":0,"delta":":","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":27,"output_index":0,"content_index":0,"delta":" + `numbers`","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":28,"output_index":0,"content_index":0,"delta":" + = `[","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":29,"output_index":0,"content_index":0,"delta":"8, + ","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":30,"output_index":0,"content_index":0,"delta":"13,","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":31,"output_index":0,"content_index":0,"delta":" + 21","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":32,"output_index":0,"content_index":0,"delta":"]`","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":33,"output_index":0,"content_index":0,"delta":"\nFunction","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":34,"output_index":0,"content_index":0,"delta":" + name: `","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":35,"output_index":0,"content_index":0,"delta":"mcp__","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":36,"output_index":0,"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":37,"output_index":0,"content_index":0,"delta":".add_numbers`","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":38,"output_index":0,"content_index":0,"delta":"\nWait","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":39,"output_index":0,"content_index":0,"delta":", + the available","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":40,"output_index":0,"content_index":0,"delta":" + tools in","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":41,"output_index":0,"content_index":0,"delta":" + the system","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":42,"output_index":0,"content_index":0,"delta":" + prompt","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":43,"output_index":0,"content_index":0,"delta":" + are:\n","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":44,"output_index":0,"content_index":0,"delta":"`","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":45,"output_index":0,"content_index":0,"delta":"ag","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":46,"output_index":0,"content_index":0,"delta":"entic_ns__","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":47,"output_index":0,"content_index":0,"delta":"mcp__","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":48,"output_index":0,"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":49,"output_index":0,"content_index":0,"delta":"__add_numbers","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":50,"output_index":0,"content_index":0,"delta":"` + and","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":51,"output_index":0,"content_index":0,"delta":" + `add_numbers","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":52,"output_index":0,"content_index":0,"delta":"`.\nThe","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":53,"output_index":0,"content_index":0,"delta":" + user specifically","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":54,"output_index":0,"content_index":0,"delta":" + asked for","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":55,"output_index":0,"content_index":0,"delta":" + `mcp","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":56,"output_index":0,"content_index":0,"delta":"__agentic","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":57,"output_index":0,"content_index":0,"delta":"_fixture.add_numbers","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":58,"output_index":0,"content_index":0,"delta":"`.\nLooking","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":59,"output_index":0,"content_index":0,"delta":" + at the available","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":60,"output_index":0,"content_index":0,"delta":" + tools:","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":61,"output_index":0,"content_index":0,"delta":"\n`ag","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":62,"output_index":0,"content_index":0,"delta":"entic_ns__","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":63,"output_index":0,"content_index":0,"delta":"mcp__","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":64,"output_index":0,"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":65,"output_index":0,"content_index":0,"delta":"__add_numbers","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":66,"output_index":0,"content_index":0,"delta":"` + matches the","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":67,"output_index":0,"content_index":0,"delta":" + namespace pattern","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":68,"output_index":0,"content_index":0,"delta":" + usually","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":69,"output_index":0,"content_index":0,"delta":" + used","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":70,"output_index":0,"content_index":0,"delta":" + by the","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":71,"output_index":0,"content_index":0,"delta":" + system for","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":72,"output_index":0,"content_index":0,"delta":" + `","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":73,"output_index":0,"content_index":0,"delta":"mcp__","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":74,"output_index":0,"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":75,"output_index":0,"content_index":0,"delta":".add_numbers`.","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":76,"output_index":0,"content_index":0,"delta":"\nI + will","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":77,"output_index":0,"content_index":0,"delta":" + call `ag","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":78,"output_index":0,"content_index":0,"delta":"entic_ns__","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":79,"output_index":0,"content_index":0,"delta":"mcp__","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":80,"output_index":0,"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":81,"output_index":0,"content_index":0,"delta":"__add_numbers","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":82,"output_index":0,"content_index":0,"delta":"` + with `","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":83,"output_index":0,"content_index":0,"delta":"numbers:","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":84,"output_index":0,"content_index":0,"delta":" + [8,","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":85,"output_index":0,"content_index":0,"delta":" + 13","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":86,"output_index":0,"content_index":0,"delta":", + 2","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":87,"output_index":0,"content_index":0,"delta":"1]`.","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":88,"output_index":0,"content_index":0,"delta":"\nLet''s","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":89,"output_index":0,"content_index":0,"delta":" + double","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":90,"output_index":0,"content_index":0,"delta":" + check the tool","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":91,"output_index":0,"content_index":0,"delta":" + definition","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":92,"output_index":0,"content_index":0,"delta":".\n`","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":93,"output_index":0,"content_index":0,"delta":"name","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":94,"output_index":0,"content_index":0,"delta":"`:","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":95,"output_index":0,"content_index":0,"delta":" + \"agentic","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":96,"output_index":0,"content_index":0,"delta":"_ns__m","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":97,"output_index":0,"content_index":0,"delta":"cp__ag","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":98,"output_index":0,"content_index":0,"delta":"entic_fixture__","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":99,"output_index":0,"content_index":0,"delta":"add_numbers\"","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":100,"output_index":0,"content_index":0,"delta":"\n`parameters","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":101,"output_index":0,"content_index":0,"delta":"`: + `","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":102,"output_index":0,"content_index":0,"delta":"numbers","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":103,"output_index":0,"content_index":0,"delta":"` + (array","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":104,"output_index":0,"content_index":0,"delta":" + of","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":105,"output_index":0,"content_index":0,"delta":" + numbers)\n","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":106,"output_index":0,"content_index":0,"delta":"All","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":107,"output_index":0,"content_index":0,"delta":" + good.\n","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":108,"output_index":0,"content_index":0,"delta":"Proceed","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":109,"output_index":0,"content_index":0,"delta":". + \nWait","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":110,"output_index":0,"content_index":0,"delta":", + I","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":111,"output_index":0,"content_index":0,"delta":" + should verify","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":112,"output_index":0,"content_index":0,"delta":" + the","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":113,"output_index":0,"content_index":0,"delta":" + exact function","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":114,"output_index":0,"content_index":0,"delta":" + name to call","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":115,"output_index":0,"content_index":0,"delta":". + The system","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":116,"output_index":0,"content_index":0,"delta":" + usually","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":117,"output_index":0,"content_index":0,"delta":" + provides","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":118,"output_index":0,"content_index":0,"delta":" + the full","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":119,"output_index":0,"content_index":0,"delta":" + qualified","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":120,"output_index":0,"content_index":0,"delta":" + name. I","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":121,"output_index":0,"content_index":0,"delta":"''ll","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":122,"output_index":0,"content_index":0,"delta":" + use `ag","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":123,"output_index":0,"content_index":0,"delta":"entic_ns__","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":124,"output_index":0,"content_index":0,"delta":"mcp__","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":125,"output_index":0,"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":126,"output_index":0,"content_index":0,"delta":"__add_numbers","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":127,"output_index":0,"content_index":0,"delta":"`.\nActually","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":128,"output_index":0,"content_index":0,"delta":", + the prompt","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":129,"output_index":0,"content_index":0,"delta":" + says \"Call","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":130,"output_index":0,"content_index":0,"delta":" + the loaded m","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":131,"output_index":0,"content_index":0,"delta":"cp__ag","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":132,"output_index":0,"content_index":0,"delta":"entic_fixture.add","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":133,"output_index":0,"content_index":0,"delta":"_numbers + function\".","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":134,"output_index":0,"content_index":0,"delta":" + I","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":135,"output_index":0,"content_index":0,"delta":" + will use the","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":136,"output_index":0,"content_index":0,"delta":" + tool `","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":137,"output_index":0,"content_index":0,"delta":"agentic_ns","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":138,"output_index":0,"content_index":0,"delta":"__mcp","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":139,"output_index":0,"content_index":0,"delta":"__agentic","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":140,"output_index":0,"content_index":0,"delta":"_fixture__add","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":141,"output_index":0,"content_index":0,"delta":"_numbers`.\n","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":142,"output_index":0,"content_index":0,"delta":"Let","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":143,"output_index":0,"content_index":0,"delta":"''s + construct","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":144,"output_index":0,"content_index":0,"delta":" + the call.","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":145,"output_index":0,"content_index":0,"delta":"\nTool","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":146,"output_index":0,"content_index":0,"delta":": + `","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":147,"output_index":0,"content_index":0,"delta":"agentic_ns","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":148,"output_index":0,"content_index":0,"delta":"__mcp","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":149,"output_index":0,"content_index":0,"delta":"__agentic","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":150,"output_index":0,"content_index":0,"delta":"_fixture__add","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":151,"output_index":0,"content_index":0,"delta":"_numbers`\n","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":152,"output_index":0,"content_index":0,"delta":"Args: + `","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":153,"output_index":0,"content_index":0,"delta":"{\"numbers\":","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":154,"output_index":0,"content_index":0,"delta":" + [8,","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":155,"output_index":0,"content_index":0,"delta":" + 13","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":156,"output_index":0,"content_index":0,"delta":", + 2","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":157,"output_index":0,"content_index":0,"delta":"1]}`","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":158,"output_index":0,"content_index":0,"delta":"\nDone.","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":159,"output_index":0,"content_index":0,"delta":" + \nWait,","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":160,"output_index":0,"content_index":0,"delta":" + is there any","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":161,"output_index":0,"content_index":0,"delta":" + other","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":162,"output_index":0,"content_index":0,"delta":" + tool? `","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":163,"output_index":0,"content_index":0,"delta":"add_numbers`","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":164,"output_index":0,"content_index":0,"delta":" + is also available","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":165,"output_index":0,"content_index":0,"delta":" + but","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":166,"output_index":0,"content_index":0,"delta":" + without","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":167,"output_index":0,"content_index":0,"delta":" + the namespace","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":168,"output_index":0,"content_index":0,"delta":" + prefix. The","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":169,"output_index":0,"content_index":0,"delta":" + prompt","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":170,"output_index":0,"content_index":0,"delta":" + says","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":171,"output_index":0,"content_index":0,"delta":" + \"Call","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":172,"output_index":0,"content_index":0,"delta":" + the loaded m","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":173,"output_index":0,"content_index":0,"delta":"cp__ag","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":174,"output_index":0,"content_index":0,"delta":"entic_fixture.add","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":175,"output_index":0,"content_index":0,"delta":"_numbers + function\".","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":176,"output_index":0,"content_index":0,"delta":" + I''ll","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":177,"output_index":0,"content_index":0,"delta":" + stick with `","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":178,"output_index":0,"content_index":0,"delta":"agentic_ns","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":179,"output_index":0,"content_index":0,"delta":"__mcp","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":180,"output_index":0,"content_index":0,"delta":"__agentic","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":181,"output_index":0,"content_index":0,"delta":"_fixture__add","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":182,"output_index":0,"content_index":0,"delta":"_numbers`.\n","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":183,"output_index":0,"content_index":0,"delta":"Ready","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":184,"output_index":0,"content_index":0,"delta":". + \nCalling","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":185,"output_index":0,"content_index":0,"delta":" + tool.","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":186,"output_index":0,"content_index":0,"delta":" + \n`","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":187,"output_index":0,"content_index":0,"delta":"print","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":188,"output_index":0,"content_index":0,"delta":"(tool_call)`","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":189,"output_index":0,"content_index":0,"delta":" + -> `","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":190,"output_index":0,"content_index":0,"delta":"agentic_ns","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":191,"output_index":0,"content_index":0,"delta":"__mcp","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":192,"output_index":0,"content_index":0,"delta":"__agentic","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":193,"output_index":0,"content_index":0,"delta":"_fixture__add","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":194,"output_index":0,"content_index":0,"delta":"_numbers(numbers=[","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":195,"output_index":0,"content_index":0,"delta":"8, + ","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":196,"output_index":0,"content_index":0,"delta":"13,","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":197,"output_index":0,"content_index":0,"delta":" + 21","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":198,"output_index":0,"content_index":0,"delta":"])`\n","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":199,"output_index":0,"content_index":0,"delta":"Output","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":200,"output_index":0,"content_index":0,"delta":" + matches.","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":201,"output_index":0,"content_index":0,"delta":"\n","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":202,"output_index":0,"content_index":0,"delta":"Proceed. + \n","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":203,"output_index":0,"content_index":0,"delta":"Wait","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":204,"output_index":0,"content_index":0,"delta":", + let''s","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":205,"output_index":0,"content_index":0,"delta":" + look","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":206,"output_index":0,"content_index":0,"delta":" + at the tool","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":207,"output_index":0,"content_index":0,"delta":" + definitions","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":208,"output_index":0,"content_index":0,"delta":" + provided","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":209,"output_index":0,"content_index":0,"delta":":","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":210,"output_index":0,"content_index":0,"delta":"\n`ag","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":211,"output_index":0,"content_index":0,"delta":"entic_ns__","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":212,"output_index":0,"content_index":0,"delta":"mcp__","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":213,"output_index":0,"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":214,"output_index":0,"content_index":0,"delta":"__add_numbers","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":215,"output_index":0,"content_index":0,"delta":"`\n`","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":216,"output_index":0,"content_index":0,"delta":"add_numbers`","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":217,"output_index":0,"content_index":0,"delta":"\nBoth + do","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":218,"output_index":0,"content_index":0,"delta":" + the same thing","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":219,"output_index":0,"content_index":0,"delta":". + I will","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":220,"output_index":0,"content_index":0,"delta":" + use the","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":221,"output_index":0,"content_index":0,"delta":" + prefixed","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":222,"output_index":0,"content_index":0,"delta":" + one as","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":223,"output_index":0,"content_index":0,"delta":" + requested.\n","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":224,"output_index":0,"content_index":0,"delta":"Done. + \n","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":225,"output_index":0,"content_index":0,"delta":"Calling","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":226,"output_index":0,"content_index":0,"delta":".","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":227,"output_index":0,"content_index":0,"delta":" + \n[Tool","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":228,"output_index":0,"content_index":0,"delta":" + Call] `","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":229,"output_index":0,"content_index":0,"delta":"agentic_ns","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":230,"output_index":0,"content_index":0,"delta":"__mcp","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":231,"output_index":0,"content_index":0,"delta":"__agentic","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":232,"output_index":0,"content_index":0,"delta":"_fixture__add","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":233,"output_index":0,"content_index":0,"delta":"_numbers(numbers","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":234,"output_index":0,"content_index":0,"delta":"=[8,","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":235,"output_index":0,"content_index":0,"delta":" + 13","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":236,"output_index":0,"content_index":0,"delta":", + 2","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":237,"output_index":0,"content_index":0,"delta":"1])`","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":238,"output_index":0,"content_index":0,"delta":"\n[","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":239,"output_index":0,"content_index":0,"delta":"Output]","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":240,"output_index":0,"content_index":0,"delta":" + ","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":241,"output_index":0,"content_index":0,"delta":"42\n","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":242,"output_index":0,"content_index":0,"delta":"I","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":243,"output_index":0,"content_index":0,"delta":" + will generate","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":244,"output_index":0,"content_index":0,"delta":" + the tool","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":245,"output_index":0,"content_index":0,"delta":" + call now.","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":246,"output_index":0,"content_index":0,"delta":" + \nAll","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":247,"output_index":0,"content_index":0,"delta":" + steps verified.","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":248,"output_index":0,"content_index":0,"delta":"\n","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":249,"output_index":0,"content_index":0,"delta":"Proceeding.","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":250,"output_index":0,"content_index":0,"delta":" + \n(Self-C","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":251,"output_index":0,"content_index":0,"delta":"orrection/","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":252,"output_index":0,"content_index":0,"delta":"Verification + during thought","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":253,"output_index":0,"content_index":0,"delta":")\nIs","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":254,"output_index":0,"content_index":0,"delta":" + there","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":255,"output_index":0,"content_index":0,"delta":" + any chance the","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":256,"output_index":0,"content_index":0,"delta":" + system expects me","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":257,"output_index":0,"content_index":0,"delta":" + to use","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":258,"output_index":0,"content_index":0,"delta":" + the","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":259,"output_index":0,"content_index":0,"delta":" + exact string","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":260,"output_index":0,"content_index":0,"delta":" + `m","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":261,"output_index":0,"content_index":0,"delta":"cp__ag","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":262,"output_index":0,"content_index":0,"delta":"entic_fixture.add","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":263,"output_index":0,"content_index":0,"delta":"_numbers`?","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":264,"output_index":0,"content_index":0,"delta":" + Usually","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":265,"output_index":0,"content_index":0,"delta":", + the L","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":266,"output_index":0,"content_index":0,"delta":"LM + tool","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":267,"output_index":0,"content_index":0,"delta":" + calling","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":268,"output_index":0,"content_index":0,"delta":" + framework handles","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":269,"output_index":0,"content_index":0,"delta":" + the mapping.","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":270,"output_index":0,"content_index":0,"delta":" + The available","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":271,"output_index":0,"content_index":0,"delta":" + tools list","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":272,"output_index":0,"content_index":0,"delta":" + shows `ag","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":273,"output_index":0,"content_index":0,"delta":"entic_ns__","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":274,"output_index":0,"content_index":0,"delta":"mcp__","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":275,"output_index":0,"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":276,"output_index":0,"content_index":0,"delta":"__add_numbers","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":277,"output_index":0,"content_index":0,"delta":"`. + I will","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":278,"output_index":0,"content_index":0,"delta":" + use that.","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":279,"output_index":0,"content_index":0,"delta":"\nParameters","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":280,"output_index":0,"content_index":0,"delta":": + `numbers","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":281,"output_index":0,"content_index":0,"delta":":","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":282,"output_index":0,"content_index":0,"delta":" + [8,","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":283,"output_index":0,"content_index":0,"delta":" + 13","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":284,"output_index":0,"content_index":0,"delta":", + 2","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":285,"output_index":0,"content_index":0,"delta":"1]`","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":286,"output_index":0,"content_index":0,"delta":"\nReady.","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":287,"output_index":0,"content_index":0,"delta":" + \nOutput matches","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":288,"output_index":0,"content_index":0,"delta":" + expectation","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":289,"output_index":0,"content_index":0,"delta":".\nProceed","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":290,"output_index":0,"content_index":0,"delta":"s. + \n","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":291,"output_index":0,"content_index":0,"delta":"[Tool + Call","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":292,"output_index":0,"content_index":0,"delta":" + Generation]\n","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":293,"output_index":0,"content_index":0,"delta":"`tool","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":294,"output_index":0,"content_index":0,"delta":"_use","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":295,"output_index":0,"content_index":0,"delta":"(name","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":296,"output_index":0,"content_index":0,"delta":"=\"agentic","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":297,"output_index":0,"content_index":0,"delta":"_ns__m","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":298,"output_index":0,"content_index":0,"delta":"cp__ag","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":299,"output_index":0,"content_index":0,"delta":"entic_fixture__","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":300,"output_index":0,"content_index":0,"delta":"add_numbers\",","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":301,"output_index":0,"content_index":0,"delta":" + arguments={\"numbers","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":302,"output_index":0,"content_index":0,"delta":"\": + [8","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":303,"output_index":0,"content_index":0,"delta":", + 1","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":304,"output_index":0,"content_index":0,"delta":"3, + ","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":305,"output_index":0,"content_index":0,"delta":"21]","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":306,"output_index":0,"content_index":0,"delta":"})`\n","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":307,"output_index":0,"content_index":0,"delta":"Done. + \n","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":308,"output_index":0,"content_index":0,"delta":"Wait, + let","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":309,"output_index":0,"content_index":0,"delta":"''s + verify the","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":310,"output_index":0,"content_index":0,"delta":" + exact schema","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":311,"output_index":0,"content_index":0,"delta":" + for","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":312,"output_index":0,"content_index":0,"delta":" + `ag","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":313,"output_index":0,"content_index":0,"delta":"entic_ns__","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":314,"output_index":0,"content_index":0,"delta":"mcp__","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":315,"output_index":0,"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":316,"output_index":0,"content_index":0,"delta":"__add_numbers","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":317,"output_index":0,"content_index":0,"delta":"`:\n`","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":318,"output_index":0,"content_index":0,"delta":"parameters`: + `","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":319,"output_index":0,"content_index":0,"delta":"{\"additional","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":320,"output_index":0,"content_index":0,"delta":"Properties\": + false","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":321,"output_index":0,"content_index":0,"delta":", + \"properties","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":322,"output_index":0,"content_index":0,"delta":"\": + {\"numbers","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":323,"output_index":0,"content_index":0,"delta":"\": + {\"items","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":324,"output_index":0,"content_index":0,"delta":"\": + {\"type","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":325,"output_index":0,"content_index":0,"delta":"\": + \"number","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":326,"output_index":0,"content_index":0,"delta":"\"}, + \"min","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":327,"output_index":0,"content_index":0,"delta":"Items\": + ","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":328,"output_index":0,"content_index":0,"delta":"1, + \"","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":329,"output_index":0,"content_index":0,"delta":"type\": + \"","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":330,"output_index":0,"content_index":0,"delta":"array\"}},","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":331,"output_index":0,"content_index":0,"delta":" + \"required\":","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":332,"output_index":0,"content_index":0,"delta":" + [\"numbers\"],","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":333,"output_index":0,"content_index":0,"delta":" + \"type\":","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":334,"output_index":0,"content_index":0,"delta":" + \"object\"","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":335,"output_index":0,"content_index":0,"delta":"}`\nMatches","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":336,"output_index":0,"content_index":0,"delta":".\nProceed","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":337,"output_index":0,"content_index":0,"delta":"s","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":338,"output_index":0,"content_index":0,"delta":". + \nFinal","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":339,"output_index":0,"content_index":0,"delta":" + check","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":340,"output_index":0,"content_index":0,"delta":" + of the prompt","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":341,"output_index":0,"content_index":0,"delta":": + \"Call","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":342,"output_index":0,"content_index":0,"delta":" + the loaded m","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":343,"output_index":0,"content_index":0,"delta":"cp__ag","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":344,"output_index":0,"content_index":0,"delta":"entic_fixture.add","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":345,"output_index":0,"content_index":0,"delta":"_numbers + function with","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":346,"output_index":0,"content_index":0,"delta":" + numbers [8","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":347,"output_index":0,"content_index":0,"delta":", + 1","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":348,"output_index":0,"content_index":0,"delta":"3, + ","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":349,"output_index":0,"content_index":0,"delta":"21].\"","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":350,"output_index":0,"content_index":0,"delta":"\nEverything","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":351,"output_index":0,"content_index":0,"delta":" + align","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":352,"output_index":0,"content_index":0,"delta":"s.\n","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":353,"output_index":0,"content_index":0,"delta":"Proceed","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":354,"output_index":0,"content_index":0,"delta":"ing. + \n","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":355,"output_index":0,"content_index":0,"delta":"[Output + Generation","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":356,"output_index":0,"content_index":0,"delta":"] + ->","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":357,"output_index":0,"content_index":0,"delta":" + Tool call.","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":358,"output_index":0,"content_index":0,"delta":" + \n(Note:","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":359,"output_index":0,"content_index":0,"delta":" + I will just","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":360,"output_index":0,"content_index":0,"delta":" + generate","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":361,"output_index":0,"content_index":0,"delta":" + the tool call","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":362,"output_index":0,"content_index":0,"delta":" + directly","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":363,"output_index":0,"content_index":0,"delta":".)","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":364,"output_index":0,"content_index":0,"delta":"\n","item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.done","sequence_number":365,"output_index":0,"content_index":0,"item_id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d","text":"The + user wants to call the `mcp__agentic_fixture.add_numbers` function with the + numbers `[8, 13, 21]`.\nI have already loaded this tool using `tool_search`.\nNow + I need to call the tool with the specified parameters.\nParameters: `numbers` + = `[8, 13, 21]`\nFunction name: `mcp__agentic_fixture.add_numbers`\nWait, the + available tools in the system prompt are:\n`agentic_ns__mcp__agentic_fixture__add_numbers` + and `add_numbers`.\nThe user specifically asked for `mcp__agentic_fixture.add_numbers`.\nLooking + at the available tools:\n`agentic_ns__mcp__agentic_fixture__add_numbers` matches + the namespace pattern usually used by the system for `mcp__agentic_fixture.add_numbers`.\nI + will call `agentic_ns__mcp__agentic_fixture__add_numbers` with `numbers: [8, + 13, 21]`.\nLet''s double check the tool definition.\n`name`: \"agentic_ns__mcp__agentic_fixture__add_numbers\"\n`parameters`: + `numbers` (array of numbers)\nAll good.\nProceed. \nWait, I should verify the + exact function name to call. The system usually provides the full qualified + name. I''ll use `agentic_ns__mcp__agentic_fixture__add_numbers`.\nActually, + the prompt says \"Call the loaded mcp__agentic_fixture.add_numbers function\". + I will use the tool `agentic_ns__mcp__agentic_fixture__add_numbers`.\nLet''s + construct the call.\nTool: `agentic_ns__mcp__agentic_fixture__add_numbers`\nArgs: + `{\"numbers\": [8, 13, 21]}`\nDone. \nWait, is there any other tool? `add_numbers` + is also available but without the namespace prefix. The prompt says \"Call the + loaded mcp__agentic_fixture.add_numbers function\". I''ll stick with `agentic_ns__mcp__agentic_fixture__add_numbers`.\nReady. + \nCalling tool. \n`print(tool_call)` -> `agentic_ns__mcp__agentic_fixture__add_numbers(numbers=[8, + 13, 21])`\nOutput matches.\nProceed. \nWait, let''s look at the tool definitions + provided:\n`agentic_ns__mcp__agentic_fixture__add_numbers`\n`add_numbers`\nBoth + do the same thing. I will use the prefixed one as requested.\nDone. \nCalling. + \n[Tool Call] `agentic_ns__mcp__agentic_fixture__add_numbers(numbers=[8, 13, + 21])`\n[Output] 42\nI will generate the tool call now. \nAll steps verified.\nProceeding. + \n(Self-Correction/Verification during thought)\nIs there any chance the system + expects me to use the exact string `mcp__agentic_fixture.add_numbers`? Usually, + the LLM tool calling framework handles the mapping. The available tools list + shows `agentic_ns__mcp__agentic_fixture__add_numbers`. I will use that.\nParameters: + `numbers: [8, 13, 21]`\nReady. \nOutput matches expectation.\nProceeds. \n[Tool + Call Generation]\n`tool_use(name=\"agentic_ns__mcp__agentic_fixture__add_numbers\", + arguments={\"numbers\": [8, 13, 21]})`\nDone. \nWait, let''s verify the exact + schema for `agentic_ns__mcp__agentic_fixture__add_numbers`:\n`parameters`: `{\"additionalProperties\": + false, \"properties\": {\"numbers\": {\"items\": {\"type\": \"number\"}, \"minItems\": + 1, \"type\": \"array\"}}, \"required\": [\"numbers\"], \"type\": \"object\"}`\nMatches.\nProceeds. + \nFinal check of the prompt: \"Call the loaded mcp__agentic_fixture.add_numbers + function with numbers [8, 13, 21].\"\nEverything aligns.\nProceeding. \n[Output + Generation] -> Tool call. \n(Note: I will just generate the tool call directly.)\n"} + + ' + - ' + + ' + - 'data: {"type":"response.output_item.done","sequence_number":366,"output_index":0,"item":{"content":[{"text":"The + user wants to call the `mcp__agentic_fixture.add_numbers` function with the + numbers `[8, 13, 21]`.\nI have already loaded this tool using `tool_search`.\nNow + I need to call the tool with the specified parameters.\nParameters: `numbers` + = `[8, 13, 21]`\nFunction name: `mcp__agentic_fixture.add_numbers`\nWait, the + available tools in the system prompt are:\n`agentic_ns__mcp__agentic_fixture__add_numbers` + and `add_numbers`.\nThe user specifically asked for `mcp__agentic_fixture.add_numbers`.\nLooking + at the available tools:\n`agentic_ns__mcp__agentic_fixture__add_numbers` matches + the namespace pattern usually used by the system for `mcp__agentic_fixture.add_numbers`.\nI + will call `agentic_ns__mcp__agentic_fixture__add_numbers` with `numbers: [8, + 13, 21]`.\nLet''s double check the tool definition.\n`name`: \"agentic_ns__mcp__agentic_fixture__add_numbers\"\n`parameters`: + `numbers` (array of numbers)\nAll good.\nProceed. \nWait, I should verify the + exact function name to call. The system usually provides the full qualified + name. I''ll use `agentic_ns__mcp__agentic_fixture__add_numbers`.\nActually, + the prompt says \"Call the loaded mcp__agentic_fixture.add_numbers function\". + I will use the tool `agentic_ns__mcp__agentic_fixture__add_numbers`.\nLet''s + construct the call.\nTool: `agentic_ns__mcp__agentic_fixture__add_numbers`\nArgs: + `{\"numbers\": [8, 13, 21]}`\nDone. \nWait, is there any other tool? `add_numbers` + is also available but without the namespace prefix. The prompt says \"Call the + loaded mcp__agentic_fixture.add_numbers function\". I''ll stick with `agentic_ns__mcp__agentic_fixture__add_numbers`.\nReady. + \nCalling tool. \n`print(tool_call)` -> `agentic_ns__mcp__agentic_fixture__add_numbers(numbers=[8, + 13, 21])`\nOutput matches.\nProceed. \nWait, let''s look at the tool definitions + provided:\n`agentic_ns__mcp__agentic_fixture__add_numbers`\n`add_numbers`\nBoth + do the same thing. I will use the prefixed one as requested.\nDone. \nCalling. + \n[Tool Call] `agentic_ns__mcp__agentic_fixture__add_numbers(numbers=[8, 13, + 21])`\n[Output] 42\nI will generate the tool call now. \nAll steps verified.\nProceeding. + \n(Self-Correction/Verification during thought)\nIs there any chance the system + expects me to use the exact string `mcp__agentic_fixture.add_numbers`? Usually, + the LLM tool calling framework handles the mapping. The available tools list + shows `agentic_ns__mcp__agentic_fixture__add_numbers`. I will use that.\nParameters: + `numbers: [8, 13, 21]`\nReady. \nOutput matches expectation.\nProceeds. \n[Tool + Call Generation]\n`tool_use(name=\"agentic_ns__mcp__agentic_fixture__add_numbers\", + arguments={\"numbers\": [8, 13, 21]})`\nDone. \nWait, let''s verify the exact + schema for `agentic_ns__mcp__agentic_fixture__add_numbers`:\n`parameters`: `{\"additionalProperties\": + false, \"properties\": {\"numbers\": {\"items\": {\"type\": \"number\"}, \"minItems\": + 1, \"type\": \"array\"}}, \"required\": [\"numbers\"], \"type\": \"object\"}`\nMatches.\nProceeds. + \nFinal check of the prompt: \"Call the loaded mcp__agentic_fixture.add_numbers + function with numbers [8, 13, 21].\"\nEverything aligns.\nProceeding. \n[Output + Generation] -> Tool call. \n(Note: I will just generate the tool call directly.)\n","type":"reasoning_text"}],"id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d","summary":[],"type":"reasoning"}} + + ' + - ' + + ' + - 'data: {"type":"response.output_item.added","sequence_number":367,"output_index":1,"item":{"arguments":"","call_id":"chatcmpl-tool-aaeb165c5f0c53a8","id":"fc_019fc78f-b36a-7352-ac67-6e5df70fe337","name":"add_numbers","namespace":"mcp__agentic_fixture","status":"in_progress","type":"function_call"}} + + ' + - ' + + ' + - 'data: {"type":"response.function_call_arguments.delta","sequence_number":368,"output_index":1,"content_index":0,"delta":"{}","item_id":"fc_019fc78f-b36a-7352-ac67-6e5df70fe337"} + + ' + - ' + + ' + - 'data: {"type":"response.function_call_arguments.delta","sequence_number":369,"output_index":1,"content_index":0,"delta":"{\"numbers\": + ","item_id":"fc_019fc78f-b36a-7352-ac67-6e5df70fe337"} + + ' + - ' + + ' + - 'data: {"type":"response.function_call_arguments.delta","sequence_number":370,"output_index":1,"content_index":0,"delta":"[8, + 13, 21]}","item_id":"fc_019fc78f-b36a-7352-ac67-6e5df70fe337"} + + ' + - ' + + ' + - 'data: {"type":"response.function_call_arguments.done","sequence_number":371,"output_index":1,"arguments":"{\"numbers\": + [8, 13, 21]}","content_index":0,"item_id":"fc_019fc78f-b36a-7352-ac67-6e5df70fe337"} + + ' + - ' + + ' + - 'data: {"type":"response.output_item.done","sequence_number":372,"output_index":1,"item":{"arguments":"{\"numbers\": + [8, 13, 21]}","call_id":"chatcmpl-tool-aaeb165c5f0c53a8","id":"fc_019fc78f-b36a-7352-ac67-6e5df70fe337","name":"add_numbers","namespace":"mcp__agentic_fixture","status":"completed","type":"function_call"}} + + ' + - ' + + ' + - 'data: {"type":"response.completed","sequence_number":373,"response":{"conversation_id":null,"created_at":1785759511,"error":null,"id":"resp_019fc78f-9ed8-7b93-b51e-56bb7e5134e0","incomplete_details":null,"instructions":null,"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[{"content":[{"text":"The + user wants to call the `mcp__agentic_fixture.add_numbers` function with the + numbers `[8, 13, 21]`.\nI have already loaded this tool using `tool_search`.\nNow + I need to call the tool with the specified parameters.\nParameters: `numbers` + = `[8, 13, 21]`\nFunction name: `mcp__agentic_fixture.add_numbers`\nWait, the + available tools in the system prompt are:\n`agentic_ns__mcp__agentic_fixture__add_numbers` + and `add_numbers`.\nThe user specifically asked for `mcp__agentic_fixture.add_numbers`.\nLooking + at the available tools:\n`agentic_ns__mcp__agentic_fixture__add_numbers` matches + the namespace pattern usually used by the system for `mcp__agentic_fixture.add_numbers`.\nI + will call `agentic_ns__mcp__agentic_fixture__add_numbers` with `numbers: [8, + 13, 21]`.\nLet''s double check the tool definition.\n`name`: \"agentic_ns__mcp__agentic_fixture__add_numbers\"\n`parameters`: + `numbers` (array of numbers)\nAll good.\nProceed. \nWait, I should verify the + exact function name to call. The system usually provides the full qualified + name. I''ll use `agentic_ns__mcp__agentic_fixture__add_numbers`.\nActually, + the prompt says \"Call the loaded mcp__agentic_fixture.add_numbers function\". + I will use the tool `agentic_ns__mcp__agentic_fixture__add_numbers`.\nLet''s + construct the call.\nTool: `agentic_ns__mcp__agentic_fixture__add_numbers`\nArgs: + `{\"numbers\": [8, 13, 21]}`\nDone. \nWait, is there any other tool? `add_numbers` + is also available but without the namespace prefix. The prompt says \"Call the + loaded mcp__agentic_fixture.add_numbers function\". I''ll stick with `agentic_ns__mcp__agentic_fixture__add_numbers`.\nReady. + \nCalling tool. \n`print(tool_call)` -> `agentic_ns__mcp__agentic_fixture__add_numbers(numbers=[8, + 13, 21])`\nOutput matches.\nProceed. \nWait, let''s look at the tool definitions + provided:\n`agentic_ns__mcp__agentic_fixture__add_numbers`\n`add_numbers`\nBoth + do the same thing. I will use the prefixed one as requested.\nDone. \nCalling. + \n[Tool Call] `agentic_ns__mcp__agentic_fixture__add_numbers(numbers=[8, 13, + 21])`\n[Output] 42\nI will generate the tool call now. \nAll steps verified.\nProceeding. + \n(Self-Correction/Verification during thought)\nIs there any chance the system + expects me to use the exact string `mcp__agentic_fixture.add_numbers`? Usually, + the LLM tool calling framework handles the mapping. The available tools list + shows `agentic_ns__mcp__agentic_fixture__add_numbers`. I will use that.\nParameters: + `numbers: [8, 13, 21]`\nReady. \nOutput matches expectation.\nProceeds. \n[Tool + Call Generation]\n`tool_use(name=\"agentic_ns__mcp__agentic_fixture__add_numbers\", + arguments={\"numbers\": [8, 13, 21]})`\nDone. \nWait, let''s verify the exact + schema for `agentic_ns__mcp__agentic_fixture__add_numbers`:\n`parameters`: `{\"additionalProperties\": + false, \"properties\": {\"numbers\": {\"items\": {\"type\": \"number\"}, \"minItems\": + 1, \"type\": \"array\"}}, \"required\": [\"numbers\"], \"type\": \"object\"}`\nMatches.\nProceeds. + \nFinal check of the prompt: \"Call the loaded mcp__agentic_fixture.add_numbers + function with numbers [8, 13, 21].\"\nEverything aligns.\nProceeding. \n[Output + Generation] -> Tool call. \n(Note: I will just generate the tool call directly.)\n","type":"reasoning_text"}],"encrypted_content":null,"id":"rs_019fc78f-b2e5-75b2-90a4-78468172420d","status":null,"summary":[],"type":"reasoning"},{"arguments":"{\"numbers\": + [8, 13, 21]}","call_id":"chatcmpl-tool-aaeb165c5f0c53a8","id":"fc_019fc78f-b36a-7352-ac67-6e5df70fe337","name":"add_numbers","namespace":"mcp__agentic_fixture","status":"completed","type":"function_call"}],"previous_response_id":"resp_019fc78f-8ded-7ba0-824f-0786e6908dde","status":"completed","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"usage":{"input_tokens":689,"input_tokens_details":{"cached_tokens":0},"output_tokens":956,"output_tokens_details":{"reasoning_tokens":848},"total_tokens":1645}}} + + ' + - ' + + ' + - 'data: [DONE] + + ' + - ' + + ' + status_code: 200 +- filename: t3 + request: + body: + input: + - call_id: chatcmpl-tool-aaeb165c5f0c53a8 + output: '{"sum":42,"count":3}' + type: function_call_output + - content: Use the function output and return exactly TOOL_SEARCH_CODEX_OK_42. + role: user + type: message + max_output_tokens: 4096 + model: Qwen/Qwen3.6-35B-A3B + previous_response_id: resp_019fc78f-9ed8-7b93-b51e-56bb7e5134e0 + store: true + stream: true + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + headers: + accept: '*/*' + content-type: application/json + user-agent: python-httpx/0.28.1 + method: POST + path: /v1/responses + query_params: {} + response: + headers: + content-type: text/event-stream; charset=utf-8 + sse: + - 'data: {"type":"response.created","sequence_number":0,"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785759511,"error":null,"frequency_penalty":0.0,"id":"resp_019fc78f-b54d-7032-97ca-bf22a6fbb1e4","incomplete_details":null,"instructions":null,"max_output_tokens":4096,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_019fc78f-9ed8-7b93-b51e-56bb7e5134e0","prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null}} + + ' + - ' + + ' + - 'data: {"type":"response.in_progress","sequence_number":1,"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785759511,"error":null,"frequency_penalty":0.0,"id":"resp_019fc78f-b54d-7032-97ca-bf22a6fbb1e4","incomplete_details":null,"instructions":null,"max_output_tokens":4096,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_019fc78f-9ed8-7b93-b51e-56bb7e5134e0","prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null}} + + ' + - ' + + ' + - 'data: {"type":"response.output_item.added","sequence_number":2,"output_index":0,"item":{"content":[],"id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148","summary":[],"type":"reasoning"}} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":3,"output_index":0,"content_index":0,"delta":"The","item_id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":4,"output_index":0,"content_index":0,"delta":" + user wants me","item_id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":5,"output_index":0,"content_index":0,"delta":" + to return","item_id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":6,"output_index":0,"content_index":0,"delta":" + \"","item_id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":7,"output_index":0,"content_index":0,"delta":"TOOL_SEARCH","item_id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":8,"output_index":0,"content_index":0,"delta":"_CODEX_OK","item_id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":9,"output_index":0,"content_index":0,"delta":"_42","item_id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":10,"output_index":0,"content_index":0,"delta":"\" + exactly","item_id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":11,"output_index":0,"content_index":0,"delta":" + based","item_id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":12,"output_index":0,"content_index":0,"delta":" + on the function","item_id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":13,"output_index":0,"content_index":0,"delta":" + output.\n","item_id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":14,"output_index":0,"content_index":0,"delta":"I","item_id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":15,"output_index":0,"content_index":0,"delta":" + will","item_id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":16,"output_index":0,"content_index":0,"delta":" + output","item_id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":17,"output_index":0,"content_index":0,"delta":" + exactly","item_id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":18,"output_index":0,"content_index":0,"delta":" + that","item_id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":19,"output_index":0,"content_index":0,"delta":" + string.\n","item_id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":20,"output_index":0,"content_index":0,"delta":"No + further","item_id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":21,"output_index":0,"content_index":0,"delta":" + tool calls needed","item_id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.delta","sequence_number":22,"output_index":0,"content_index":0,"delta":".\n","item_id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148"} + + ' + - ' + + ' + - 'data: {"type":"response.reasoning_text.done","sequence_number":23,"output_index":0,"content_index":0,"item_id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148","text":"The + user wants me to return \"TOOL_SEARCH_CODEX_OK_42\" exactly based on the function + output.\nI will output exactly that string.\nNo further tool calls needed.\n"} + + ' + - ' + + ' + - 'data: {"type":"response.output_item.done","sequence_number":24,"output_index":0,"item":{"content":[{"text":"The + user wants me to return \"TOOL_SEARCH_CODEX_OK_42\" exactly based on the function + output.\nI will output exactly that string.\nNo further tool calls needed.\n","type":"reasoning_text"}],"id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148","summary":[],"type":"reasoning"}} + + ' + - ' + + ' + - 'data: {"type":"response.output_item.added","sequence_number":25,"output_index":1,"item":{"content":[],"id":"msg_019fc78f-b7f3-7ad2-9e77-de2878f227b4","role":"assistant","status":"in_progress","type":"message"}} + + ' + - ' + + ' + - 'data: {"type":"response.content_part.added","sequence_number":26,"output_index":1,"content_index":0,"item_id":"msg_019fc78f-b7f3-7ad2-9e77-de2878f227b4","part":{"annotations":[],"logprobs":[],"text":"","type":"output_text"}} + + ' + - ' + + ' + - 'data: {"type":"response.output_text.delta","sequence_number":27,"output_index":1,"content_index":0,"delta":"\n\nTOOL","item_id":"msg_019fc78f-b7f3-7ad2-9e77-de2878f227b4","logprobs":[]} + + ' + - ' + + ' + - 'data: {"type":"response.output_text.delta","sequence_number":28,"output_index":1,"content_index":0,"delta":"_SEARCH_CODEX","item_id":"msg_019fc78f-b7f3-7ad2-9e77-de2878f227b4","logprobs":[]} + + ' + - ' + + ' + - 'data: {"type":"response.output_text.delta","sequence_number":29,"output_index":1,"content_index":0,"delta":"_OK_4","item_id":"msg_019fc78f-b7f3-7ad2-9e77-de2878f227b4","logprobs":[]} + + ' + - ' + + ' + - 'data: {"type":"response.output_text.delta","sequence_number":30,"output_index":1,"content_index":0,"delta":"2","item_id":"msg_019fc78f-b7f3-7ad2-9e77-de2878f227b4","logprobs":[]} + + ' + - ' + + ' + - 'data: {"type":"response.output_text.done","sequence_number":31,"output_index":1,"content_index":0,"item_id":"msg_019fc78f-b7f3-7ad2-9e77-de2878f227b4","logprobs":[],"text":"\n\nTOOL_SEARCH_CODEX_OK_42"} + + ' + - ' + + ' + - 'data: {"type":"response.content_part.done","sequence_number":32,"output_index":1,"content_index":0,"item_id":"msg_019fc78f-b7f3-7ad2-9e77-de2878f227b4","part":{"annotations":[],"logprobs":[],"text":"\n\nTOOL_SEARCH_CODEX_OK_42","type":"output_text"}} + + ' + - ' + + ' + - 'data: {"type":"response.output_item.done","sequence_number":33,"output_index":1,"item":{"content":[{"annotations":[],"logprobs":[],"text":"\n\nTOOL_SEARCH_CODEX_OK_42","type":"output_text"}],"id":"msg_019fc78f-b7f3-7ad2-9e77-de2878f227b4","role":"assistant","status":"completed","type":"message"}} + + ' + - ' + + ' + - 'data: {"type":"response.completed","sequence_number":34,"response":{"conversation_id":null,"created_at":1785759512,"error":null,"id":"resp_019fc78f-b54d-7032-97ca-bf22a6fbb1e4","incomplete_details":null,"instructions":null,"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[{"content":[{"text":"The + user wants me to return \"TOOL_SEARCH_CODEX_OK_42\" exactly based on the function + output.\nI will output exactly that string.\nNo further tool calls needed.\n","type":"reasoning_text"}],"encrypted_content":null,"id":"rs_019fc78f-b7e6-7f01-8ca5-8ad0d2599148","status":null,"summary":[],"type":"reasoning"},{"content":[{"annotations":[],"text":"\n\nTOOL_SEARCH_CODEX_OK_42","type":"output_text"}],"id":"msg_019fc78f-b7f3-7ad2-9e77-de2878f227b4","role":"assistant","status":"completed","type":"message"}],"previous_response_id":"resp_019fc78f-9ed8-7b93-b51e-56bb7e5134e0","status":"completed","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"usage":{"input_tokens":775,"input_tokens_details":{"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":36},"total_tokens":827}}} + + ' + - ' + + ' + - 'data: [DONE] + + ' + - ' + + ' + status_code: 200 diff --git a/crates/agentic-server-core/tests/cassettes/codex/codex-gateway-websocket-tool-search-Qwen-Qwen3.6-35B-A3B-streaming.yaml b/crates/agentic-server-core/tests/cassettes/codex/codex-gateway-websocket-tool-search-Qwen-Qwen3.6-35B-A3B-streaming.yaml new file mode 100644 index 00000000..d18b1a99 --- /dev/null +++ b/crates/agentic-server-core/tests/cassettes/codex/codex-gateway-websocket-tool-search-Qwen-Qwen3.6-35B-A3B-streaming.yaml @@ -0,0 +1,2449 @@ +turns: +- filename: t1 + request: + body: + input: Call tool_search to load mcp__agentic_fixture.add_numbers for adding + [8, 13, 21]. Do not call add_numbers yet. + max_output_tokens: 4096 + model: Qwen/Qwen3.6-35B-A3B + store: true + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + type: response.create + headers: {} + method: WEBSOCKET + path: /v1/responses + query_params: {} + transport: websocket + response: + headers: + transport: websocket + sse: + - 'data: {"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785759418,"error":null,"frequency_penalty":0.0,"id":"resp_019fc78e-47f5-7d60-bfac-0c21eeae099a","incomplete_details":null,"instructions":null,"max_output_tokens":4096,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"defer_loading":true,"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null},"sequence_number":0,"type":"response.created"} + + ' + - 'data: {"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785759418,"error":null,"frequency_penalty":0.0,"id":"resp_019fc78e-47f5-7d60-bfac-0c21eeae099a","incomplete_details":null,"instructions":null,"max_output_tokens":4096,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"defer_loading":true,"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null},"sequence_number":1,"type":"response.in_progress"} + + ' + - 'data: {"item":{"content":[],"id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","summary":[],"type":"reasoning"},"output_index":0,"sequence_number":2,"type":"response.output_item.added"} + + ' + - 'data: {"content_index":0,"delta":"The","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":3,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" user wants me","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":4,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" to call `","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":5,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"tool_search`","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":6,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" to load `","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":7,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"mcp__","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":8,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":9,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".add_numbers`.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":10,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\nThe goal","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":11,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" for","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":12,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" `tool_search","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":13,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"` should","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":14,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" be to find","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":15,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" the function for","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":16,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" adding numbers","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":17,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".\nI","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":18,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" will","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":19,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" call `","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":20,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"tool_search`","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":21,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" with the goal","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":22,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" \"load m","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":23,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"cp__ag","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":24,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"entic_fixture.add","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":25,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_numbers for adding","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":26,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" [8,","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":27,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" 13","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":28,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":", 2","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":29,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"1]\"","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":30,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" or similar.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":31,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\nThen","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":32,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" I will not","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":33,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" call `add","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":34,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_numbers` yet","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":35,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".\n\nLet","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":36,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"''s check the","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":37,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" `","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":38,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"tool_search`","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":39,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" parameters","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":40,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":": `","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":41,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"goal` (","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":42,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"required","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":43,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":",","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":44,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" string).\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":45,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"I will set","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":46,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" `","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":47,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"goal` to","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":48,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" \"load m","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":49,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"cp__ag","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":50,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"entic_fixture.add","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":51,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_numbers for adding","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":52,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" [8,","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":53,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" 13","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":54,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":", 2","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":55,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"1]\".","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":56,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\nWait","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":57,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":", the prompt","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":58,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" says \"Call","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":59,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" tool_search to","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":60,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" load mcp","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":61,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"__agentic","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":62,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_fixture.add_numbers","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":63,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" for adding [","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":64,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"8, ","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":65,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"13,","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":66,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" 21","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":67,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"]. Do not","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":68,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" call add_numbers","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":69,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" yet.\"\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":70,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"So I just","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":71,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" need to execute","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":72,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" `tool_search","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":73,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"` with the","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":74,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" appropriate goal.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":75,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\n\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":76,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Let''s craft","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":77,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" the call","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":78,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".\n`","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":79,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"tool_search(goal","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":80,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"=\"load m","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":81,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"cp__ag","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":82,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"entic_fixture.add","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":83,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_numbers for adding","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":84,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" [8,","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":85,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" 13","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":86,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":", 2","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":87,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"1]\")`","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":88,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\nDone","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":89,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":". I","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":90,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" will output the","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":91,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" tool call.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":92,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":93,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Wait, `","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":94,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"tool_search`","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":95,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" is","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":96,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" described","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":97,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" as \"Find","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":98,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" the project-specific","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":99,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" function needed to","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":100,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" continue the task","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":101,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".\"\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":102,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"I''ll","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":103,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" follow","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":104,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" the instruction","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":105,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" exactly.\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":106,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Proceed","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":107,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"ing","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":108,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":". \nActually","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":109,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":", the prompt","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":110,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" says \"Call","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":111,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" tool_search to","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":112,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" load mcp","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":113,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"__agentic","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":114,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_fixture.add_numbers","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":115,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" for adding [","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":116,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"8, ","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":117,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"13,","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":118,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" 21","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":119,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"].\"\nI","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":120,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" will just","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":121,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" call","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":122,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" it","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":123,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".\nNo","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":124,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" extra text","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":125,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".\nLet","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":126,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"''s do it","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":127,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":". \nWait","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":128,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":", should","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":129,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" I use exactly","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":130,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" the","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":131,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" phrase","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":132,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" \"","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":133,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"load","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":134,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" mcp__","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":135,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":136,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".add_numbers for","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":137,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" adding [8","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":138,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":", 1","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":139,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"3, ","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":140,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"21]\"","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":141,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" as","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":142,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" the goal?","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":143,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" Yes.\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":144,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Ready","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":145,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":". \nOutput","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":146,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" matches tool call","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":147,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":". \n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":148,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Proceed.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":149,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" \n[Self","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":150,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"-Correction","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":151,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"/Verification]","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":152,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\nTool","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":153,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":": tool","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":154,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_search\nParam","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":155,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":": goal =","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":156,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" \"load m","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":157,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"cp__ag","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":158,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"entic_fixture.add","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":159,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_numbers for adding","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":160,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" [8,","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":161,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" 13","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":162,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":", 2","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":163,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"1]\"\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":164,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Constraints","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":165,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":": \"Do","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":166,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" not call add","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":167,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_numbers yet.\"","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":168,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":169,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"All","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":170,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" good. \n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":171,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Executing","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":172,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":". \n[","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":173,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Output Generation]","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":174,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\nCall","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":175,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" tool_search.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":176,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":177,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Done. \n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":178,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Wait, let","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":179,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"''s verify the","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":180,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" function","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":181,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" name","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":182,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" in","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":183,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" the schema","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":184,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":": `ag","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":185,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"entic_ns__","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":186,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"mcp__","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":187,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":188,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"__add_numbers","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":189,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"`. The prompt","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":190,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" says `","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":191,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"mcp__","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":192,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":193,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".add_numbers`.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":194,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" That''s","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":195,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" fine.\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":196,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"I will generate","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":197,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" the tool call","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":198,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" now. \n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":199,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"`","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":200,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"tool_search(goal","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":201,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"=\"load m","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":202,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"cp__ag","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":203,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"entic_fixture.add","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":204,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_numbers for adding","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":205,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" [8,","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":206,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" 13","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":207,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":", 2","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":208,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"1]\")`","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":209,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\nDone.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":210,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" \nProceeds","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":211,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":". \n(Self","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":212,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"-Correction","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":213,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"/Note","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":214,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" during thought)","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":215,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\nActually,","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":216,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" `","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":217,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"tool_search`","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":218,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" usually","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":219,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" expects","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":220,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" a natural","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":221,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" language description","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":222,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" of what","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":223,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" to","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":224,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" find","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":225,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":",","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":226,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" but I","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":227,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"''ll stick to","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":228,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" the prompt''s","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":229,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" exact","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":230,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" wording for","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":231,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" the goal.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":232,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\nEverything","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":233,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" looks","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":234,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" correct.\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":235,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Output matches.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":236,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" \nProceeds","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":237,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":". \n[","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":238,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Final Check]","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":239,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\nTool:","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":240,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" tool_search\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":241,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Arguments","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":242,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":": {\"goal","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":243,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\": \"load","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":244,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" mcp__","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":245,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":246,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".add_numbers for","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":247,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" adding [8","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":248,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":", 1","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":249,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"3, ","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":250,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"21]","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":251,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\"}\nInstruction","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":252,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":": Do","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":253,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" not call add","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":254,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_numbers yet.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":255,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\nMatches perfectly","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":256,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":". \n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":257,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Proceeding","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":258,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":". \n[","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":259,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Output Generation]","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":260,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" -> Tool Call","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":261,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":262,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" \n[","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":263,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Done.]","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":264,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" \n*(","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":265,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Self-Cor","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":266,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"rection/Ref","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":267,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"inement during generation","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":268,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":")*:","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":269,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" I will just","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":270,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" output the tool","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":271,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" call block","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":272,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":". No","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":273,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" extra text","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":274,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".\n```","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":275,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"json","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":276,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\n{\"tool","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":277,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_name\": \"","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":278,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"tool_search\",","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":279,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" \"arguments\":","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":280,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" {\"goal\":","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":281,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" \"load m","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":282,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"cp__ag","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":283,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"entic_fixture.add","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":284,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_numbers for adding","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":285,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" [8,","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":286,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" 13","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":287,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":", 2","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":288,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"1]\"}}","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":289,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\n```\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":290,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Wait, the","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":291,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" format requires `","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":292,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":295,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"`. I''ll","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":296,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" use the standard","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":297,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" XML","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":298,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"-like","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":299,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" format or","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":300,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" JSON","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":301,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" if","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":302,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" the","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":303,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" system expects it","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":304,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":305,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" The prompt uses","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":306,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" XML","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":307,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"-like for","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":308,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" examples","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":309,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":310,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" I''ll stick","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":311,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" to the standard","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":312,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" format.\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":313,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Actually, the","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":314,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" system prompt","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":315,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" usually","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":316,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" handles","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":317,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" parsing","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":318,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":". I''ll","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":319,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" just produce","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":320,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" the call","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":321,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".\nDone","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":322,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":". \nProceed","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":323,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"s. \n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":324,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"[Output Generation","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":325,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"] ->","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":326,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" `tool_search","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":327,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"` with goal","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":328,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".\nDone","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":329,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":". \n*","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":330,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Self-Cor","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":331,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"rection/Verification","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":332,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" during thought*:","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":333,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" Wait, `","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":334,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"tool_search`","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":335,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" might","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":336,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" be","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":337,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" a meta","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":338,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"-tool to","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":339,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" retrieve","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":340,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" function","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":341,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" definitions. The","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":342,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" prompt explicitly","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":343,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" says \"Call","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":344,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" tool_search to","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":345,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" load mcp","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":346,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"__agentic","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":347,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_fixture.add_numbers","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":348,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"...","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":349,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\". So","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":350,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" I will do","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":351,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" exactly that.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":352,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\nReady.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":353,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" \nOutput","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":354,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" matches. \n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":355,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Proceeds.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":356,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":357,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":358,"text":"The + user wants me to call `tool_search` to load `mcp__agentic_fixture.add_numbers`.\nThe + goal for `tool_search` should be to find the function for adding numbers.\nI + will call `tool_search` with the goal \"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\" or similar.\nThen I will not call `add_numbers` yet.\n\nLet''s + check the `tool_search` parameters: `goal` (required, string).\nI will set `goal` + to \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\".\nWait, + the prompt says \"Call tool_search to load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]. Do not call add_numbers yet.\"\nSo I just need to execute + `tool_search` with the appropriate goal.\n\nLet''s craft the call.\n`tool_search(goal=\"load + mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\")`\nDone. I will output + the tool call.\nWait, `tool_search` is described as \"Find the project-specific + function needed to continue the task.\"\nI''ll follow the instruction exactly.\nProceeding. + \nActually, the prompt says \"Call tool_search to load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21].\"\nI will just call it.\nNo extra text.\nLet''s do it. + \nWait, should I use exactly the phrase \"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\" as the goal? Yes.\nReady. \nOutput matches tool call. + \nProceed. \n[Self-Correction/Verification]\nTool: tool_search\nParam: goal + = \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\"\nConstraints: + \"Do not call add_numbers yet.\"\nAll good. \nExecuting. \n[Output Generation]\nCall + tool_search.\nDone. \nWait, let''s verify the function name in the schema: `agentic_ns__mcp__agentic_fixture__add_numbers`. + The prompt says `mcp__agentic_fixture.add_numbers`. That''s fine.\nI will generate + the tool call now. \n`tool_search(goal=\"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\")`\nDone. \nProceeds. \n(Self-Correction/Note during + thought)\nActually, `tool_search` usually expects a natural language description + of what to find, but I''ll stick to the prompt''s exact wording for the goal.\nEverything + looks correct.\nOutput matches. \nProceeds. \n[Final Check]\nTool: tool_search\nArguments: + {\"goal\": \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\"}\nInstruction: + Do not call add_numbers yet.\nMatches perfectly. \nProceeding. \n[Output Generation] + -> Tool Call. \n[Done.] \n*(Self-Correction/Refinement during generation)*: + I will just output the tool call block. No extra text.\n```json\n{\"tool_name\": + \"tool_search\", \"arguments\": {\"goal\": \"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\"}}\n```\nWait, the format requires ``. I''ll use the standard XML-like format or JSON if the system expects + it. The prompt uses XML-like for examples. I''ll stick to the standard format.\nActually, + the system prompt usually handles parsing. I''ll just produce the call.\nDone. + \nProceeds. \n[Output Generation] -> `tool_search` with goal.\nDone. \n*Self-Correction/Verification + during thought*: Wait, `tool_search` might be a meta-tool to retrieve function + definitions. The prompt explicitly says \"Call tool_search to load mcp__agentic_fixture.add_numbers...\". + So I will do exactly that.\nReady. \nOutput matches. \nProceeds.\n","type":"response.reasoning_text.done"} + + ' + - 'data: {"item":{"content":[{"text":"The user wants me to call `tool_search` + to load `mcp__agentic_fixture.add_numbers`.\nThe goal for `tool_search` should + be to find the function for adding numbers.\nI will call `tool_search` with + the goal \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\" or + similar.\nThen I will not call `add_numbers` yet.\n\nLet''s check the `tool_search` + parameters: `goal` (required, string).\nI will set `goal` to \"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\".\nWait, the prompt says \"Call tool_search to load + mcp__agentic_fixture.add_numbers for adding [8, 13, 21]. Do not call add_numbers + yet.\"\nSo I just need to execute `tool_search` with the appropriate goal.\n\nLet''s + craft the call.\n`tool_search(goal=\"load mcp__agentic_fixture.add_numbers for + adding [8, 13, 21]\")`\nDone. I will output the tool call.\nWait, `tool_search` + is described as \"Find the project-specific function needed to continue the + task.\"\nI''ll follow the instruction exactly.\nProceeding. \nActually, the + prompt says \"Call tool_search to load mcp__agentic_fixture.add_numbers for + adding [8, 13, 21].\"\nI will just call it.\nNo extra text.\nLet''s do it. \nWait, + should I use exactly the phrase \"load mcp__agentic_fixture.add_numbers for + adding [8, 13, 21]\" as the goal? Yes.\nReady. \nOutput matches tool call. \nProceed. + \n[Self-Correction/Verification]\nTool: tool_search\nParam: goal = \"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\"\nConstraints: \"Do not call add_numbers yet.\"\nAll + good. \nExecuting. \n[Output Generation]\nCall tool_search.\nDone. \nWait, let''s + verify the function name in the schema: `agentic_ns__mcp__agentic_fixture__add_numbers`. + The prompt says `mcp__agentic_fixture.add_numbers`. That''s fine.\nI will generate + the tool call now. \n`tool_search(goal=\"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\")`\nDone. \nProceeds. \n(Self-Correction/Note during + thought)\nActually, `tool_search` usually expects a natural language description + of what to find, but I''ll stick to the prompt''s exact wording for the goal.\nEverything + looks correct.\nOutput matches. \nProceeds. \n[Final Check]\nTool: tool_search\nArguments: + {\"goal\": \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\"}\nInstruction: + Do not call add_numbers yet.\nMatches perfectly. \nProceeding. \n[Output Generation] + -> Tool Call. \n[Done.] \n*(Self-Correction/Refinement during generation)*: + I will just output the tool call block. No extra text.\n```json\n{\"tool_name\": + \"tool_search\", \"arguments\": {\"goal\": \"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\"}}\n```\nWait, the format requires ``. I''ll use the standard XML-like format or JSON if the system expects + it. The prompt uses XML-like for examples. I''ll stick to the standard format.\nActually, + the system prompt usually handles parsing. I''ll just produce the call.\nDone. + \nProceeds. \n[Output Generation] -> `tool_search` with goal.\nDone. \n*Self-Correction/Verification + during thought*: Wait, `tool_search` might be a meta-tool to retrieve function + definitions. The prompt explicitly says \"Call tool_search to load mcp__agentic_fixture.add_numbers...\". + So I will do exactly that.\nReady. \nOutput matches. \nProceeds.\n","type":"reasoning_text"}],"id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","summary":[],"type":"reasoning"},"output_index":0,"sequence_number":359,"type":"response.output_item.done"} + + ' + - 'data: {"item":{"arguments":{},"call_id":"chatcmpl-tool-ba5c96e01a2d324a","execution":"client","status":"in_progress","type":"tool_search_call"},"output_index":1,"sequence_number":360,"type":"response.output_item.added"} + + ' + - 'data: {"item":{"arguments":{"goal":"load mcp__agentic_fixture.add_numbers for + adding [8, 13, 21]"},"call_id":"chatcmpl-tool-ba5c96e01a2d324a","execution":"client","status":"completed","type":"tool_search_call"},"output_index":1,"sequence_number":361,"type":"response.output_item.done"} + + ' + - 'data: {"response":{"conversation_id":null,"created_at":1785759423,"error":null,"id":"resp_019fc78e-47f5-7d60-bfac-0c21eeae099a","incomplete_details":null,"instructions":null,"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[{"content":[{"text":"The + user wants me to call `tool_search` to load `mcp__agentic_fixture.add_numbers`.\nThe + goal for `tool_search` should be to find the function for adding numbers.\nI + will call `tool_search` with the goal \"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\" or similar.\nThen I will not call `add_numbers` yet.\n\nLet''s + check the `tool_search` parameters: `goal` (required, string).\nI will set `goal` + to \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\".\nWait, + the prompt says \"Call tool_search to load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]. Do not call add_numbers yet.\"\nSo I just need to execute + `tool_search` with the appropriate goal.\n\nLet''s craft the call.\n`tool_search(goal=\"load + mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\")`\nDone. I will output + the tool call.\nWait, `tool_search` is described as \"Find the project-specific + function needed to continue the task.\"\nI''ll follow the instruction exactly.\nProceeding. + \nActually, the prompt says \"Call tool_search to load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21].\"\nI will just call it.\nNo extra text.\nLet''s do it. + \nWait, should I use exactly the phrase \"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\" as the goal? Yes.\nReady. \nOutput matches tool call. + \nProceed. \n[Self-Correction/Verification]\nTool: tool_search\nParam: goal + = \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\"\nConstraints: + \"Do not call add_numbers yet.\"\nAll good. \nExecuting. \n[Output Generation]\nCall + tool_search.\nDone. \nWait, let''s verify the function name in the schema: `agentic_ns__mcp__agentic_fixture__add_numbers`. + The prompt says `mcp__agentic_fixture.add_numbers`. That''s fine.\nI will generate + the tool call now. \n`tool_search(goal=\"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\")`\nDone. \nProceeds. \n(Self-Correction/Note during + thought)\nActually, `tool_search` usually expects a natural language description + of what to find, but I''ll stick to the prompt''s exact wording for the goal.\nEverything + looks correct.\nOutput matches. \nProceeds. \n[Final Check]\nTool: tool_search\nArguments: + {\"goal\": \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\"}\nInstruction: + Do not call add_numbers yet.\nMatches perfectly. \nProceeding. \n[Output Generation] + -> Tool Call. \n[Done.] \n*(Self-Correction/Refinement during generation)*: + I will just output the tool call block. No extra text.\n```json\n{\"tool_name\": + \"tool_search\", \"arguments\": {\"goal\": \"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\"}}\n```\nWait, the format requires ``. I''ll use the standard XML-like format or JSON if the system expects + it. The prompt uses XML-like for examples. I''ll stick to the standard format.\nActually, + the system prompt usually handles parsing. I''ll just produce the call.\nDone. + \nProceeds. \n[Output Generation] -> `tool_search` with goal.\nDone. \n*Self-Correction/Verification + during thought*: Wait, `tool_search` might be a meta-tool to retrieve function + definitions. The prompt explicitly says \"Call tool_search to load mcp__agentic_fixture.add_numbers...\". + So I will do exactly that.\nReady. \nOutput matches. \nProceeds.\n","type":"reasoning_text"}],"encrypted_content":null,"id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","status":null,"summary":[],"type":"reasoning"},{"arguments":{"goal":"load + mcp__agentic_fixture.add_numbers for adding [8, 13, 21]"},"call_id":"chatcmpl-tool-ba5c96e01a2d324a","execution":"client","status":"completed","type":"tool_search_call"}],"previous_response_id":null,"status":"completed","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"defer_loading":true,"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"usage":{"input_tokens":392,"input_tokens_details":{"cached_tokens":0},"output_tokens":938,"output_tokens_details":{"reasoning_tokens":832},"total_tokens":1330}},"sequence_number":362,"type":"response.completed"} + + ' + - 'data: [DONE] + + ' + status_code: 101 + websocket: + - '{"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785759418,"error":null,"frequency_penalty":0.0,"id":"resp_019fc78e-47f5-7d60-bfac-0c21eeae099a","incomplete_details":null,"instructions":null,"max_output_tokens":4096,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"defer_loading":true,"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null},"sequence_number":0,"type":"response.created"}' + - '{"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785759418,"error":null,"frequency_penalty":0.0,"id":"resp_019fc78e-47f5-7d60-bfac-0c21eeae099a","incomplete_details":null,"instructions":null,"max_output_tokens":4096,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"defer_loading":true,"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null},"sequence_number":1,"type":"response.in_progress"}' + - '{"item":{"content":[],"id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","summary":[],"type":"reasoning"},"output_index":0,"sequence_number":2,"type":"response.output_item.added"}' + - '{"content_index":0,"delta":"The","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":3,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" user wants me","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":4,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" to call `","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":5,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"tool_search`","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":6,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" to load `","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":7,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"mcp__","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":8,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":9,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".add_numbers`.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":10,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\nThe goal","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":11,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" for","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":12,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" `tool_search","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":13,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"` should","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":14,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" be to find","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":15,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" the function for","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":16,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" adding numbers","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":17,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".\nI","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":18,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" will","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":19,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" call `","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":20,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"tool_search`","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":21,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" with the goal","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":22,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" \"load m","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":23,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"cp__ag","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":24,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"entic_fixture.add","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":25,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_numbers for adding","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":26,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" [8,","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":27,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" 13","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":28,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":", 2","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":29,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"1]\"","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":30,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" or similar.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":31,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\nThen","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":32,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" I will not","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":33,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" call `add","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":34,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_numbers` yet","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":35,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".\n\nLet","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":36,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"''s check the","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":37,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" `","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":38,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"tool_search`","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":39,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" parameters","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":40,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":": `","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":41,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"goal` (","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":42,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"required","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":43,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":",","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":44,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" string).\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":45,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"I will set","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":46,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" `","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":47,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"goal` to","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":48,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" \"load m","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":49,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"cp__ag","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":50,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"entic_fixture.add","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":51,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_numbers for adding","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":52,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" [8,","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":53,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" 13","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":54,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":", 2","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":55,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"1]\".","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":56,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\nWait","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":57,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":", the prompt","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":58,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" says \"Call","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":59,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" tool_search to","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":60,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" load mcp","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":61,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"__agentic","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":62,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_fixture.add_numbers","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":63,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" for adding [","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":64,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"8, ","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":65,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"13,","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":66,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" 21","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":67,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"]. Do not","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":68,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" call add_numbers","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":69,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" yet.\"\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":70,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"So I just","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":71,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" need to execute","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":72,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" `tool_search","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":73,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"` with the","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":74,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" appropriate goal.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":75,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\n\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":76,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Let''s craft","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":77,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" the call","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":78,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".\n`","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":79,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"tool_search(goal","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":80,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"=\"load m","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":81,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"cp__ag","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":82,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"entic_fixture.add","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":83,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_numbers for adding","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":84,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" [8,","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":85,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" 13","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":86,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":", 2","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":87,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"1]\")`","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":88,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\nDone","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":89,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":". I","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":90,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" will output the","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":91,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" tool call.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":92,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":93,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Wait, `","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":94,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"tool_search`","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":95,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" is","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":96,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" described","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":97,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" as \"Find","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":98,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" the project-specific","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":99,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" function needed to","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":100,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" continue the task","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":101,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".\"\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":102,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"I''ll","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":103,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" follow","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":104,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" the instruction","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":105,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" exactly.\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":106,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Proceed","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":107,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"ing","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":108,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":". \nActually","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":109,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":", the prompt","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":110,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" says \"Call","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":111,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" tool_search to","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":112,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" load mcp","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":113,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"__agentic","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":114,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_fixture.add_numbers","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":115,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" for adding [","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":116,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"8, ","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":117,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"13,","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":118,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" 21","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":119,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"].\"\nI","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":120,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" will just","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":121,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" call","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":122,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" it","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":123,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".\nNo","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":124,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" extra text","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":125,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".\nLet","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":126,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"''s do it","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":127,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":". \nWait","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":128,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":", should","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":129,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" I use exactly","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":130,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" the","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":131,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" phrase","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":132,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" \"","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":133,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"load","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":134,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" mcp__","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":135,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":136,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".add_numbers for","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":137,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" adding [8","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":138,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":", 1","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":139,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"3, ","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":140,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"21]\"","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":141,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" as","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":142,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" the goal?","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":143,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" Yes.\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":144,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Ready","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":145,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":". \nOutput","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":146,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" matches tool call","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":147,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":". \n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":148,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Proceed.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":149,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" \n[Self","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":150,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"-Correction","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":151,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"/Verification]","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":152,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\nTool","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":153,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":": tool","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":154,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_search\nParam","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":155,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":": goal =","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":156,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" \"load m","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":157,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"cp__ag","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":158,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"entic_fixture.add","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":159,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_numbers for adding","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":160,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" [8,","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":161,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" 13","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":162,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":", 2","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":163,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"1]\"\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":164,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Constraints","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":165,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":": \"Do","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":166,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" not call add","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":167,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_numbers yet.\"","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":168,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":169,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"All","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":170,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" good. \n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":171,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Executing","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":172,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":". \n[","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":173,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Output Generation]","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":174,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\nCall","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":175,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" tool_search.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":176,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":177,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Done. \n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":178,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Wait, let","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":179,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"''s verify the","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":180,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" function","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":181,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" name","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":182,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" in","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":183,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" the schema","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":184,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":": `ag","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":185,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"entic_ns__","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":186,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"mcp__","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":187,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":188,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"__add_numbers","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":189,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"`. The prompt","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":190,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" says `","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":191,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"mcp__","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":192,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":193,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".add_numbers`.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":194,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" That''s","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":195,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" fine.\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":196,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"I will generate","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":197,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" the tool call","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":198,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" now. \n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":199,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"`","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":200,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"tool_search(goal","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":201,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"=\"load m","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":202,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"cp__ag","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":203,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"entic_fixture.add","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":204,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_numbers for adding","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":205,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" [8,","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":206,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" 13","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":207,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":", 2","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":208,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"1]\")`","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":209,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\nDone.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":210,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" \nProceeds","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":211,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":". \n(Self","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":212,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"-Correction","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":213,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"/Note","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":214,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" during thought)","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":215,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\nActually,","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":216,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" `","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":217,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"tool_search`","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":218,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" usually","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":219,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" expects","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":220,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" a natural","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":221,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" language description","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":222,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" of what","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":223,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" to","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":224,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" find","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":225,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":",","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":226,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" but I","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":227,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"''ll stick to","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":228,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" the prompt''s","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":229,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" exact","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":230,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" wording for","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":231,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" the goal.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":232,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\nEverything","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":233,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" looks","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":234,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" correct.\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":235,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Output matches.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":236,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" \nProceeds","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":237,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":". \n[","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":238,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Final Check]","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":239,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\nTool:","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":240,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" tool_search\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":241,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Arguments","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":242,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":": {\"goal","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":243,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\": \"load","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":244,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" mcp__","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":245,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":246,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".add_numbers for","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":247,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" adding [8","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":248,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":", 1","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":249,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"3, ","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":250,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"21]","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":251,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\"}\nInstruction","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":252,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":": Do","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":253,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" not call add","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":254,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_numbers yet.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":255,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\nMatches perfectly","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":256,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":". \n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":257,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Proceeding","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":258,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":". \n[","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":259,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Output Generation]","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":260,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" -> Tool Call","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":261,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":262,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" \n[","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":263,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Done.]","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":264,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" \n*(","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":265,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Self-Cor","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":266,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"rection/Ref","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":267,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"inement during generation","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":268,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":")*:","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":269,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" I will just","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":270,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" output the tool","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":271,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" call block","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":272,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":". No","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":273,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" extra text","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":274,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".\n```","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":275,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"json","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":276,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\n{\"tool","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":277,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_name\": \"","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":278,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"tool_search\",","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":279,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" \"arguments\":","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":280,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" {\"goal\":","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":281,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" \"load m","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":282,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"cp__ag","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":283,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"entic_fixture.add","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":284,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_numbers for adding","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":285,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" [8,","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":286,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" 13","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":287,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":", 2","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":288,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"1]\"}}","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":289,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\n```\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":290,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Wait, the","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":291,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" format requires `","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":292,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":295,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"`. I''ll","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":296,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" use the standard","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":297,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" XML","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":298,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"-like","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":299,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" format or","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":300,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" JSON","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":301,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" if","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":302,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" the","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":303,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" system expects it","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":304,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":305,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" The prompt uses","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":306,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" XML","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":307,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"-like for","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":308,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" examples","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":309,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":310,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" I''ll stick","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":311,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" to the standard","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":312,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" format.\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":313,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Actually, the","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":314,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" system prompt","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":315,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" usually","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":316,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" handles","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":317,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" parsing","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":318,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":". I''ll","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":319,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" just produce","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":320,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" the call","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":321,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".\nDone","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":322,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":". \nProceed","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":323,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"s. \n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":324,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"[Output Generation","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":325,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"] ->","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":326,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" `tool_search","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":327,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"` with goal","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":328,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".\nDone","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":329,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":". \n*","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":330,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Self-Cor","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":331,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"rection/Verification","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":332,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" during thought*:","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":333,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" Wait, `","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":334,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"tool_search`","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":335,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" might","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":336,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" be","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":337,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" a meta","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":338,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"-tool to","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":339,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" retrieve","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":340,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" function","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":341,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" definitions. The","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":342,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" prompt explicitly","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":343,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" says \"Call","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":344,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" tool_search to","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":345,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" load mcp","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":346,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"__agentic","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":347,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_fixture.add_numbers","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":348,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"...","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":349,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\". So","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":350,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" I will do","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":351,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" exactly that.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":352,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\nReady.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":353,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" \nOutput","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":354,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" matches. \n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":355,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Proceeds.","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":356,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\n","item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":357,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"item_id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","output_index":0,"sequence_number":358,"text":"The + user wants me to call `tool_search` to load `mcp__agentic_fixture.add_numbers`.\nThe + goal for `tool_search` should be to find the function for adding numbers.\nI + will call `tool_search` with the goal \"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\" or similar.\nThen I will not call `add_numbers` yet.\n\nLet''s + check the `tool_search` parameters: `goal` (required, string).\nI will set `goal` + to \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\".\nWait, + the prompt says \"Call tool_search to load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]. Do not call add_numbers yet.\"\nSo I just need to execute + `tool_search` with the appropriate goal.\n\nLet''s craft the call.\n`tool_search(goal=\"load + mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\")`\nDone. I will output + the tool call.\nWait, `tool_search` is described as \"Find the project-specific + function needed to continue the task.\"\nI''ll follow the instruction exactly.\nProceeding. + \nActually, the prompt says \"Call tool_search to load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21].\"\nI will just call it.\nNo extra text.\nLet''s do it. + \nWait, should I use exactly the phrase \"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\" as the goal? Yes.\nReady. \nOutput matches tool call. + \nProceed. \n[Self-Correction/Verification]\nTool: tool_search\nParam: goal + = \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\"\nConstraints: + \"Do not call add_numbers yet.\"\nAll good. \nExecuting. \n[Output Generation]\nCall + tool_search.\nDone. \nWait, let''s verify the function name in the schema: `agentic_ns__mcp__agentic_fixture__add_numbers`. + The prompt says `mcp__agentic_fixture.add_numbers`. That''s fine.\nI will generate + the tool call now. \n`tool_search(goal=\"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\")`\nDone. \nProceeds. \n(Self-Correction/Note during + thought)\nActually, `tool_search` usually expects a natural language description + of what to find, but I''ll stick to the prompt''s exact wording for the goal.\nEverything + looks correct.\nOutput matches. \nProceeds. \n[Final Check]\nTool: tool_search\nArguments: + {\"goal\": \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\"}\nInstruction: + Do not call add_numbers yet.\nMatches perfectly. \nProceeding. \n[Output Generation] + -> Tool Call. \n[Done.] \n*(Self-Correction/Refinement during generation)*: + I will just output the tool call block. No extra text.\n```json\n{\"tool_name\": + \"tool_search\", \"arguments\": {\"goal\": \"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\"}}\n```\nWait, the format requires ``. I''ll use the standard XML-like format or JSON if the system expects + it. The prompt uses XML-like for examples. I''ll stick to the standard format.\nActually, + the system prompt usually handles parsing. I''ll just produce the call.\nDone. + \nProceeds. \n[Output Generation] -> `tool_search` with goal.\nDone. \n*Self-Correction/Verification + during thought*: Wait, `tool_search` might be a meta-tool to retrieve function + definitions. The prompt explicitly says \"Call tool_search to load mcp__agentic_fixture.add_numbers...\". + So I will do exactly that.\nReady. \nOutput matches. \nProceeds.\n","type":"response.reasoning_text.done"}' + - '{"item":{"content":[{"text":"The user wants me to call `tool_search` to load + `mcp__agentic_fixture.add_numbers`.\nThe goal for `tool_search` should be to + find the function for adding numbers.\nI will call `tool_search` with the goal + \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\" or similar.\nThen + I will not call `add_numbers` yet.\n\nLet''s check the `tool_search` parameters: + `goal` (required, string).\nI will set `goal` to \"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\".\nWait, the prompt says \"Call tool_search to load + mcp__agentic_fixture.add_numbers for adding [8, 13, 21]. Do not call add_numbers + yet.\"\nSo I just need to execute `tool_search` with the appropriate goal.\n\nLet''s + craft the call.\n`tool_search(goal=\"load mcp__agentic_fixture.add_numbers for + adding [8, 13, 21]\")`\nDone. I will output the tool call.\nWait, `tool_search` + is described as \"Find the project-specific function needed to continue the + task.\"\nI''ll follow the instruction exactly.\nProceeding. \nActually, the + prompt says \"Call tool_search to load mcp__agentic_fixture.add_numbers for + adding [8, 13, 21].\"\nI will just call it.\nNo extra text.\nLet''s do it. \nWait, + should I use exactly the phrase \"load mcp__agentic_fixture.add_numbers for + adding [8, 13, 21]\" as the goal? Yes.\nReady. \nOutput matches tool call. \nProceed. + \n[Self-Correction/Verification]\nTool: tool_search\nParam: goal = \"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\"\nConstraints: \"Do not call add_numbers yet.\"\nAll + good. \nExecuting. \n[Output Generation]\nCall tool_search.\nDone. \nWait, let''s + verify the function name in the schema: `agentic_ns__mcp__agentic_fixture__add_numbers`. + The prompt says `mcp__agentic_fixture.add_numbers`. That''s fine.\nI will generate + the tool call now. \n`tool_search(goal=\"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\")`\nDone. \nProceeds. \n(Self-Correction/Note during + thought)\nActually, `tool_search` usually expects a natural language description + of what to find, but I''ll stick to the prompt''s exact wording for the goal.\nEverything + looks correct.\nOutput matches. \nProceeds. \n[Final Check]\nTool: tool_search\nArguments: + {\"goal\": \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\"}\nInstruction: + Do not call add_numbers yet.\nMatches perfectly. \nProceeding. \n[Output Generation] + -> Tool Call. \n[Done.] \n*(Self-Correction/Refinement during generation)*: + I will just output the tool call block. No extra text.\n```json\n{\"tool_name\": + \"tool_search\", \"arguments\": {\"goal\": \"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\"}}\n```\nWait, the format requires ``. I''ll use the standard XML-like format or JSON if the system expects + it. The prompt uses XML-like for examples. I''ll stick to the standard format.\nActually, + the system prompt usually handles parsing. I''ll just produce the call.\nDone. + \nProceeds. \n[Output Generation] -> `tool_search` with goal.\nDone. \n*Self-Correction/Verification + during thought*: Wait, `tool_search` might be a meta-tool to retrieve function + definitions. The prompt explicitly says \"Call tool_search to load mcp__agentic_fixture.add_numbers...\". + So I will do exactly that.\nReady. \nOutput matches. \nProceeds.\n","type":"reasoning_text"}],"id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","summary":[],"type":"reasoning"},"output_index":0,"sequence_number":359,"type":"response.output_item.done"}' + - '{"item":{"arguments":{},"call_id":"chatcmpl-tool-ba5c96e01a2d324a","execution":"client","status":"in_progress","type":"tool_search_call"},"output_index":1,"sequence_number":360,"type":"response.output_item.added"}' + - '{"item":{"arguments":{"goal":"load mcp__agentic_fixture.add_numbers for adding + [8, 13, 21]"},"call_id":"chatcmpl-tool-ba5c96e01a2d324a","execution":"client","status":"completed","type":"tool_search_call"},"output_index":1,"sequence_number":361,"type":"response.output_item.done"}' + - '{"response":{"conversation_id":null,"created_at":1785759423,"error":null,"id":"resp_019fc78e-47f5-7d60-bfac-0c21eeae099a","incomplete_details":null,"instructions":null,"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[{"content":[{"text":"The + user wants me to call `tool_search` to load `mcp__agentic_fixture.add_numbers`.\nThe + goal for `tool_search` should be to find the function for adding numbers.\nI + will call `tool_search` with the goal \"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\" or similar.\nThen I will not call `add_numbers` yet.\n\nLet''s + check the `tool_search` parameters: `goal` (required, string).\nI will set `goal` + to \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\".\nWait, + the prompt says \"Call tool_search to load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]. Do not call add_numbers yet.\"\nSo I just need to execute + `tool_search` with the appropriate goal.\n\nLet''s craft the call.\n`tool_search(goal=\"load + mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\")`\nDone. I will output + the tool call.\nWait, `tool_search` is described as \"Find the project-specific + function needed to continue the task.\"\nI''ll follow the instruction exactly.\nProceeding. + \nActually, the prompt says \"Call tool_search to load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21].\"\nI will just call it.\nNo extra text.\nLet''s do it. + \nWait, should I use exactly the phrase \"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\" as the goal? Yes.\nReady. \nOutput matches tool call. + \nProceed. \n[Self-Correction/Verification]\nTool: tool_search\nParam: goal + = \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\"\nConstraints: + \"Do not call add_numbers yet.\"\nAll good. \nExecuting. \n[Output Generation]\nCall + tool_search.\nDone. \nWait, let''s verify the function name in the schema: `agentic_ns__mcp__agentic_fixture__add_numbers`. + The prompt says `mcp__agentic_fixture.add_numbers`. That''s fine.\nI will generate + the tool call now. \n`tool_search(goal=\"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\")`\nDone. \nProceeds. \n(Self-Correction/Note during + thought)\nActually, `tool_search` usually expects a natural language description + of what to find, but I''ll stick to the prompt''s exact wording for the goal.\nEverything + looks correct.\nOutput matches. \nProceeds. \n[Final Check]\nTool: tool_search\nArguments: + {\"goal\": \"load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]\"}\nInstruction: + Do not call add_numbers yet.\nMatches perfectly. \nProceeding. \n[Output Generation] + -> Tool Call. \n[Done.] \n*(Self-Correction/Refinement during generation)*: + I will just output the tool call block. No extra text.\n```json\n{\"tool_name\": + \"tool_search\", \"arguments\": {\"goal\": \"load mcp__agentic_fixture.add_numbers + for adding [8, 13, 21]\"}}\n```\nWait, the format requires ``. I''ll use the standard XML-like format or JSON if the system expects + it. The prompt uses XML-like for examples. I''ll stick to the standard format.\nActually, + the system prompt usually handles parsing. I''ll just produce the call.\nDone. + \nProceeds. \n[Output Generation] -> `tool_search` with goal.\nDone. \n*Self-Correction/Verification + during thought*: Wait, `tool_search` might be a meta-tool to retrieve function + definitions. The prompt explicitly says \"Call tool_search to load mcp__agentic_fixture.add_numbers...\". + So I will do exactly that.\nReady. \nOutput matches. \nProceeds.\n","type":"reasoning_text"}],"encrypted_content":null,"id":"rs_019fc78e-5ab2-7ee1-92ad-34c1c0a16b37","status":null,"summary":[],"type":"reasoning"},{"arguments":{"goal":"load + mcp__agentic_fixture.add_numbers for adding [8, 13, 21]"},"call_id":"chatcmpl-tool-ba5c96e01a2d324a","execution":"client","status":"completed","type":"tool_search_call"}],"previous_response_id":null,"status":"completed","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"defer_loading":true,"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"usage":{"input_tokens":392,"input_tokens_details":{"cached_tokens":0},"output_tokens":938,"output_tokens_details":{"reasoning_tokens":832},"total_tokens":1330}},"sequence_number":362,"type":"response.completed"}' +- filename: t2 + request: + body: + input: + - call_id: chatcmpl-tool-ba5c96e01a2d324a + execution: client + status: completed + tools: + - description: Loaded Codex namespace fixture. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + type: tool_search_output + - content: Call the loaded mcp__agentic_fixture.add_numbers function with numbers + [8, 13, 21]. + role: user + type: message + max_output_tokens: 4096 + model: Qwen/Qwen3.6-35B-A3B + previous_response_id: resp_019fc78e-47f5-7d60-bfac-0c21eeae099a + store: true + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + type: response.create + headers: {} + method: WEBSOCKET + path: /v1/responses + query_params: {} + transport: websocket + response: + headers: + transport: websocket + sse: + - 'data: {"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785759423,"error":null,"frequency_penalty":0.0,"id":"resp_019fc78e-5c78-7880-850e-2d695d714764","incomplete_details":null,"instructions":null,"max_output_tokens":4096,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_019fc78e-47f5-7d60-bfac-0c21eeae099a","prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null},"sequence_number":0,"type":"response.created"} + + ' + - 'data: {"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785759423,"error":null,"frequency_penalty":0.0,"id":"resp_019fc78e-5c78-7880-850e-2d695d714764","incomplete_details":null,"instructions":null,"max_output_tokens":4096,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_019fc78e-47f5-7d60-bfac-0c21eeae099a","prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null},"sequence_number":1,"type":"response.in_progress"} + + ' + - 'data: {"item":{"content":[],"id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","summary":[],"type":"reasoning"},"output_index":0,"sequence_number":2,"type":"response.output_item.added"} + + ' + - 'data: {"content_index":0,"delta":"The","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":3,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" user wants to","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":4,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" call the loaded","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":5,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" `mcp","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":6,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"__agentic","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":7,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_fixture.add_numbers","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":8,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"` function with","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":9,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" the arguments","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":10,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" [","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":11,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"8, ","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":12,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"13,","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":13,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" 21","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":14,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"].\nThe","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":15,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" previous","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":16,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" step","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":17,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" successfully","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":18,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" loaded the `","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":19,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"mcp__","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":20,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":21,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"` namespace containing","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":22,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" `","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":23,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"add_numbers`.","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":24,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\nI will","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":25,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" now call `","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":26,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"mcp__","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":27,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":28,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".add_numbers`","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":29,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" with the specified","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":30,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" numbers.\n","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":31,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":32,"text":"The + user wants to call the loaded `mcp__agentic_fixture.add_numbers` function with + the arguments [8, 13, 21].\nThe previous step successfully loaded the `mcp__agentic_fixture` + namespace containing `add_numbers`.\nI will now call `mcp__agentic_fixture.add_numbers` + with the specified numbers.\n","type":"response.reasoning_text.done"} + + ' + - 'data: {"item":{"content":[{"text":"The user wants to call the loaded `mcp__agentic_fixture.add_numbers` + function with the arguments [8, 13, 21].\nThe previous step successfully loaded + the `mcp__agentic_fixture` namespace containing `add_numbers`.\nI will now call + `mcp__agentic_fixture.add_numbers` with the specified numbers.\n","type":"reasoning_text"}],"id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","summary":[],"type":"reasoning"},"output_index":0,"sequence_number":33,"type":"response.output_item.done"} + + ' + - 'data: {"item":{"arguments":"","call_id":"chatcmpl-tool-891e55d1095a8af9","id":"fc_019fc78e-5fe1-73a3-8292-b4768994977c","name":"add_numbers","namespace":"mcp__agentic_fixture","status":"in_progress","type":"function_call"},"output_index":1,"sequence_number":34,"type":"response.output_item.added"} + + ' + - 'data: {"content_index":0,"delta":"{}","item_id":"fc_019fc78e-5fe1-73a3-8292-b4768994977c","output_index":1,"sequence_number":35,"type":"response.function_call_arguments.delta"} + + ' + - 'data: {"content_index":0,"delta":"{\"numbers\": ","item_id":"fc_019fc78e-5fe1-73a3-8292-b4768994977c","output_index":1,"sequence_number":36,"type":"response.function_call_arguments.delta"} + + ' + - 'data: {"content_index":0,"delta":"[8, 13, 21]}","item_id":"fc_019fc78e-5fe1-73a3-8292-b4768994977c","output_index":1,"sequence_number":37,"type":"response.function_call_arguments.delta"} + + ' + - 'data: {"arguments":"{\"numbers\": [8, 13, 21]}","content_index":0,"item_id":"fc_019fc78e-5fe1-73a3-8292-b4768994977c","output_index":1,"sequence_number":38,"type":"response.function_call_arguments.done"} + + ' + - 'data: {"item":{"arguments":"{\"numbers\": [8, 13, 21]}","call_id":"chatcmpl-tool-891e55d1095a8af9","id":"fc_019fc78e-5fe1-73a3-8292-b4768994977c","name":"add_numbers","namespace":"mcp__agentic_fixture","status":"completed","type":"function_call"},"output_index":1,"sequence_number":39,"type":"response.output_item.done"} + + ' + - 'data: {"response":{"conversation_id":null,"created_at":1785759424,"error":null,"id":"resp_019fc78e-5c78-7880-850e-2d695d714764","incomplete_details":null,"instructions":null,"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[{"content":[{"text":"The + user wants to call the loaded `mcp__agentic_fixture.add_numbers` function with + the arguments [8, 13, 21].\nThe previous step successfully loaded the `mcp__agentic_fixture` + namespace containing `add_numbers`.\nI will now call `mcp__agentic_fixture.add_numbers` + with the specified numbers.\n","type":"reasoning_text"}],"encrypted_content":null,"id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","status":null,"summary":[],"type":"reasoning"},{"arguments":"{\"numbers\": + [8, 13, 21]}","call_id":"chatcmpl-tool-891e55d1095a8af9","id":"fc_019fc78e-5fe1-73a3-8292-b4768994977c","name":"add_numbers","namespace":"mcp__agentic_fixture","status":"completed","type":"function_call"}],"previous_response_id":"resp_019fc78e-47f5-7d60-bfac-0c21eeae099a","status":"completed","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"usage":{"input_tokens":690,"input_tokens_details":{"cached_tokens":0},"output_tokens":124,"output_tokens_details":{"reasoning_tokens":69},"total_tokens":814}},"sequence_number":40,"type":"response.completed"} + + ' + - 'data: [DONE] + + ' + status_code: 101 + websocket: + - '{"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785759423,"error":null,"frequency_penalty":0.0,"id":"resp_019fc78e-5c78-7880-850e-2d695d714764","incomplete_details":null,"instructions":null,"max_output_tokens":4096,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_019fc78e-47f5-7d60-bfac-0c21eeae099a","prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null},"sequence_number":0,"type":"response.created"}' + - '{"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785759423,"error":null,"frequency_penalty":0.0,"id":"resp_019fc78e-5c78-7880-850e-2d695d714764","incomplete_details":null,"instructions":null,"max_output_tokens":4096,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_019fc78e-47f5-7d60-bfac-0c21eeae099a","prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null},"sequence_number":1,"type":"response.in_progress"}' + - '{"item":{"content":[],"id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","summary":[],"type":"reasoning"},"output_index":0,"sequence_number":2,"type":"response.output_item.added"}' + - '{"content_index":0,"delta":"The","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":3,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" user wants to","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":4,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" call the loaded","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":5,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" `mcp","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":6,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"__agentic","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":7,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_fixture.add_numbers","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":8,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"` function with","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":9,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" the arguments","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":10,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" [","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":11,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"8, ","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":12,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"13,","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":13,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" 21","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":14,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"].\nThe","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":15,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" previous","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":16,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" step","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":17,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" successfully","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":18,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" loaded the `","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":19,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"mcp__","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":20,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":21,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"` namespace containing","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":22,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" `","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":23,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"add_numbers`.","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":24,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\nI will","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":25,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" now call `","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":26,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"mcp__","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":27,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"agentic_fixture","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":28,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".add_numbers`","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":29,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" with the specified","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":30,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" numbers.\n","item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":31,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"item_id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","output_index":0,"sequence_number":32,"text":"The + user wants to call the loaded `mcp__agentic_fixture.add_numbers` function with + the arguments [8, 13, 21].\nThe previous step successfully loaded the `mcp__agentic_fixture` + namespace containing `add_numbers`.\nI will now call `mcp__agentic_fixture.add_numbers` + with the specified numbers.\n","type":"response.reasoning_text.done"}' + - '{"item":{"content":[{"text":"The user wants to call the loaded `mcp__agentic_fixture.add_numbers` + function with the arguments [8, 13, 21].\nThe previous step successfully loaded + the `mcp__agentic_fixture` namespace containing `add_numbers`.\nI will now call + `mcp__agentic_fixture.add_numbers` with the specified numbers.\n","type":"reasoning_text"}],"id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","summary":[],"type":"reasoning"},"output_index":0,"sequence_number":33,"type":"response.output_item.done"}' + - '{"item":{"arguments":"","call_id":"chatcmpl-tool-891e55d1095a8af9","id":"fc_019fc78e-5fe1-73a3-8292-b4768994977c","name":"add_numbers","namespace":"mcp__agentic_fixture","status":"in_progress","type":"function_call"},"output_index":1,"sequence_number":34,"type":"response.output_item.added"}' + - '{"content_index":0,"delta":"{}","item_id":"fc_019fc78e-5fe1-73a3-8292-b4768994977c","output_index":1,"sequence_number":35,"type":"response.function_call_arguments.delta"}' + - '{"content_index":0,"delta":"{\"numbers\": ","item_id":"fc_019fc78e-5fe1-73a3-8292-b4768994977c","output_index":1,"sequence_number":36,"type":"response.function_call_arguments.delta"}' + - '{"content_index":0,"delta":"[8, 13, 21]}","item_id":"fc_019fc78e-5fe1-73a3-8292-b4768994977c","output_index":1,"sequence_number":37,"type":"response.function_call_arguments.delta"}' + - '{"arguments":"{\"numbers\": [8, 13, 21]}","content_index":0,"item_id":"fc_019fc78e-5fe1-73a3-8292-b4768994977c","output_index":1,"sequence_number":38,"type":"response.function_call_arguments.done"}' + - '{"item":{"arguments":"{\"numbers\": [8, 13, 21]}","call_id":"chatcmpl-tool-891e55d1095a8af9","id":"fc_019fc78e-5fe1-73a3-8292-b4768994977c","name":"add_numbers","namespace":"mcp__agentic_fixture","status":"completed","type":"function_call"},"output_index":1,"sequence_number":39,"type":"response.output_item.done"}' + - '{"response":{"conversation_id":null,"created_at":1785759424,"error":null,"id":"resp_019fc78e-5c78-7880-850e-2d695d714764","incomplete_details":null,"instructions":null,"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[{"content":[{"text":"The + user wants to call the loaded `mcp__agentic_fixture.add_numbers` function with + the arguments [8, 13, 21].\nThe previous step successfully loaded the `mcp__agentic_fixture` + namespace containing `add_numbers`.\nI will now call `mcp__agentic_fixture.add_numbers` + with the specified numbers.\n","type":"reasoning_text"}],"encrypted_content":null,"id":"rs_019fc78e-5fd1-7b63-b4a3-5bfa0f145f35","status":null,"summary":[],"type":"reasoning"},{"arguments":"{\"numbers\": + [8, 13, 21]}","call_id":"chatcmpl-tool-891e55d1095a8af9","id":"fc_019fc78e-5fe1-73a3-8292-b4768994977c","name":"add_numbers","namespace":"mcp__agentic_fixture","status":"completed","type":"function_call"}],"previous_response_id":"resp_019fc78e-47f5-7d60-bfac-0c21eeae099a","status":"completed","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"usage":{"input_tokens":690,"input_tokens_details":{"cached_tokens":0},"output_tokens":124,"output_tokens_details":{"reasoning_tokens":69},"total_tokens":814}},"sequence_number":40,"type":"response.completed"}' +- filename: t3 + request: + body: + input: + - call_id: chatcmpl-tool-891e55d1095a8af9 + output: '{"sum":42,"count":3}' + type: function_call_output + - content: Use the function output and return exactly TOOL_SEARCH_CODEX_OK_42. + role: user + type: message + max_output_tokens: 4096 + model: Qwen/Qwen3.6-35B-A3B + previous_response_id: resp_019fc78e-5c78-7880-850e-2d695d714764 + store: true + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + type: response.create + headers: {} + method: WEBSOCKET + path: /v1/responses + query_params: {} + transport: websocket + response: + headers: + transport: websocket + sse: + - 'data: {"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785759425,"error":null,"frequency_penalty":0.0,"id":"resp_019fc78e-61ed-7492-a3fc-edeca576cf51","incomplete_details":null,"instructions":null,"max_output_tokens":4096,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_019fc78e-5c78-7880-850e-2d695d714764","prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null},"sequence_number":0,"type":"response.created"} + + ' + - 'data: {"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785759425,"error":null,"frequency_penalty":0.0,"id":"resp_019fc78e-61ed-7492-a3fc-edeca576cf51","incomplete_details":null,"instructions":null,"max_output_tokens":4096,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_019fc78e-5c78-7880-850e-2d695d714764","prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null},"sequence_number":1,"type":"response.in_progress"} + + ' + - 'data: {"item":{"content":[],"id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","summary":[],"type":"reasoning"},"output_index":0,"sequence_number":2,"type":"response.output_item.added"} + + ' + - 'data: {"content_index":0,"delta":"The","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":3,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" user wants me","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":4,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" to return","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":5,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" a","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":6,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" specific string `","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":7,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"TOOL_SEARCH","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":8,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_CODEX_OK","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":9,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_42","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":10,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"` based on","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":11,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" the previous","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":12,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" function output.","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":13,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\nThe previous","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":14,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" function output was","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":15,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" `{\"sum","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":16,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\":42","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":17,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":",\"","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":18,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"count\":3","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":19,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"}`.\n","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":20,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"The user''s","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":21,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" instruction is explicit","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":22,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":": \"return","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":23,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" exactly TOOL_SEARCH","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":24,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_CODEX_OK","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":25,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_42","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":26,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".\"","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":27,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\nI should","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":28,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" just output that","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":29,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" string.\n","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":30,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"No further","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":31,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" tool calls are","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":32,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" needed.\n","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":33,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"The","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":34,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" response","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":35,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" should be exactly","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":36,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" `TOOL","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":37,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_SEARCH_CODEX","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":38,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_OK_4","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":39,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"2`.\n","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":40,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"I will verify","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":41,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" the","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":42,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" sum from","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":43,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" the previous step","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":44,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" (","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":45,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"8+1","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":46,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"3+2","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":47,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"1 = ","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":48,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"42)","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":49,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" matches the \"","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":50,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"42\"","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":51,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" in the requested","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":52,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" string. It","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":53,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":" does.\n","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":54,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"Ready","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":55,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":".","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":56,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"\n","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":57,"type":"response.reasoning_text.delta"} + + ' + - 'data: {"content_index":0,"item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":58,"text":"The + user wants me to return a specific string `TOOL_SEARCH_CODEX_OK_42` based on + the previous function output.\nThe previous function output was `{\"sum\":42,\"count\":3}`.\nThe + user''s instruction is explicit: \"return exactly TOOL_SEARCH_CODEX_OK_42.\"\nI + should just output that string.\nNo further tool calls are needed.\nThe response + should be exactly `TOOL_SEARCH_CODEX_OK_42`.\nI will verify the sum from the + previous step (8+13+21 = 42) matches the \"42\" in the requested string. It + does.\nReady.\n","type":"response.reasoning_text.done"} + + ' + - 'data: {"item":{"content":[{"text":"The user wants me to return a specific string + `TOOL_SEARCH_CODEX_OK_42` based on the previous function output.\nThe previous + function output was `{\"sum\":42,\"count\":3}`.\nThe user''s instruction is + explicit: \"return exactly TOOL_SEARCH_CODEX_OK_42.\"\nI should just output + that string.\nNo further tool calls are needed.\nThe response should be exactly + `TOOL_SEARCH_CODEX_OK_42`.\nI will verify the sum from the previous step (8+13+21 + = 42) matches the \"42\" in the requested string. It does.\nReady.\n","type":"reasoning_text"}],"id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","summary":[],"type":"reasoning"},"output_index":0,"sequence_number":59,"type":"response.output_item.done"} + + ' + - 'data: {"item":{"content":[],"id":"msg_019fc78e-6691-7c42-a88f-52fee40cafcf","role":"assistant","status":"in_progress","type":"message"},"output_index":1,"sequence_number":60,"type":"response.output_item.added"} + + ' + - 'data: {"content_index":0,"item_id":"msg_019fc78e-6691-7c42-a88f-52fee40cafcf","output_index":1,"part":{"annotations":[],"logprobs":[],"text":"","type":"output_text"},"sequence_number":61,"type":"response.content_part.added"} + + ' + - 'data: {"content_index":0,"delta":"\n\nTOOL_SEARCH","item_id":"msg_019fc78e-6691-7c42-a88f-52fee40cafcf","logprobs":[],"output_index":1,"sequence_number":62,"type":"response.output_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_CODEX_OK","item_id":"msg_019fc78e-6691-7c42-a88f-52fee40cafcf","logprobs":[],"output_index":1,"sequence_number":63,"type":"response.output_text.delta"} + + ' + - 'data: {"content_index":0,"delta":"_42","item_id":"msg_019fc78e-6691-7c42-a88f-52fee40cafcf","logprobs":[],"output_index":1,"sequence_number":64,"type":"response.output_text.delta"} + + ' + - 'data: {"content_index":0,"item_id":"msg_019fc78e-6691-7c42-a88f-52fee40cafcf","logprobs":[],"output_index":1,"sequence_number":65,"text":"\n\nTOOL_SEARCH_CODEX_OK_42","type":"response.output_text.done"} + + ' + - 'data: {"content_index":0,"item_id":"msg_019fc78e-6691-7c42-a88f-52fee40cafcf","output_index":1,"part":{"annotations":[],"logprobs":[],"text":"\n\nTOOL_SEARCH_CODEX_OK_42","type":"output_text"},"sequence_number":66,"type":"response.content_part.done"} + + ' + - 'data: {"item":{"content":[{"annotations":[],"logprobs":[],"text":"\n\nTOOL_SEARCH_CODEX_OK_42","type":"output_text"}],"id":"msg_019fc78e-6691-7c42-a88f-52fee40cafcf","role":"assistant","status":"completed","type":"message"},"output_index":1,"sequence_number":67,"type":"response.output_item.done"} + + ' + - 'data: {"response":{"conversation_id":null,"created_at":1785759426,"error":null,"id":"resp_019fc78e-61ed-7492-a3fc-edeca576cf51","incomplete_details":null,"instructions":null,"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[{"content":[{"text":"The + user wants me to return a specific string `TOOL_SEARCH_CODEX_OK_42` based on + the previous function output.\nThe previous function output was `{\"sum\":42,\"count\":3}`.\nThe + user''s instruction is explicit: \"return exactly TOOL_SEARCH_CODEX_OK_42.\"\nI + should just output that string.\nNo further tool calls are needed.\nThe response + should be exactly `TOOL_SEARCH_CODEX_OK_42`.\nI will verify the sum from the + previous step (8+13+21 = 42) matches the \"42\" in the requested string. It + does.\nReady.\n","type":"reasoning_text"}],"encrypted_content":null,"id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","status":null,"summary":[],"type":"reasoning"},{"content":[{"annotations":[],"text":"\n\nTOOL_SEARCH_CODEX_OK_42","type":"output_text"}],"id":"msg_019fc78e-6691-7c42-a88f-52fee40cafcf","role":"assistant","status":"completed","type":"message"}],"previous_response_id":"resp_019fc78e-5c78-7880-850e-2d695d714764","status":"completed","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"usage":{"input_tokens":776,"input_tokens_details":{"cached_tokens":0},"output_tokens":151,"output_tokens_details":{"reasoning_tokens":123},"total_tokens":927}},"sequence_number":68,"type":"response.completed"} + + ' + - 'data: [DONE] + + ' + status_code: 101 + websocket: + - '{"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785759425,"error":null,"frequency_penalty":0.0,"id":"resp_019fc78e-61ed-7492-a3fc-edeca576cf51","incomplete_details":null,"instructions":null,"max_output_tokens":4096,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_019fc78e-5c78-7880-850e-2d695d714764","prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null},"sequence_number":0,"type":"response.created"}' + - '{"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785759425,"error":null,"frequency_penalty":0.0,"id":"resp_019fc78e-61ed-7492-a3fc-edeca576cf51","incomplete_details":null,"instructions":null,"max_output_tokens":4096,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_019fc78e-5c78-7880-850e-2d695d714764","prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null},"sequence_number":1,"type":"response.in_progress"}' + - '{"item":{"content":[],"id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","summary":[],"type":"reasoning"},"output_index":0,"sequence_number":2,"type":"response.output_item.added"}' + - '{"content_index":0,"delta":"The","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":3,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" user wants me","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":4,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" to return","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":5,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" a","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":6,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" specific string `","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":7,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"TOOL_SEARCH","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":8,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_CODEX_OK","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":9,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_42","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":10,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"` based on","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":11,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" the previous","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":12,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" function output.","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":13,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\nThe previous","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":14,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" function output was","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":15,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" `{\"sum","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":16,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\":42","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":17,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":",\"","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":18,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"count\":3","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":19,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"}`.\n","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":20,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"The user''s","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":21,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" instruction is explicit","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":22,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":": \"return","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":23,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" exactly TOOL_SEARCH","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":24,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_CODEX_OK","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":25,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_42","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":26,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".\"","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":27,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\nI should","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":28,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" just output that","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":29,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" string.\n","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":30,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"No further","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":31,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" tool calls are","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":32,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" needed.\n","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":33,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"The","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":34,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" response","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":35,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" should be exactly","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":36,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" `TOOL","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":37,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_SEARCH_CODEX","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":38,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"_OK_4","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":39,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"2`.\n","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":40,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"I will verify","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":41,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" the","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":42,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" sum from","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":43,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" the previous step","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":44,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" (","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":45,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"8+1","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":46,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"3+2","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":47,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"1 = ","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":48,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"42)","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":49,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" matches the \"","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":50,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"42\"","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":51,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" in the requested","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":52,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" string. It","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":53,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":" does.\n","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":54,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"Ready","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":55,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":".","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":56,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"delta":"\n","item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":57,"type":"response.reasoning_text.delta"}' + - '{"content_index":0,"item_id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","output_index":0,"sequence_number":58,"text":"The + user wants me to return a specific string `TOOL_SEARCH_CODEX_OK_42` based on + the previous function output.\nThe previous function output was `{\"sum\":42,\"count\":3}`.\nThe + user''s instruction is explicit: \"return exactly TOOL_SEARCH_CODEX_OK_42.\"\nI + should just output that string.\nNo further tool calls are needed.\nThe response + should be exactly `TOOL_SEARCH_CODEX_OK_42`.\nI will verify the sum from the + previous step (8+13+21 = 42) matches the \"42\" in the requested string. It + does.\nReady.\n","type":"response.reasoning_text.done"}' + - '{"item":{"content":[{"text":"The user wants me to return a specific string + `TOOL_SEARCH_CODEX_OK_42` based on the previous function output.\nThe previous + function output was `{\"sum\":42,\"count\":3}`.\nThe user''s instruction is + explicit: \"return exactly TOOL_SEARCH_CODEX_OK_42.\"\nI should just output + that string.\nNo further tool calls are needed.\nThe response should be exactly + `TOOL_SEARCH_CODEX_OK_42`.\nI will verify the sum from the previous step (8+13+21 + = 42) matches the \"42\" in the requested string. It does.\nReady.\n","type":"reasoning_text"}],"id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","summary":[],"type":"reasoning"},"output_index":0,"sequence_number":59,"type":"response.output_item.done"}' + - '{"item":{"content":[],"id":"msg_019fc78e-6691-7c42-a88f-52fee40cafcf","role":"assistant","status":"in_progress","type":"message"},"output_index":1,"sequence_number":60,"type":"response.output_item.added"}' + - '{"content_index":0,"item_id":"msg_019fc78e-6691-7c42-a88f-52fee40cafcf","output_index":1,"part":{"annotations":[],"logprobs":[],"text":"","type":"output_text"},"sequence_number":61,"type":"response.content_part.added"}' + - '{"content_index":0,"delta":"\n\nTOOL_SEARCH","item_id":"msg_019fc78e-6691-7c42-a88f-52fee40cafcf","logprobs":[],"output_index":1,"sequence_number":62,"type":"response.output_text.delta"}' + - '{"content_index":0,"delta":"_CODEX_OK","item_id":"msg_019fc78e-6691-7c42-a88f-52fee40cafcf","logprobs":[],"output_index":1,"sequence_number":63,"type":"response.output_text.delta"}' + - '{"content_index":0,"delta":"_42","item_id":"msg_019fc78e-6691-7c42-a88f-52fee40cafcf","logprobs":[],"output_index":1,"sequence_number":64,"type":"response.output_text.delta"}' + - '{"content_index":0,"item_id":"msg_019fc78e-6691-7c42-a88f-52fee40cafcf","logprobs":[],"output_index":1,"sequence_number":65,"text":"\n\nTOOL_SEARCH_CODEX_OK_42","type":"response.output_text.done"}' + - '{"content_index":0,"item_id":"msg_019fc78e-6691-7c42-a88f-52fee40cafcf","output_index":1,"part":{"annotations":[],"logprobs":[],"text":"\n\nTOOL_SEARCH_CODEX_OK_42","type":"output_text"},"sequence_number":66,"type":"response.content_part.done"}' + - '{"item":{"content":[{"annotations":[],"logprobs":[],"text":"\n\nTOOL_SEARCH_CODEX_OK_42","type":"output_text"}],"id":"msg_019fc78e-6691-7c42-a88f-52fee40cafcf","role":"assistant","status":"completed","type":"message"},"output_index":1,"sequence_number":67,"type":"response.output_item.done"}' + - '{"response":{"conversation_id":null,"created_at":1785759426,"error":null,"id":"resp_019fc78e-61ed-7492-a3fc-edeca576cf51","incomplete_details":null,"instructions":null,"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[{"content":[{"text":"The + user wants me to return a specific string `TOOL_SEARCH_CODEX_OK_42` based on + the previous function output.\nThe previous function output was `{\"sum\":42,\"count\":3}`.\nThe + user''s instruction is explicit: \"return exactly TOOL_SEARCH_CODEX_OK_42.\"\nI + should just output that string.\nNo further tool calls are needed.\nThe response + should be exactly `TOOL_SEARCH_CODEX_OK_42`.\nI will verify the sum from the + previous step (8+13+21 = 42) matches the \"42\" in the requested string. It + does.\nReady.\n","type":"reasoning_text"}],"encrypted_content":null,"id":"rs_019fc78e-6671-7412-bf7f-d9adf35df802","status":null,"summary":[],"type":"reasoning"},{"content":[{"annotations":[],"text":"\n\nTOOL_SEARCH_CODEX_OK_42","type":"output_text"}],"id":"msg_019fc78e-6691-7c42-a88f-52fee40cafcf","role":"assistant","status":"completed","type":"message"}],"previous_response_id":"resp_019fc78e-5c78-7880-850e-2d695d714764","status":"completed","tools":[{"description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"description":"Add + a list of numbers and return the total.","name":"add_numbers","parameters":{"additionalProperties":false,"properties":{"numbers":{"items":{"type":"number"},"minItems":1,"type":"array"}},"required":["numbers"],"type":"object"},"strict":false,"type":"function"}],"type":"namespace"}],"usage":{"input_tokens":776,"input_tokens_details":{"cached_tokens":0},"output_tokens":151,"output_tokens_details":{"reasoning_tokens":123},"total_tokens":927}},"sequence_number":68,"type":"response.completed"}' diff --git a/crates/agentic-server-core/tests/cassettes/codex/codex-openai-https-tool-search-gpt-5.6-nonstreaming.yaml b/crates/agentic-server-core/tests/cassettes/codex/codex-openai-https-tool-search-gpt-5.6-nonstreaming.yaml new file mode 100644 index 00000000..9375c39e --- /dev/null +++ b/crates/agentic-server-core/tests/cassettes/codex/codex-openai-https-tool-search-gpt-5.6-nonstreaming.yaml @@ -0,0 +1,509 @@ +turns: +- filename: t1 + request: + body: + input: Call tool_search to load mcp__agentic_fixture.add_numbers for adding + [8, 13, 21]. Do not call add_numbers yet. + max_output_tokens: 1024 + model: gpt-5.6 + store: true + stream: false + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + headers: + accept: '*/*' + authorization: Bearer *** + content-type: application/json + user-agent: python-httpx/0.28.1 + method: POST + path: /v1/responses + query_params: {} + response: + body: + background: false + billing: + payer: developer + completed_at: 1785758218 + created_at: 1785758217 + error: null + frequency_penalty: 0.0 + id: resp_093bd861e492fd38006a7082091b00819ba595ac217d001f08 + incomplete_details: null + instructions: null + max_output_tokens: 1024 + max_tool_calls: null + metadata: {} + model: gpt-5.6-sol + moderation: null + object: response + output: + - arguments: + goal: Load the project-specific function mcp__agentic_fixture.add_numbers + for adding the numbers [8, 13, 21], but do not execute it yet. + call_id: call_56msF7BjjLRbWBWKt9Zo3mnA + execution: client + id: tsc_093bd861e492fd38006a70820a59e0819b8d24306c9b955ce6 + status: completed + type: tool_search_call + parallel_tool_calls: true + presence_penalty: 0.0 + previous_response_id: null + prompt_cache_key: null + prompt_cache_retention: 24h + reasoning: + context: all_turns + effort: medium + mode: standard + summary: null + safety_identifier: null + service_tier: default + status: completed + store: true + temperature: 1.0 + text: + format: + type: text + verbosity: medium + tool_choice: auto + tool_usage: + image_gen: + input_tokens: 0 + input_tokens_details: + image_tokens: 0 + text_tokens: 0 + output_tokens: 0 + output_tokens_details: + image_tokens: 0 + text_tokens: 0 + total_tokens: 0 + web_search: + num_requests: 0 + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + output_schema: null + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + top_logprobs: 0 + top_p: 0.98 + truncation: disabled + usage: + input_tokens: 80 + input_tokens_details: + cache_write_tokens: 0 + cached_tokens: 0 + output_tokens: 52 + output_tokens_details: + reasoning_tokens: 0 + total_tokens: 132 + user: null + headers: + content-type: application/json + status_code: 200 +- filename: t2 + request: + body: + input: + - call_id: call_56msF7BjjLRbWBWKt9Zo3mnA + execution: client + status: completed + tools: + - description: Loaded Codex namespace fixture. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + type: tool_search_output + - content: Call the loaded mcp__agentic_fixture.add_numbers function with numbers + [8, 13, 21]. + role: user + type: message + max_output_tokens: 1024 + model: gpt-5.6 + previous_response_id: resp_093bd861e492fd38006a7082091b00819ba595ac217d001f08 + store: true + stream: false + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + headers: + accept: '*/*' + authorization: Bearer *** + content-type: application/json + user-agent: python-httpx/0.28.1 + method: POST + path: /v1/responses + query_params: {} + response: + body: + background: false + billing: + payer: developer + completed_at: 1785758220 + created_at: 1785758219 + error: null + frequency_penalty: 0.0 + id: resp_093bd861e492fd38006a70820b5a20819bb48894be4de4a7c6 + incomplete_details: null + instructions: null + max_output_tokens: 1024 + max_tool_calls: null + metadata: {} + model: gpt-5.6-sol + moderation: null + object: response + output: + - arguments: '{"numbers":[8,13,21]}' + call_id: call_Wa2yRdtCQT2zY83up1vl9KZA + id: fc_093bd861e492fd38006a70820c069c819bb75526c61f31d5c3 + name: add_numbers + namespace: mcp__agentic_fixture + status: completed + type: function_call + parallel_tool_calls: true + presence_penalty: 0.0 + previous_response_id: resp_093bd861e492fd38006a7082091b00819ba595ac217d001f08 + prompt_cache_key: null + prompt_cache_retention: 24h + reasoning: + context: all_turns + effort: medium + mode: standard + summary: null + safety_identifier: null + service_tier: default + status: completed + store: true + temperature: 1.0 + text: + format: + type: text + verbosity: medium + tool_choice: auto + tool_usage: + image_gen: + input_tokens: 0 + input_tokens_details: + image_tokens: 0 + text_tokens: 0 + output_tokens: 0 + output_tokens_details: + image_tokens: 0 + text_tokens: 0 + total_tokens: 0 + web_search: + num_requests: 0 + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - description: Add a list of numbers and return the total. + name: add_numbers + output_schema: null + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + top_logprobs: 0 + top_p: 0.98 + truncation: disabled + usage: + input_tokens: 327 + input_tokens_details: + cache_write_tokens: 0 + cached_tokens: 0 + output_tokens: 26 + output_tokens_details: + reasoning_tokens: 0 + total_tokens: 353 + user: null + headers: + content-type: application/json + status_code: 200 +- filename: t3 + request: + body: + input: + - call_id: call_Wa2yRdtCQT2zY83up1vl9KZA + output: '{"sum":42,"count":3}' + type: function_call_output + - content: Use the function output and return exactly TOOL_SEARCH_CODEX_OK_42. + role: user + type: message + max_output_tokens: 1024 + model: gpt-5.6 + previous_response_id: resp_093bd861e492fd38006a70820b5a20819bb48894be4de4a7c6 + store: true + stream: false + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + headers: + accept: '*/*' + authorization: Bearer *** + content-type: application/json + user-agent: python-httpx/0.28.1 + method: POST + path: /v1/responses + query_params: {} + response: + body: + background: false + billing: + payer: developer + completed_at: 1785758223 + created_at: 1785758220 + error: null + frequency_penalty: 0.0 + id: resp_093bd861e492fd38006a70820cb0ac819b8e8be2c1f309b0d5 + incomplete_details: null + instructions: null + max_output_tokens: 1024 + max_tool_calls: null + metadata: {} + model: gpt-5.6-sol + moderation: null + object: response + output: + - content: + - annotations: [] + logprobs: [] + text: TOOL_SEARCH_CODEX_OK_42 + type: output_text + id: msg_093bd861e492fd38006a70820e4388819b9ed3906876253a9c + phase: final_answer + role: assistant + status: completed + type: message + parallel_tool_calls: true + presence_penalty: 0.0 + previous_response_id: resp_093bd861e492fd38006a70820b5a20819bb48894be4de4a7c6 + prompt_cache_key: null + prompt_cache_retention: 24h + reasoning: + context: all_turns + effort: medium + mode: standard + summary: null + safety_identifier: null + service_tier: default + status: completed + store: true + temperature: 1.0 + text: + format: + type: text + verbosity: medium + tool_choice: auto + tool_usage: + image_gen: + input_tokens: 0 + input_tokens_details: + image_tokens: 0 + text_tokens: 0 + output_tokens: 0 + output_tokens_details: + image_tokens: 0 + text_tokens: 0 + total_tokens: 0 + web_search: + num_requests: 0 + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - description: Add a list of numbers and return the total. + name: add_numbers + output_schema: null + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + top_logprobs: 0 + top_p: 0.98 + truncation: disabled + usage: + input_tokens: 397 + input_tokens_details: + cache_write_tokens: 0 + cached_tokens: 0 + output_tokens: 12 + output_tokens_details: + reasoning_tokens: 0 + total_tokens: 409 + user: null + headers: + content-type: application/json + status_code: 200 diff --git a/crates/agentic-server-core/tests/cassettes/codex/codex-openai-https-tool-search-gpt-5.6-streaming.yaml b/crates/agentic-server-core/tests/cassettes/codex/codex-openai-https-tool-search-gpt-5.6-streaming.yaml new file mode 100644 index 00000000..cc997e83 --- /dev/null +++ b/crates/agentic-server-core/tests/cassettes/codex/codex-openai-https-tool-search-gpt-5.6-streaming.yaml @@ -0,0 +1,553 @@ +turns: +- filename: t1 + request: + body: + input: Call tool_search to load mcp__agentic_fixture.add_numbers for adding + [8, 13, 21]. Do not call add_numbers yet. + max_output_tokens: 1024 + model: gpt-5.6 + store: true + stream: true + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + headers: + accept: '*/*' + authorization: Bearer *** + content-type: application/json + user-agent: python-httpx/0.28.1 + method: POST + path: /v1/responses + query_params: {} + response: + headers: + content-type: text/event-stream; charset=utf-8 + sse: + - 'event: response.created + + ' + - 'data: {"type":"response.created","response":{"id":"resp_0572a70e741183f7006a708202c21c819a98c66db95ade9669","object":"response","created_at":1785758210,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","defer_loading":true,"description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} + + ' + - ' + + ' + - 'event: response.in_progress + + ' + - 'data: {"type":"response.in_progress","response":{"id":"resp_0572a70e741183f7006a708202c21c819a98c66db95ade9669","object":"response","created_at":1785758210,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","defer_loading":true,"description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} + + ' + - ' + + ' + - 'event: response.output_item.added + + ' + - 'data: {"type":"response.output_item.added","item":{"id":"tsc_0572a70e741183f7006a7082036128819ab8ba2afb8e99778a","type":"tool_search_call","status":"in_progress","arguments":{},"call_id":"call_OMQ9XoiTfBDEgokH73oJlCK6","execution":"client"},"output_index":0,"sequence_number":2} + + ' + - ' + + ' + - 'event: response.output_item.done + + ' + - 'data: {"type":"response.output_item.done","item":{"id":"tsc_0572a70e741183f7006a7082036128819ab8ba2afb8e99778a","type":"tool_search_call","status":"completed","arguments":{"goal":"Load + the project-specific function mcp__agentic_fixture.add_numbers for adding the + numbers [8, 13, 21], but do not execute it."},"call_id":"call_OMQ9XoiTfBDEgokH73oJlCK6","execution":"client"},"output_index":0,"sequence_number":3} + + ' + - ' + + ' + - 'event: response.completed + + ' + - 'data: {"type":"response.completed","response":{"id":"resp_0572a70e741183f7006a708202c21c819a98c66db95ade9669","object":"response","created_at":1785758210,"status":"completed","background":false,"completed_at":1785758211,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[{"id":"tsc_0572a70e741183f7006a7082036128819ab8ba2afb8e99778a","type":"tool_search_call","status":"completed","arguments":{"goal":"Load + the project-specific function mcp__agentic_fixture.add_numbers for adding the + numbers [8, 13, 21], but do not execute it."},"call_id":"call_OMQ9XoiTfBDEgokH73oJlCK6","execution":"client"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","defer_loading":true,"description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":{"input_tokens":80,"input_tokens_details":{"cache_write_tokens":0,"cached_tokens":0},"output_tokens":51,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":131},"user":null,"metadata":{}},"sequence_number":4} + + ' + - ' + + ' + status_code: 200 +- filename: t2 + request: + body: + input: + - call_id: call_OMQ9XoiTfBDEgokH73oJlCK6 + execution: client + status: completed + tools: + - description: Loaded Codex namespace fixture. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + type: tool_search_output + - content: Call the loaded mcp__agentic_fixture.add_numbers function with numbers + [8, 13, 21]. + role: user + type: message + max_output_tokens: 1024 + model: gpt-5.6 + previous_response_id: resp_0572a70e741183f7006a708202c21c819a98c66db95ade9669 + store: true + stream: true + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + headers: + accept: '*/*' + authorization: Bearer *** + content-type: application/json + user-agent: python-httpx/0.28.1 + method: POST + path: /v1/responses + query_params: {} + response: + headers: + content-type: text/event-stream; charset=utf-8 + sse: + - 'event: response.created + + ' + - 'data: {"type":"response.created","response":{"id":"resp_0572a70e741183f7006a7082045410819a9d83c64892da665f","object":"response","created_at":1785758212,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_0572a70e741183f7006a708202c21c819a98c66db95ade9669","prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} + + ' + - ' + + ' + - 'event: response.in_progress + + ' + - 'data: {"type":"response.in_progress","response":{"id":"resp_0572a70e741183f7006a7082045410819a9d83c64892da665f","object":"response","created_at":1785758212,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_0572a70e741183f7006a708202c21c819a98c66db95ade9669","prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} + + ' + - ' + + ' + - 'event: response.output_item.added + + ' + - 'data: {"type":"response.output_item.added","item":{"id":"fc_0572a70e741183f7006a7082050120819aa04c73d0ad59d867","type":"function_call","status":"in_progress","arguments":"","call_id":"call_8r5PktQD3f2ziqRcCkbpTjZP","name":"add_numbers","namespace":"mcp__agentic_fixture"},"output_index":0,"sequence_number":2} + + ' + - ' + + ' + - 'event: response.function_call_arguments.delta + + ' + - 'data: {"type":"response.function_call_arguments.delta","delta":"{\"","item_id":"fc_0572a70e741183f7006a7082050120819aa04c73d0ad59d867","obfuscation":"Da3xWumiDzcmP7","output_index":0,"sequence_number":3} + + ' + - ' + + ' + - 'event: response.function_call_arguments.delta + + ' + - 'data: {"type":"response.function_call_arguments.delta","delta":"numbers","item_id":"fc_0572a70e741183f7006a7082050120819aa04c73d0ad59d867","obfuscation":"khHNITKJe","output_index":0,"sequence_number":4} + + ' + - ' + + ' + - 'event: response.function_call_arguments.delta + + ' + - 'data: {"type":"response.function_call_arguments.delta","delta":"\":[","item_id":"fc_0572a70e741183f7006a7082050120819aa04c73d0ad59d867","obfuscation":"EpzCxJgSCl3dr","output_index":0,"sequence_number":5} + + ' + - ' + + ' + - 'event: response.function_call_arguments.delta + + ' + - 'data: {"type":"response.function_call_arguments.delta","delta":"8","item_id":"fc_0572a70e741183f7006a7082050120819aa04c73d0ad59d867","obfuscation":"sTtL8V75NPWNzsR","output_index":0,"sequence_number":6} + + ' + - ' + + ' + - 'event: response.function_call_arguments.delta + + ' + - 'data: {"type":"response.function_call_arguments.delta","delta":",","item_id":"fc_0572a70e741183f7006a7082050120819aa04c73d0ad59d867","obfuscation":"LgshIhoYB9fN39f","output_index":0,"sequence_number":7} + + ' + - ' + + ' + - 'event: response.function_call_arguments.delta + + ' + - 'data: {"type":"response.function_call_arguments.delta","delta":"13","item_id":"fc_0572a70e741183f7006a7082050120819aa04c73d0ad59d867","obfuscation":"owvGzC68Y90I1q","output_index":0,"sequence_number":8} + + ' + - ' + + ' + - 'event: response.function_call_arguments.delta + + ' + - 'data: {"type":"response.function_call_arguments.delta","delta":",","item_id":"fc_0572a70e741183f7006a7082050120819aa04c73d0ad59d867","obfuscation":"RKzlPOuMifmZx4G","output_index":0,"sequence_number":9} + + ' + - ' + + ' + - 'event: response.function_call_arguments.delta + + ' + - 'data: {"type":"response.function_call_arguments.delta","delta":"21","item_id":"fc_0572a70e741183f7006a7082050120819aa04c73d0ad59d867","obfuscation":"o8f6FTu2tRsKTK","output_index":0,"sequence_number":10} + + ' + - ' + + ' + - 'event: response.function_call_arguments.delta + + ' + - 'data: {"type":"response.function_call_arguments.delta","delta":"]}","item_id":"fc_0572a70e741183f7006a7082050120819aa04c73d0ad59d867","obfuscation":"8l6T12SkhpvmYS","output_index":0,"sequence_number":11} + + ' + - ' + + ' + - 'event: response.function_call_arguments.done + + ' + - 'data: {"type":"response.function_call_arguments.done","arguments":"{\"numbers\":[8,13,21]}","item_id":"fc_0572a70e741183f7006a7082050120819aa04c73d0ad59d867","output_index":0,"sequence_number":12} + + ' + - ' + + ' + - 'event: response.output_item.done + + ' + - 'data: {"type":"response.output_item.done","item":{"id":"fc_0572a70e741183f7006a7082050120819aa04c73d0ad59d867","type":"function_call","status":"completed","arguments":"{\"numbers\":[8,13,21]}","call_id":"call_8r5PktQD3f2ziqRcCkbpTjZP","name":"add_numbers","namespace":"mcp__agentic_fixture"},"output_index":0,"sequence_number":13} + + ' + - ' + + ' + - 'event: response.completed + + ' + - 'data: {"type":"response.completed","response":{"id":"resp_0572a70e741183f7006a7082045410819a9d83c64892da665f","object":"response","created_at":1785758212,"status":"completed","background":false,"completed_at":1785758213,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[{"id":"fc_0572a70e741183f7006a7082050120819aa04c73d0ad59d867","type":"function_call","status":"completed","arguments":"{\"numbers\":[8,13,21]}","call_id":"call_8r5PktQD3f2ziqRcCkbpTjZP","name":"add_numbers","namespace":"mcp__agentic_fixture"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_0572a70e741183f7006a708202c21c819a98c66db95ade9669","prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":{"input_tokens":326,"input_tokens_details":{"cache_write_tokens":0,"cached_tokens":0},"output_tokens":26,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":352},"user":null,"metadata":{}},"sequence_number":14} + + ' + - ' + + ' + status_code: 200 +- filename: t3 + request: + body: + input: + - call_id: call_8r5PktQD3f2ziqRcCkbpTjZP + output: '{"sum":42,"count":3}' + type: function_call_output + - content: Use the function output and return exactly TOOL_SEARCH_CODEX_OK_42. + role: user + type: message + max_output_tokens: 1024 + model: gpt-5.6 + previous_response_id: resp_0572a70e741183f7006a7082045410819a9d83c64892da665f + store: true + stream: true + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + headers: + accept: '*/*' + authorization: Bearer *** + content-type: application/json + user-agent: python-httpx/0.28.1 + method: POST + path: /v1/responses + query_params: {} + response: + headers: + content-type: text/event-stream; charset=utf-8 + sse: + - 'event: response.created + + ' + - 'data: {"type":"response.created","response":{"id":"resp_0572a70e741183f7006a70820603a0819a9966aeb91bb7881a","object":"response","created_at":1785758214,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_0572a70e741183f7006a7082045410819a9d83c64892da665f","prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} + + ' + - ' + + ' + - 'event: response.in_progress + + ' + - 'data: {"type":"response.in_progress","response":{"id":"resp_0572a70e741183f7006a70820603a0819a9966aeb91bb7881a","object":"response","created_at":1785758214,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_0572a70e741183f7006a7082045410819a9d83c64892da665f","prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} + + ' + - ' + + ' + - 'event: response.output_item.added + + ' + - 'data: {"type":"response.output_item.added","item":{"id":"msg_0572a70e741183f7006a708206a1f8819aa435c825a57781a9","type":"message","status":"in_progress","content":[],"phase":"final_answer","role":"assistant"},"output_index":0,"sequence_number":2} + + ' + - ' + + ' + - 'event: response.content_part.added + + ' + - 'data: {"type":"response.content_part.added","content_index":0,"item_id":"msg_0572a70e741183f7006a708206a1f8819aa435c825a57781a9","output_index":0,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""},"sequence_number":3} + + ' + - ' + + ' + - 'event: response.output_text.delta + + ' + - 'data: {"type":"response.output_text.delta","content_index":0,"delta":"TO","item_id":"msg_0572a70e741183f7006a708206a1f8819aa435c825a57781a9","logprobs":[],"obfuscation":"UxtGVRpKMF2MRm","output_index":0,"sequence_number":4} + + ' + - ' + + ' + - 'event: response.output_text.delta + + ' + - 'data: {"type":"response.output_text.delta","content_index":0,"delta":"OL","item_id":"msg_0572a70e741183f7006a708206a1f8819aa435c825a57781a9","logprobs":[],"obfuscation":"K2oohEK9xdXEi2","output_index":0,"sequence_number":5} + + ' + - ' + + ' + - 'event: response.output_text.delta + + ' + - 'data: {"type":"response.output_text.delta","content_index":0,"delta":"_SEARCH","item_id":"msg_0572a70e741183f7006a708206a1f8819aa435c825a57781a9","logprobs":[],"obfuscation":"iADlWZOwe","output_index":0,"sequence_number":6} + + ' + - ' + + ' + - 'event: response.output_text.delta + + ' + - 'data: {"type":"response.output_text.delta","content_index":0,"delta":"_CODE","item_id":"msg_0572a70e741183f7006a708206a1f8819aa435c825a57781a9","logprobs":[],"obfuscation":"SJhaNyMqcaa","output_index":0,"sequence_number":7} + + ' + - ' + + ' + - 'event: response.output_text.delta + + ' + - 'data: {"type":"response.output_text.delta","content_index":0,"delta":"X","item_id":"msg_0572a70e741183f7006a708206a1f8819aa435c825a57781a9","logprobs":[],"obfuscation":"0XhOSUBG44ZMRuC","output_index":0,"sequence_number":8} + + ' + - ' + + ' + - 'event: response.output_text.delta + + ' + - 'data: {"type":"response.output_text.delta","content_index":0,"delta":"_OK","item_id":"msg_0572a70e741183f7006a708206a1f8819aa435c825a57781a9","logprobs":[],"obfuscation":"BAILWMBb0PPAF","output_index":0,"sequence_number":9} + + ' + - ' + + ' + - 'event: response.output_text.delta + + ' + - 'data: {"type":"response.output_text.delta","content_index":0,"delta":"_","item_id":"msg_0572a70e741183f7006a708206a1f8819aa435c825a57781a9","logprobs":[],"obfuscation":"43sZaC48Deaak1B","output_index":0,"sequence_number":10} + + ' + - ' + + ' + - 'event: response.output_text.delta + + ' + - 'data: {"type":"response.output_text.delta","content_index":0,"delta":"42","item_id":"msg_0572a70e741183f7006a708206a1f8819aa435c825a57781a9","logprobs":[],"obfuscation":"mDO78D32tAF12Z","output_index":0,"sequence_number":11} + + ' + - ' + + ' + - 'event: response.output_text.done + + ' + - 'data: {"type":"response.output_text.done","content_index":0,"item_id":"msg_0572a70e741183f7006a708206a1f8819aa435c825a57781a9","logprobs":[],"output_index":0,"sequence_number":12,"text":"TOOL_SEARCH_CODEX_OK_42"} + + ' + - ' + + ' + - 'event: response.content_part.done + + ' + - 'data: {"type":"response.content_part.done","content_index":0,"item_id":"msg_0572a70e741183f7006a708206a1f8819aa435c825a57781a9","output_index":0,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":"TOOL_SEARCH_CODEX_OK_42"},"sequence_number":13} + + ' + - ' + + ' + - 'event: response.output_item.done + + ' + - 'data: {"type":"response.output_item.done","item":{"id":"msg_0572a70e741183f7006a708206a1f8819aa435c825a57781a9","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"TOOL_SEARCH_CODEX_OK_42"}],"phase":"final_answer","role":"assistant"},"output_index":0,"sequence_number":14} + + ' + - ' + + ' + - 'event: response.completed + + ' + - 'data: {"type":"response.completed","response":{"id":"resp_0572a70e741183f7006a70820603a0819a9966aeb91bb7881a","object":"response","created_at":1785758214,"status":"completed","background":false,"completed_at":1785758214,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[{"id":"msg_0572a70e741183f7006a708206a1f8819aa435c825a57781a9","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"TOOL_SEARCH_CODEX_OK_42"}],"phase":"final_answer","role":"assistant"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_0572a70e741183f7006a7082045410819a9d83c64892da665f","prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":{"input_tokens":396,"input_tokens_details":{"cache_write_tokens":0,"cached_tokens":0},"output_tokens":12,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":408},"user":null,"metadata":{}},"sequence_number":15} + + ' + - ' + + ' + status_code: 200 diff --git a/crates/agentic-server-core/tests/cassettes/codex/codex-openai-websocket-tool-search-gpt-5.6-streaming.yaml b/crates/agentic-server-core/tests/cassettes/codex/codex-openai-websocket-tool-search-gpt-5.6-streaming.yaml new file mode 100644 index 00000000..77cc646b --- /dev/null +++ b/crates/agentic-server-core/tests/cassettes/codex/codex-openai-websocket-tool-search-gpt-5.6-streaming.yaml @@ -0,0 +1,410 @@ +turns: +- filename: t1 + request: + body: + input: Call tool_search to load mcp__agentic_fixture.add_numbers for adding + [8, 13, 21]. Do not call add_numbers yet. + max_output_tokens: 1024 + model: gpt-5.6 + store: true + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + type: response.create + headers: + Authorization: Bearer *** + method: WEBSOCKET + path: /v1/responses + query_params: {} + transport: websocket + response: + headers: + transport: websocket + sse: + - 'data: {"type":"response.created","response":{"id":"resp_02ca6999317f3484006a708212555c81999b6e5b6832035d8a","object":"response","created_at":1785758226,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","defer_loading":true,"description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} + + ' + - 'data: {"type":"response.in_progress","response":{"id":"resp_02ca6999317f3484006a708212555c81999b6e5b6832035d8a","object":"response","created_at":1785758226,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","defer_loading":true,"description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} + + ' + - 'data: {"type":"response.output_item.added","item":{"id":"tsc_02ca6999317f3484006a70821301748199b30cf51abad5d482","type":"tool_search_call","status":"in_progress","arguments":{},"call_id":"call_9HrdtfRWlDSESjmLp3358tWC","execution":"client"},"output_index":0,"sequence_number":2} + + ' + - 'data: {"type":"response.output_item.done","item":{"id":"tsc_02ca6999317f3484006a70821301748199b30cf51abad5d482","type":"tool_search_call","status":"completed","arguments":{"goal":"Load + the project-specific function mcp__agentic_fixture.add_numbers for adding the + numbers [8, 13, 21], but do not execute it yet."},"call_id":"call_9HrdtfRWlDSESjmLp3358tWC","execution":"client"},"output_index":0,"sequence_number":3} + + ' + - 'data: {"type":"response.completed","response":{"id":"resp_02ca6999317f3484006a708212555c81999b6e5b6832035d8a","object":"response","created_at":1785758226,"status":"completed","background":false,"completed_at":1785758227,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[{"id":"tsc_02ca6999317f3484006a70821301748199b30cf51abad5d482","type":"tool_search_call","status":"completed","arguments":{"goal":"Load + the project-specific function mcp__agentic_fixture.add_numbers for adding the + numbers [8, 13, 21], but do not execute it yet."},"call_id":"call_9HrdtfRWlDSESjmLp3358tWC","execution":"client"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","defer_loading":true,"description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":{"input_tokens":80,"input_tokens_details":{"cache_write_tokens":0,"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":132},"user":null,"metadata":{}},"sequence_number":4} + + ' + - 'data: [DONE] + + ' + status_code: 101 + websocket: + - '{"type":"response.created","response":{"id":"resp_02ca6999317f3484006a708212555c81999b6e5b6832035d8a","object":"response","created_at":1785758226,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","defer_loading":true,"description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0}' + - '{"type":"response.in_progress","response":{"id":"resp_02ca6999317f3484006a708212555c81999b6e5b6832035d8a","object":"response","created_at":1785758226,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","defer_loading":true,"description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1}' + - '{"type":"response.output_item.added","item":{"id":"tsc_02ca6999317f3484006a70821301748199b30cf51abad5d482","type":"tool_search_call","status":"in_progress","arguments":{},"call_id":"call_9HrdtfRWlDSESjmLp3358tWC","execution":"client"},"output_index":0,"sequence_number":2}' + - '{"type":"response.output_item.done","item":{"id":"tsc_02ca6999317f3484006a70821301748199b30cf51abad5d482","type":"tool_search_call","status":"completed","arguments":{"goal":"Load + the project-specific function mcp__agentic_fixture.add_numbers for adding the + numbers [8, 13, 21], but do not execute it yet."},"call_id":"call_9HrdtfRWlDSESjmLp3358tWC","execution":"client"},"output_index":0,"sequence_number":3}' + - '{"type":"response.completed","response":{"id":"resp_02ca6999317f3484006a708212555c81999b6e5b6832035d8a","object":"response","created_at":1785758226,"status":"completed","background":false,"completed_at":1785758227,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[{"id":"tsc_02ca6999317f3484006a70821301748199b30cf51abad5d482","type":"tool_search_call","status":"completed","arguments":{"goal":"Load + the project-specific function mcp__agentic_fixture.add_numbers for adding the + numbers [8, 13, 21], but do not execute it yet."},"call_id":"call_9HrdtfRWlDSESjmLp3358tWC","execution":"client"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","defer_loading":true,"description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":{"input_tokens":80,"input_tokens_details":{"cache_write_tokens":0,"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":132},"user":null,"metadata":{}},"sequence_number":4}' +- filename: t2 + request: + body: + input: + - call_id: call_9HrdtfRWlDSESjmLp3358tWC + execution: client + status: completed + tools: + - description: Loaded Codex namespace fixture. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + type: tool_search_output + - content: Call the loaded mcp__agentic_fixture.add_numbers function with numbers + [8, 13, 21]. + role: user + type: message + max_output_tokens: 1024 + model: gpt-5.6 + previous_response_id: resp_02ca6999317f3484006a708212555c81999b6e5b6832035d8a + store: true + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + type: response.create + headers: + Authorization: Bearer *** + method: WEBSOCKET + path: /v1/responses + query_params: {} + transport: websocket + response: + headers: + transport: websocket + sse: + - 'data: {"type":"response.created","response":{"id":"resp_02ca6999317f3484006a7082148914819993294060ce9589d4","object":"response","created_at":1785758228,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_02ca6999317f3484006a708212555c81999b6e5b6832035d8a","prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} + + ' + - 'data: {"type":"response.in_progress","response":{"id":"resp_02ca6999317f3484006a7082148914819993294060ce9589d4","object":"response","created_at":1785758228,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_02ca6999317f3484006a708212555c81999b6e5b6832035d8a","prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} + + ' + - 'data: {"type":"response.output_item.added","item":{"id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","type":"function_call","status":"in_progress","arguments":"","call_id":"call_5C9rCuYZ46B0bA6hndZ4BsSu","name":"add_numbers","namespace":"mcp__agentic_fixture"},"output_index":0,"sequence_number":2} + + ' + - 'data: {"type":"response.function_call_arguments.delta","delta":"{\"","item_id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","obfuscation":"guyVlF4mSkFevc","output_index":0,"sequence_number":3} + + ' + - 'data: {"type":"response.function_call_arguments.delta","delta":"numbers","item_id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","obfuscation":"DnvHxyu0Z","output_index":0,"sequence_number":4} + + ' + - 'data: {"type":"response.function_call_arguments.delta","delta":"\":[","item_id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","obfuscation":"VzCiOrN3AMfcN","output_index":0,"sequence_number":5} + + ' + - 'data: {"type":"response.function_call_arguments.delta","delta":"8","item_id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","obfuscation":"utfnnKFqpijdFl1","output_index":0,"sequence_number":6} + + ' + - 'data: {"type":"response.function_call_arguments.delta","delta":",","item_id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","obfuscation":"F7s2eYLgLkoNpdf","output_index":0,"sequence_number":7} + + ' + - 'data: {"type":"response.function_call_arguments.delta","delta":"13","item_id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","obfuscation":"JsnYdrxx1ylxp5","output_index":0,"sequence_number":8} + + ' + - 'data: {"type":"response.function_call_arguments.delta","delta":",","item_id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","obfuscation":"aR1iTijx2tkG5bW","output_index":0,"sequence_number":9} + + ' + - 'data: {"type":"response.function_call_arguments.delta","delta":"21","item_id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","obfuscation":"Ojjhg6aojCo7ji","output_index":0,"sequence_number":10} + + ' + - 'data: {"type":"response.function_call_arguments.delta","delta":"]}","item_id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","obfuscation":"w2yoIe9x8NXMQJ","output_index":0,"sequence_number":11} + + ' + - 'data: {"type":"response.function_call_arguments.done","arguments":"{\"numbers\":[8,13,21]}","item_id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","output_index":0,"sequence_number":12} + + ' + - 'data: {"type":"response.output_item.done","item":{"id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","type":"function_call","status":"completed","arguments":"{\"numbers\":[8,13,21]}","call_id":"call_5C9rCuYZ46B0bA6hndZ4BsSu","name":"add_numbers","namespace":"mcp__agentic_fixture"},"output_index":0,"sequence_number":13} + + ' + - 'data: {"type":"response.completed","response":{"id":"resp_02ca6999317f3484006a7082148914819993294060ce9589d4","object":"response","created_at":1785758228,"status":"completed","background":false,"completed_at":1785758229,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[{"id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","type":"function_call","status":"completed","arguments":"{\"numbers\":[8,13,21]}","call_id":"call_5C9rCuYZ46B0bA6hndZ4BsSu","name":"add_numbers","namespace":"mcp__agentic_fixture"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_02ca6999317f3484006a708212555c81999b6e5b6832035d8a","prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":{"input_tokens":327,"input_tokens_details":{"cache_write_tokens":0,"cached_tokens":0},"output_tokens":26,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":353},"user":null,"metadata":{}},"sequence_number":14} + + ' + - 'data: [DONE] + + ' + status_code: 101 + websocket: + - '{"type":"response.created","response":{"id":"resp_02ca6999317f3484006a7082148914819993294060ce9589d4","object":"response","created_at":1785758228,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_02ca6999317f3484006a708212555c81999b6e5b6832035d8a","prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0}' + - '{"type":"response.in_progress","response":{"id":"resp_02ca6999317f3484006a7082148914819993294060ce9589d4","object":"response","created_at":1785758228,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_02ca6999317f3484006a708212555c81999b6e5b6832035d8a","prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1}' + - '{"type":"response.output_item.added","item":{"id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","type":"function_call","status":"in_progress","arguments":"","call_id":"call_5C9rCuYZ46B0bA6hndZ4BsSu","name":"add_numbers","namespace":"mcp__agentic_fixture"},"output_index":0,"sequence_number":2}' + - '{"type":"response.function_call_arguments.delta","delta":"{\"","item_id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","obfuscation":"guyVlF4mSkFevc","output_index":0,"sequence_number":3}' + - '{"type":"response.function_call_arguments.delta","delta":"numbers","item_id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","obfuscation":"DnvHxyu0Z","output_index":0,"sequence_number":4}' + - '{"type":"response.function_call_arguments.delta","delta":"\":[","item_id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","obfuscation":"VzCiOrN3AMfcN","output_index":0,"sequence_number":5}' + - '{"type":"response.function_call_arguments.delta","delta":"8","item_id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","obfuscation":"utfnnKFqpijdFl1","output_index":0,"sequence_number":6}' + - '{"type":"response.function_call_arguments.delta","delta":",","item_id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","obfuscation":"F7s2eYLgLkoNpdf","output_index":0,"sequence_number":7}' + - '{"type":"response.function_call_arguments.delta","delta":"13","item_id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","obfuscation":"JsnYdrxx1ylxp5","output_index":0,"sequence_number":8}' + - '{"type":"response.function_call_arguments.delta","delta":",","item_id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","obfuscation":"aR1iTijx2tkG5bW","output_index":0,"sequence_number":9}' + - '{"type":"response.function_call_arguments.delta","delta":"21","item_id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","obfuscation":"Ojjhg6aojCo7ji","output_index":0,"sequence_number":10}' + - '{"type":"response.function_call_arguments.delta","delta":"]}","item_id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","obfuscation":"w2yoIe9x8NXMQJ","output_index":0,"sequence_number":11}' + - '{"type":"response.function_call_arguments.done","arguments":"{\"numbers\":[8,13,21]}","item_id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","output_index":0,"sequence_number":12}' + - '{"type":"response.output_item.done","item":{"id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","type":"function_call","status":"completed","arguments":"{\"numbers\":[8,13,21]}","call_id":"call_5C9rCuYZ46B0bA6hndZ4BsSu","name":"add_numbers","namespace":"mcp__agentic_fixture"},"output_index":0,"sequence_number":13}' + - '{"type":"response.completed","response":{"id":"resp_02ca6999317f3484006a7082148914819993294060ce9589d4","object":"response","created_at":1785758228,"status":"completed","background":false,"completed_at":1785758229,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[{"id":"fc_02ca6999317f3484006a70821531c88199b5910ce7d129d7d0","type":"function_call","status":"completed","arguments":"{\"numbers\":[8,13,21]}","call_id":"call_5C9rCuYZ46B0bA6hndZ4BsSu","name":"add_numbers","namespace":"mcp__agentic_fixture"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_02ca6999317f3484006a708212555c81999b6e5b6832035d8a","prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":{"input_tokens":327,"input_tokens_details":{"cache_write_tokens":0,"cached_tokens":0},"output_tokens":26,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":353},"user":null,"metadata":{}},"sequence_number":14}' +- filename: t3 + request: + body: + input: + - call_id: call_5C9rCuYZ46B0bA6hndZ4BsSu + output: '{"sum":42,"count":3}' + type: function_call_output + - content: Use the function output and return exactly TOOL_SEARCH_CODEX_OK_42. + role: user + type: message + max_output_tokens: 1024 + model: gpt-5.6 + previous_response_id: resp_02ca6999317f3484006a7082148914819993294060ce9589d4 + store: true + tools: + - description: Find the project-specific function needed to continue the task. + execution: client + parameters: + additionalProperties: false + properties: + goal: + type: string + required: + - goal + type: object + type: tool_search + - description: Deferred Codex namespace fixture for tool-search recording. + name: mcp__agentic_fixture + tools: + - defer_loading: true + description: Add a list of numbers and return the total. + name: add_numbers + parameters: + additionalProperties: false + properties: + numbers: + items: + type: number + minItems: 1 + type: array + required: + - numbers + type: object + strict: false + type: function + type: namespace + type: response.create + headers: + Authorization: Bearer *** + method: WEBSOCKET + path: /v1/responses + query_params: {} + transport: websocket + response: + headers: + transport: websocket + sse: + - 'data: {"type":"response.created","response":{"id":"resp_02ca6999317f3484006a7082167d708199b481db804cfbcf0b","object":"response","created_at":1785758230,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_02ca6999317f3484006a7082148914819993294060ce9589d4","prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} + + ' + - 'data: {"type":"response.in_progress","response":{"id":"resp_02ca6999317f3484006a7082167d708199b481db804cfbcf0b","object":"response","created_at":1785758230,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_02ca6999317f3484006a7082148914819993294060ce9589d4","prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} + + ' + - 'data: {"type":"response.output_item.added","item":{"id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","type":"message","status":"in_progress","content":[],"phase":"final_answer","role":"assistant"},"output_index":0,"sequence_number":2} + + ' + - 'data: {"type":"response.content_part.added","content_index":0,"item_id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","output_index":0,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""},"sequence_number":3} + + ' + - 'data: {"type":"response.output_text.delta","content_index":0,"delta":"TO","item_id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","logprobs":[],"obfuscation":"clB7pST8OlAx0S","output_index":0,"sequence_number":4} + + ' + - 'data: {"type":"response.output_text.delta","content_index":0,"delta":"OL","item_id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","logprobs":[],"obfuscation":"2yO3vdKIAA4F2H","output_index":0,"sequence_number":5} + + ' + - 'data: {"type":"response.output_text.delta","content_index":0,"delta":"_SEARCH","item_id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","logprobs":[],"obfuscation":"n8UK2eYam","output_index":0,"sequence_number":6} + + ' + - 'data: {"type":"response.output_text.delta","content_index":0,"delta":"_CODE","item_id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","logprobs":[],"obfuscation":"GKelBM59TCA","output_index":0,"sequence_number":7} + + ' + - 'data: {"type":"response.output_text.delta","content_index":0,"delta":"X","item_id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","logprobs":[],"obfuscation":"Lwby8YoMPhq0Wrk","output_index":0,"sequence_number":8} + + ' + - 'data: {"type":"response.output_text.delta","content_index":0,"delta":"_OK","item_id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","logprobs":[],"obfuscation":"LgcT1buH3Ks4H","output_index":0,"sequence_number":9} + + ' + - 'data: {"type":"response.output_text.delta","content_index":0,"delta":"_","item_id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","logprobs":[],"obfuscation":"qTzyk4ZLSi8qhdk","output_index":0,"sequence_number":10} + + ' + - 'data: {"type":"response.output_text.delta","content_index":0,"delta":"42","item_id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","logprobs":[],"obfuscation":"xVUUlSkUy6cPEk","output_index":0,"sequence_number":11} + + ' + - 'data: {"type":"response.output_text.done","content_index":0,"item_id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","logprobs":[],"output_index":0,"sequence_number":12,"text":"TOOL_SEARCH_CODEX_OK_42"} + + ' + - 'data: {"type":"response.content_part.done","content_index":0,"item_id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","output_index":0,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":"TOOL_SEARCH_CODEX_OK_42"},"sequence_number":13} + + ' + - 'data: {"type":"response.output_item.done","item":{"id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"TOOL_SEARCH_CODEX_OK_42"}],"phase":"final_answer","role":"assistant"},"output_index":0,"sequence_number":14} + + ' + - 'data: {"type":"response.completed","response":{"id":"resp_02ca6999317f3484006a7082167d708199b481db804cfbcf0b","object":"response","created_at":1785758230,"status":"completed","background":false,"completed_at":1785758231,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[{"id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"TOOL_SEARCH_CODEX_OK_42"}],"phase":"final_answer","role":"assistant"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_02ca6999317f3484006a7082148914819993294060ce9589d4","prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":{"input_tokens":397,"input_tokens_details":{"cache_write_tokens":0,"cached_tokens":0},"output_tokens":12,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":409},"user":null,"metadata":{}},"sequence_number":15} + + ' + - 'data: [DONE] + + ' + status_code: 101 + websocket: + - '{"type":"response.created","response":{"id":"resp_02ca6999317f3484006a7082167d708199b481db804cfbcf0b","object":"response","created_at":1785758230,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_02ca6999317f3484006a7082148914819993294060ce9589d4","prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0}' + - '{"type":"response.in_progress","response":{"id":"resp_02ca6999317f3484006a7082167d708199b481db804cfbcf0b","object":"response","created_at":1785758230,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_02ca6999317f3484006a7082148914819993294060ce9589d4","prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1}' + - '{"type":"response.output_item.added","item":{"id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","type":"message","status":"in_progress","content":[],"phase":"final_answer","role":"assistant"},"output_index":0,"sequence_number":2}' + - '{"type":"response.content_part.added","content_index":0,"item_id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","output_index":0,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""},"sequence_number":3}' + - '{"type":"response.output_text.delta","content_index":0,"delta":"TO","item_id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","logprobs":[],"obfuscation":"clB7pST8OlAx0S","output_index":0,"sequence_number":4}' + - '{"type":"response.output_text.delta","content_index":0,"delta":"OL","item_id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","logprobs":[],"obfuscation":"2yO3vdKIAA4F2H","output_index":0,"sequence_number":5}' + - '{"type":"response.output_text.delta","content_index":0,"delta":"_SEARCH","item_id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","logprobs":[],"obfuscation":"n8UK2eYam","output_index":0,"sequence_number":6}' + - '{"type":"response.output_text.delta","content_index":0,"delta":"_CODE","item_id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","logprobs":[],"obfuscation":"GKelBM59TCA","output_index":0,"sequence_number":7}' + - '{"type":"response.output_text.delta","content_index":0,"delta":"X","item_id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","logprobs":[],"obfuscation":"Lwby8YoMPhq0Wrk","output_index":0,"sequence_number":8}' + - '{"type":"response.output_text.delta","content_index":0,"delta":"_OK","item_id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","logprobs":[],"obfuscation":"LgcT1buH3Ks4H","output_index":0,"sequence_number":9}' + - '{"type":"response.output_text.delta","content_index":0,"delta":"_","item_id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","logprobs":[],"obfuscation":"qTzyk4ZLSi8qhdk","output_index":0,"sequence_number":10}' + - '{"type":"response.output_text.delta","content_index":0,"delta":"42","item_id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","logprobs":[],"obfuscation":"xVUUlSkUy6cPEk","output_index":0,"sequence_number":11}' + - '{"type":"response.output_text.done","content_index":0,"item_id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","logprobs":[],"output_index":0,"sequence_number":12,"text":"TOOL_SEARCH_CODEX_OK_42"}' + - '{"type":"response.content_part.done","content_index":0,"item_id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","output_index":0,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":"TOOL_SEARCH_CODEX_OK_42"},"sequence_number":13}' + - '{"type":"response.output_item.done","item":{"id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"TOOL_SEARCH_CODEX_OK_42"}],"phase":"final_answer","role":"assistant"},"output_index":0,"sequence_number":14}' + - '{"type":"response.completed","response":{"id":"resp_02ca6999317f3484006a7082167d708199b481db804cfbcf0b","object":"response","created_at":1785758230,"status":"completed","background":false,"completed_at":1785758231,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[{"id":"msg_02ca6999317f3484006a70821787b481999d2f48aa5630f1af","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"TOOL_SEARCH_CODEX_OK_42"}],"phase":"final_answer","role":"assistant"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":"resp_02ca6999317f3484006a7082148914819993294060ce9589d4","prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"tool_search","description":"Find + the project-specific function needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}},{"type":"namespace","description":"Deferred + Codex namespace fixture for tool-search recording.","name":"mcp__agentic_fixture","tools":[{"type":"function","description":"Add + a list of numbers and return the total.","name":"add_numbers","output_schema":null,"parameters":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"number"},"minItems":1}},"required":["numbers"],"additionalProperties":false},"strict":false}]}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":{"input_tokens":397,"input_tokens_details":{"cache_write_tokens":0,"cached_tokens":0},"output_tokens":12,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":409},"user":null,"metadata":{}},"sequence_number":15}' diff --git a/crates/agentic-server-core/tests/cassettes/codex/tools/tool_search_namespace_tool.json b/crates/agentic-server-core/tests/cassettes/codex/tools/tool_search_namespace_tool.json new file mode 100644 index 00000000..96842d8a --- /dev/null +++ b/crates/agentic-server-core/tests/cassettes/codex/tools/tool_search_namespace_tool.json @@ -0,0 +1,45 @@ +[ + { + "type": "tool_search", + "execution": "client", + "description": "Find the project-specific function needed to continue the task.", + "parameters": { + "type": "object", + "properties": { + "goal": { + "type": "string" + } + }, + "required": ["goal"], + "additionalProperties": false + } + }, + { + "type": "namespace", + "name": "mcp__agentic_fixture", + "description": "Deferred Codex namespace fixture for tool-search recording.", + "tools": [ + { + "type": "function", + "name": "add_numbers", + "description": "Add a list of numbers and return the total.", + "parameters": { + "type": "object", + "properties": { + "numbers": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 1 + } + }, + "required": ["numbers"], + "additionalProperties": false + }, + "strict": false, + "defer_loading": true + } + ] + } +] diff --git a/crates/agentic-server-core/tests/cassettes/codex/tools/tool_search_outputs.json b/crates/agentic-server-core/tests/cassettes/codex/tools/tool_search_outputs.json new file mode 100644 index 00000000..31c6ffbf --- /dev/null +++ b/crates/agentic-server-core/tests/cassettes/codex/tools/tool_search_outputs.json @@ -0,0 +1,38 @@ +{ + "tool_search": { + "type": "tool_search_output", + "execution": "client", + "status": "completed", + "tools": [ + { + "type": "namespace", + "name": "mcp__agentic_fixture", + "description": "Loaded Codex namespace fixture.", + "tools": [ + { + "type": "function", + "name": "add_numbers", + "description": "Add a list of numbers and return the total.", + "parameters": { + "type": "object", + "properties": { + "numbers": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 1 + } + }, + "required": ["numbers"], + "additionalProperties": false + }, + "strict": false, + "defer_loading": true + } + ] + } + ] + }, + "add_numbers": "{\"sum\":42,\"count\":3}" +} diff --git a/crates/agentic-server-core/tests/cassettes/record_cassette.py b/crates/agentic-server-core/tests/cassettes/record_cassette.py index ff00d80c..46a3892b 100644 --- a/crates/agentic-server-core/tests/cassettes/record_cassette.py +++ b/crates/agentic-server-core/tests/cassettes/record_cassette.py @@ -654,7 +654,7 @@ def _inject_tools(body: dict, tools: list | None, tool_choice: Any) -> None: def _extract_tool_calls(response_data: dict | None) -> list[dict]: - """Extract client-owned function and custom tool calls from a response.""" + """Extract client-executed calls that can receive output on the next turn.""" if not response_data: return [] output = response_data.get("output", []) @@ -662,19 +662,26 @@ def _extract_tool_calls(response_data: dict | None) -> list[dict]: item for item in output if item.get("type") in {"function_call", "custom_tool_call"} + or ( + item.get("type") == "tool_search_call" + and item.get("execution") == "client" + and isinstance(item.get("call_id"), str) + and bool(item["call_id"]) + ) ] def _build_tool_output_input( tool_calls: list[dict], - tool_outputs: dict[str, str], + tool_outputs: dict[str, Any], user_prompt: str | None, ) -> list[dict]: """Build tool output items followed by an optional user message. Args: - tool_calls: function_call or custom_tool_call items from the previous response. - tool_outputs: mapping of tool name -> fake JSON output string. + tool_calls: client-executed call items from the previous response. + tool_outputs: mapping of tool name -> fake output, with ``tool_search`` mapped to a + ``tool_search_output`` object for client-executed search. user_prompt: the next user message (None for tool-output-only turns). Returns: @@ -683,6 +690,18 @@ def _build_tool_output_input( input_items: list[dict] = [] for call in tool_calls: call_id = call.get("call_id", "") + if call.get("type") == "tool_search_call": + configured = tool_outputs.get("tool_search") + if not isinstance(configured, dict): + raise ValueError("tool_outputs.tool_search must be a tool_search_output object") + output_item = dict(configured) + output_item["type"] = "tool_search_output" + output_item["call_id"] = call_id + output_item.setdefault("execution", "client") + output_item.setdefault("status", "completed") + input_items.append(output_item) + continue + name = call.get("name", "") output = tool_outputs.get( name, json.dumps({"result": f"mock output for {name}"}) @@ -856,7 +875,7 @@ def run_messages( proxy_url: str, tools: list | None, tool_choice: Any, - tool_outputs: dict[str, str] | None, + tool_outputs: dict[str, Any] | None, max_tokens: int, ) -> None: """Record Anthropic Messages turns. @@ -926,7 +945,7 @@ def run_responses( output_file: Path | None = None, tools: list | None = None, tool_choice: Any = None, - tool_outputs: dict[str, str] | None = None, + tool_outputs: dict[str, Any] | None = None, max_output_tokens: int | None = None, preset_input: str | list | None = None, ) -> None: @@ -960,7 +979,7 @@ def run_responses( else: prompt = _prompt(f"Turn {turn}/{turns} — enter prompt: ") - # Inject matching function/custom output items before the user message. + # Inject output items for matching client-executed calls before the user message. pending_calls = _extract_tool_calls(last_response) if tool_outputs else [] if pending_calls and tool_outputs: input_value = _build_tool_output_input( @@ -1142,9 +1161,8 @@ def run_responses( metavar="FILE", default=None, type=click.Path(exists=True), - help="Path to a JSON file mapping tool names to fake output strings. " - "When provided, matching function_call_output or custom_tool_call_output items are injected " - "between turns (required for OpenAI Responses API).", + help="Path to a JSON file mapping call keys to fake outputs. Function and custom values are strings; " + "the tool_search value is a tool_search_output object. Matching output items are injected between turns.", ) @click.option( "--input-file", @@ -1224,12 +1242,12 @@ def main( else: tool_choice = stripped - tool_outputs: dict[str, str] | None = None + tool_outputs: dict[str, Any] | None = None if tool_outputs_file: with open(tool_outputs_file, encoding="utf-8") as f: tool_outputs = json.load(f) if not isinstance(tool_outputs, dict): - raise click.UsageError("--tool-outputs file must contain a JSON object (name -> output string).") + raise click.UsageError("--tool-outputs file must contain a JSON object (call key -> output).") click.echo(f"Tool outputs: {list(tool_outputs.keys())}") if gateway_url: diff --git a/crates/agentic-server-core/tests/cassettes/record_codex_cli_tool_call_cassettes.sh b/crates/agentic-server-core/tests/cassettes/record_codex_cli_tool_call_cassettes.sh index e7b998eb..c3fd1952 100755 --- a/crates/agentic-server-core/tests/cassettes/record_codex_cli_tool_call_cassettes.sh +++ b/crates/agentic-server-core/tests/cassettes/record_codex_cli_tool_call_cassettes.sh @@ -6,11 +6,11 @@ set -euo pipefail # Records YAML replay cassettes for Codex CLI-shaped tool calls. # # Default matrix: -# - gateway HTTP/SSE: function + Codex namespace + custom tools -# - gateway WebSocket: function + Codex namespace + custom tools +# - gateway HTTP: function + Codex namespace + custom + client tool search +# - gateway WebSocket: function + Codex namespace + custom + client tool search # - direct vLLM HTTP/SSE: function + flattened namespace function + custom tool -# - direct OpenAI HTTPS/SSE: function + Codex namespace + custom tools -# - direct OpenAI WebSocket: function + Codex namespace + custom tools +# - direct OpenAI HTTPS: function + Codex namespace + custom + client tool search +# - direct OpenAI WebSocket: function + Codex namespace + custom + client tool search # # Direct vLLM expects the flattened function shape. Set VLLM_URL or V_API_BASE # explicitly before recording direct vLLM cassettes. @@ -33,8 +33,9 @@ GATEWAY_CASSETTE_MODEL="${GATEWAY_CASSETTE_MODEL:-$V_MODEL}" OPENAI_URL="${OPENAI_URL:-https://api.openai.com}" OPENAI_MODEL="${OPENAI_MODEL:-gpt-4o}" OPENAI_CUSTOM_MODEL="${OPENAI_CUSTOM_MODEL:-gpt-5.6}" +OPENAI_TOOL_SEARCH_MODEL="${OPENAI_TOOL_SEARCH_MODEL:-gpt-5.6}" -TOOL_TURNS="${TOOL_TURNS:-2}" +LEGACY_TOOL_TURNS="${TOOL_TURNS:-2}" PROXY_PORT_BASE="${PROXY_PORT_BASE:-7070}" TARGET="${1:-all}" @@ -43,6 +44,8 @@ NAMESPACE_TOOL="${TOOLS_DIR}/namespace_tool.json" CUSTOM_TOOL="${TOOLS_DIR}/custom_tool.json" DIRECT_VLLM_FLAT_NAMESPACE_TOOL="${TOOLS_DIR}/direct_vllm_flat_namespace_tool.json" TOOL_OUTPUTS="${TOOLS_DIR}/tool_outputs.json" +TOOL_SEARCH_NAMESPACE_TOOL="${TOOLS_DIR}/tool_search_namespace_tool.json" +TOOL_SEARCH_OUTPUTS="${TOOLS_DIR}/tool_search_outputs.json" model_slug() { printf '%s\n' "$1" | tr '/: ' '---' @@ -52,6 +55,7 @@ GATEWAY_MODEL_SLUG="$(model_slug "$GATEWAY_CASSETTE_MODEL")" V_MODEL_SLUG="$(model_slug "$V_MODEL")" OPENAI_MODEL_SLUG="$(model_slug "$OPENAI_MODEL")" OPENAI_CUSTOM_MODEL_SLUG="$(model_slug "$OPENAI_CUSTOM_MODEL")" +OPENAI_TOOL_SEARCH_MODEL_SLUG="$(model_slug "$OPENAI_TOOL_SEARCH_MODEL")" next_proxy_port="$PROXY_PORT_BASE" @@ -61,9 +65,20 @@ Usage: $(basename "$0") [target] Targets: all all cassettes used by Codex cassette tests - gateway gateway-http + gateway-ws - gateway-http gateway HTTP/SSE function + namespace + custom - gateway-ws gateway WebSocket function + namespace + custom + gateway gateway-http + gateway-ws, including client tool search + gateway-http gateway HTTP function + namespace + custom + client tool search + gateway-ws gateway WebSocket function + namespace + custom + client tool search + tool-search all gateway + OpenAI client tool-search continuations + gateway-tool-search gateway HTTP streaming/non-streaming + WebSocket tool search + gateway-http-tool-search + gateway HTTP streaming + non-streaming tool search + gateway-ws-tool-search + gateway WebSocket client tool-search continuation flow + openai-tool-search OpenAI HTTPS streaming/non-streaming + WebSocket tool search + openai-https-tool-search + OpenAI HTTPS streaming + non-streaming tool search + openai-ws-tool-search + OpenAI WebSocket client tool-search continuation flow gateway-custom gateway HTTP/SSE + WebSocket custom only gateway-http-custom gateway HTTP/SSE custom only gateway-ws-custom gateway WebSocket custom only @@ -72,8 +87,8 @@ Targets: direct-vllm-custom direct vLLM HTTP/SSE custom only direct-vllm-ws direct vLLM WebSocket function + flattened namespace openai same as openai-https - openai-https direct OpenAI HTTPS/SSE function + custom - openai-ws direct OpenAI WebSocket function + custom + openai-https direct OpenAI HTTPS function + custom + client tool search + openai-ws direct OpenAI WebSocket function + custom + client tool search openai-custom direct OpenAI HTTPS/SSE + WebSocket custom only openai-https-custom direct OpenAI HTTPS/SSE custom only openai-ws-custom direct OpenAI WebSocket custom only @@ -91,8 +106,9 @@ Environment: OPENAI_URL OpenAI base URL, default: ${OPENAI_URL} OPENAI_MODEL OpenAI model, default: ${OPENAI_MODEL} OPENAI_CUSTOM_MODEL OpenAI custom-tool model, default: ${OPENAI_CUSTOM_MODEL} + OPENAI_TOOL_SEARCH_MODEL OpenAI tool-search model, default: ${OPENAI_TOOL_SEARCH_MODEL} OPENAI_API_KEY required for openai* targets - TOOL_TURNS 1 or 2, default: ${TOOL_TURNS} + TOOL_TURNS 1 or 2 for legacy scenarios, default: ${LEGACY_TOOL_TURNS}; tool search is always 3 PROXY_PORT_BASE first embedded recorder proxy port, default: ${PROXY_PORT_BASE} USAGE } @@ -127,18 +143,23 @@ alloc_proxy_port() { } emit_prompts() { - local first_prompt="$1" - local second_prompt="$2" + local turns="$1" + local first_prompt="$2" + local second_prompt="$3" + local third_prompt="${4:-}" - case "$TOOL_TURNS" in + case "$turns" in 1) printf '%s\n' "$first_prompt" ;; 2) printf '%s\n' "$first_prompt" "$second_prompt" ;; + 3) + printf '%s\n' "$first_prompt" "$second_prompt" "$third_prompt" + ;; *) - echo "error: TOOL_TURNS must be 1 or 2, got ${TOOL_TURNS}" >&2 + echo "error: recording turn count must be 1, 2, or 3, got ${turns}" >&2 exit 2 ;; esac @@ -154,10 +175,31 @@ run_recording() { local tools_file="$7" local first_prompt="$8" local second_prompt="$9" + local third_prompt="${10:-}" + local tool_outputs_file="${11:-$TOOL_OUTPUTS}" + local turns="${12:-}" + local stream_flag="${13:---stream}" + local max_output_tokens="${14:-1024}" + + if [[ -z "$turns" ]]; then + case "$LEGACY_TOOL_TURNS" in + 1 | 2) + turns="$LEGACY_TOOL_TURNS" + ;; + *) + echo "error: TOOL_TURNS must be 1 or 2 for legacy scenarios, got ${LEGACY_TOOL_TURNS}" >&2 + exit 2 + ;; + esac + fi + if [[ "$stream_flag" != "--stream" && "$stream_flag" != "--no-stream" ]]; then + echo "error: recording stream flag must be --stream or --no-stream, got ${stream_flag}" >&2 + exit 2 + fi require_file "$RECORDER" require_file "$tools_file" - require_file "$TOOL_OUTPUTS" + require_file "$tool_outputs_file" mkdir -p "$OUT" local output_path="${OUT%/}/${output_name}" @@ -171,20 +213,48 @@ run_recording() { echo " model: ${model}" echo " wire: ${transport}" - emit_prompts "$first_prompt" "$second_prompt" | + emit_prompts "$turns" "$first_prompt" "$second_prompt" "$third_prompt" | "$PYTHON" "$RECORDER" \ - --turns "$TOOL_TURNS" \ + --turns "$turns" \ --mode responses \ --transport "$transport" \ - --stream \ + "$stream_flag" \ --proxy-port "$proxy_port" \ "$backend_flag" "$backend_url" \ --model "$model" \ --tools "$tools_file" \ - --tool-outputs "$TOOL_OUTPUTS" \ + --tool-outputs "$tool_outputs_file" \ + --max-output-tokens "$max_output_tokens" \ --output "$output_path" } +run_tool_search_recording() { + local label="$1" + local output_name="$2" + local transport="$3" + local backend_flag="$4" + local backend_url="$5" + local model="$6" + local stream_flag="$7" + local max_output_tokens="${8:-1024}" + + run_recording \ + "$label" \ + "$output_name" \ + "$transport" \ + "$backend_flag" \ + "$backend_url" \ + "$model" \ + "$TOOL_SEARCH_NAMESPACE_TOOL" \ + 'Call tool_search to load mcp__agentic_fixture.add_numbers for adding [8, 13, 21]. Do not call add_numbers yet.' \ + 'Call the loaded mcp__agentic_fixture.add_numbers function with numbers [8, 13, 21].' \ + 'Use the function output and return exactly TOOL_SEARCH_CODEX_OK_42.' \ + "$TOOL_SEARCH_OUTPUTS" \ + 3 \ + "$stream_flag" \ + "$max_output_tokens" +} + record_gateway_http_custom() { run_recording \ "gateway HTTP/SSE custom tool" \ @@ -222,6 +292,30 @@ record_gateway_http() { 'Use the tool output. Return only the sum.' record_gateway_http_custom + record_gateway_http_tool_search +} + +record_gateway_http_tool_search() { + # Multi-turn Qwen reasoning can exhaust the recorder's general 1024-token default. + run_tool_search_recording \ + "gateway HTTP/SSE client tool search" \ + "codex-gateway-http-tool-search-${GATEWAY_MODEL_SLUG}-streaming.yaml" \ + "http" \ + "--vllm" \ + "$GATEWAY_URL" \ + "$GATEWAY_MODEL" \ + "--stream" \ + 4096 + + run_tool_search_recording \ + "gateway HTTP client tool search" \ + "codex-gateway-http-tool-search-${GATEWAY_MODEL_SLUG}-nonstreaming.yaml" \ + "http" \ + "--vllm" \ + "$GATEWAY_URL" \ + "$GATEWAY_MODEL" \ + "--no-stream" \ + 4096 } record_gateway_ws_custom() { @@ -261,6 +355,24 @@ record_gateway_ws() { 'Use the tool output. Return only the sum.' record_gateway_ws_custom + record_gateway_ws_tool_search +} + +record_gateway_ws_tool_search() { + run_tool_search_recording \ + "gateway WebSocket client tool search" \ + "codex-gateway-websocket-tool-search-${GATEWAY_MODEL_SLUG}-streaming.yaml" \ + "websocket" \ + "--vllm" \ + "$GATEWAY_URL" \ + "$GATEWAY_MODEL" \ + "--stream" \ + 4096 +} + +record_gateway_tool_search() { + record_gateway_http_tool_search + record_gateway_ws_tool_search } record_direct_vllm_http_custom() { @@ -347,6 +459,29 @@ record_openai_https() { 'Use the tool output. Return only the echo string.' record_openai_https_custom + record_openai_https_tool_search +} + +record_openai_https_tool_search() { + require_openai_key + + run_tool_search_recording \ + "direct OpenAI HTTPS/SSE client tool search" \ + "codex-openai-https-tool-search-${OPENAI_TOOL_SEARCH_MODEL_SLUG}-streaming.yaml" \ + "http" \ + "--openai" \ + "$OPENAI_URL" \ + "$OPENAI_TOOL_SEARCH_MODEL" \ + "--stream" + + run_tool_search_recording \ + "direct OpenAI HTTPS client tool search" \ + "codex-openai-https-tool-search-${OPENAI_TOOL_SEARCH_MODEL_SLUG}-nonstreaming.yaml" \ + "http" \ + "--openai" \ + "$OPENAI_URL" \ + "$OPENAI_TOOL_SEARCH_MODEL" \ + "--no-stream" } record_openai_https_custom() { @@ -379,6 +514,25 @@ record_openai_ws() { 'Use the tool output. Return only the echo string.' record_openai_ws_custom + record_openai_ws_tool_search +} + +record_openai_ws_tool_search() { + require_openai_key + + run_tool_search_recording \ + "direct OpenAI WebSocket client tool search" \ + "codex-openai-websocket-tool-search-${OPENAI_TOOL_SEARCH_MODEL_SLUG}-streaming.yaml" \ + "websocket" \ + "--openai" \ + "$OPENAI_URL" \ + "$OPENAI_TOOL_SEARCH_MODEL" \ + "--stream" +} + +record_openai_tool_search() { + record_openai_https_tool_search + record_openai_ws_tool_search } record_openai_ws_custom() { @@ -451,6 +605,20 @@ case "$TARGET" in gateway-ws) record_gateway_ws ;; + tool-search) + require_openai_key + record_gateway_tool_search + record_openai_tool_search + ;; + gateway-tool-search) + record_gateway_tool_search + ;; + gateway-http-tool-search) + record_gateway_http_tool_search + ;; + gateway-ws-tool-search) + record_gateway_ws_tool_search + ;; gateway-custom) record_gateway_http_custom record_gateway_ws_custom @@ -476,6 +644,15 @@ case "$TARGET" in openai-ws) record_openai_ws ;; + openai-tool-search) + record_openai_tool_search + ;; + openai-https-tool-search) + record_openai_https_tool_search + ;; + openai-ws-tool-search) + record_openai_ws_tool_search + ;; openai-custom) record_openai_https_custom record_openai_ws_custom diff --git a/crates/agentic-server-core/tests/cassettes/record_tool_search_cassettes.sh b/crates/agentic-server-core/tests/cassettes/record_tool_search_cassettes.sh deleted file mode 100755 index 79680456..00000000 --- a/crates/agentic-server-core/tests/cassettes/record_tool_search_cassettes.sh +++ /dev/null @@ -1,259 +0,0 @@ -#!/usr/bin/env bash -# Records the same client-executed tool-search scenario against OpenAI and the gateway -# over HTTP and Responses WebSocket mode. -# -# Usage from the repository root: -# OPENAI_API_KEY=sk-... \ -# bash crates/agentic-server-core/tests/cassettes/record_tool_search_cassettes.sh -# TOOL_SEARCH_RECORD_SET=gateway GATEWAY_URL=http://127.0.0.1:3018 \ -# bash crates/agentic-server-core/tests/cassettes/record_tool_search_cassettes.sh -# TOOL_SEARCH_TRANSPORT_SET=websocket TOOL_SEARCH_RECORD_SET=all OPENAI_API_KEY=sk-... \ -# GATEWAY_URL=http://127.0.0.1:3018 \ -# bash crates/agentic-server-core/tests/cassettes/record_tool_search_cassettes.sh - -set -euo pipefail - -SCRIPTS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -BASE_DIR="$SCRIPTS_DIR/tool_search" -TOOLS_FILE="$BASE_DIR/tools.json" -GATEWAY_URL="${GATEWAY_URL:-http://localhost:9000}" -MODEL="${MODEL:-Qwen/Qwen3.6-35B-A3B}" -MODEL_SLUG="$(echo "$MODEL" | tr '/: ' '---')" -OPENAI_MODEL="${OPENAI_MODEL:-gpt-5.6}" -OPENAI_MODEL_SLUG="$(echo "$OPENAI_MODEL" | tr '/: ' '---')" -TOOL_SEARCH_RECORD_SET="${TOOL_SEARCH_RECORD_SET:-all}" -TOOL_SEARCH_TRANSPORT_SET="${TOOL_SEARCH_TRANSPORT_SET:-all}" -PROMPT='Call tool_search now to find the shipping ETA tool for order_42. Do not call get_shipping_eta yet and do not answer without calling tool_search.' - -validate_recording() { - local file="$1" - local stream_flag="$2" - local transport="$3" - - python - "$file" "$stream_flag" "$transport" <<'PY' -import json -import sys -from pathlib import Path - -import yaml - -path = Path(sys.argv[1]) -streaming = sys.argv[2] == "--stream" -transport = sys.argv[3] -document = yaml.safe_load(path.read_text(encoding="utf-8")) or {} -turns = document.get("turns") or [] -if len(turns) != 1: - raise SystemExit(f"ERROR: expected one recorded turn in {path}, found {len(turns)}") - -turn = turns[0] -request = (turn.get("request") or {}).get("body") or {} -tools = request.get("tools") or [] -search_tools = [tool for tool in tools if tool.get("type") == "tool_search"] -if len(search_tools) != 1 or search_tools[0].get("execution") != "client": - raise SystemExit("ERROR: cassette request must contain one client-executed tool_search declaration") -deferred = [tool for tool in tools if tool.get("name") == "get_shipping_eta"] -if ( - len(deferred) != 1 - or deferred[0].get("defer_loading") is not True - or deferred[0].get("strict") is not False -): - raise SystemExit("ERROR: cassette request must contain deferred get_shipping_eta with strict false") - -response = turn.get("response") or {} -if transport == "websocket": - if (turn.get("request") or {}).get("transport") != "websocket": - raise SystemExit("ERROR: WebSocket cassette request must identify the websocket transport") - if (turn.get("request") or {}).get("method") != "WEBSOCKET": - raise SystemExit("ERROR: WebSocket cassette request must use the WEBSOCKET method") - if request.get("type") != "response.create" or "stream" in request: - raise SystemExit("ERROR: WebSocket request must be response.create without the HTTP stream field") - if response.get("status_code") != 101: - raise SystemExit(f"ERROR: WebSocket recording did not upgrade: {response.get('status_code')}") -elif response.get("status_code") != 200: - raise SystemExit(f"ERROR: recording returned HTTP {response.get('status_code')}: {response.get('body')}") - -if streaming: - if transport == "websocket": - raw_events = response.get("websocket") or [] - if not raw_events: - raise SystemExit("ERROR: WebSocket recording must contain response.websocket messages") - else: - raw_events = [] - for raw in response.get("sse") or []: - raw_events.extend( - line.removeprefix("data: ") - for line in raw.splitlines() - if line.startswith("data: ") and line != "data: [DONE]" - ) - - events = [] - for raw in raw_events: - try: - events.append(json.loads(raw)) - except json.JSONDecodeError: - continue - errors = [event.get("error") for event in events if event.get("type") == "error"] - if errors: - raise SystemExit(f"ERROR: streaming recording returned an error event: {errors[0]}") - for event_type in ("response.created", "response.in_progress", "response.completed"): - lifecycle = [event.get("response") for event in events if event.get("type") == event_type] - if len(lifecycle) != 1: - raise SystemExit(f"ERROR: expected one {event_type} event, found {len(lifecycle)}") - lifecycle_tools = (lifecycle[0] or {}).get("tools") or [] - lifecycle_search = [tool for tool in lifecycle_tools if tool.get("type") == "tool_search"] - lifecycle_deferred = [tool for tool in lifecycle_tools if tool.get("name") == "get_shipping_eta"] - if len(lifecycle_search) != 1 or lifecycle_search[0].get("execution") != "client": - raise SystemExit(f"ERROR: {event_type} must expose native client tool_search") - if len(lifecycle_deferred) != 1 or lifecycle_deferred[0].get("defer_loading") is not True: - raise SystemExit(f"ERROR: {event_type} must preserve deferred get_shipping_eta") - if lifecycle_deferred[0].get("strict") is not False: - raise SystemExit(f"ERROR: {event_type} must preserve strict false on get_shipping_eta") - added = [ - (position, event.get("item") or {}) - for position, event in enumerate(events) - if event.get("type") == "response.output_item.added" - and (event.get("item") or {}).get("type") == "tool_search_call" - ] - done = [ - (position, event.get("item") or {}) - for position, event in enumerate(events) - if event.get("type") == "response.output_item.done" - and (event.get("item") or {}).get("type") == "tool_search_call" - ] - completed_positions = [ - position for position, event in enumerate(events) if event.get("type") == "response.completed" - ] - if len(added) != 1 or len(done) != 1 or len(completed_positions) != 1: - raise SystemExit("ERROR: expected one added, done, and completed tool-search lifecycle") - if not added[0][0] < done[0][0] < completed_positions[0]: - raise SystemExit("ERROR: tool-search lifecycle must be added, done, then response.completed") - added_call_id = added[0][1].get("call_id") - if not isinstance(added_call_id, str) or not added_call_id or done[0][1].get("call_id") != added_call_id: - raise SystemExit("ERROR: tool_search_call must preserve a nonempty call_id from added through done") - if added[0][1].get("status") != "in_progress" or done[0][1].get("status") != "completed": - raise SystemExit("ERROR: tool_search_call must transition from in_progress to completed") - completed = [event.get("response") for event in events if event.get("type") == "response.completed"] - body = completed[-1] if completed else None -else: - body = response.get("body") - -if not isinstance(body, dict) or body.get("status") != "completed": - raise SystemExit(f"ERROR: recording did not complete: {body}") -output = body.get("output") or [] -if any(item.get("type") == "function_call" and item.get("name") == "tool_search" for item in output): - raise SystemExit("ERROR: provider function fallback leaked instead of canonical tool_search_call") -if streaming and any( - event.get("item", {}).get("type") == "function_call" - and event.get("item", {}).get("name") == "tool_search" - for event in events -): - raise SystemExit("ERROR: provider function fallback leaked in a streaming event") -calls = [item for item in output if item.get("type") == "tool_search_call"] -if len(calls) != 1: - raise SystemExit(f"ERROR: expected one tool_search_call, found {len(calls)}") -call = calls[0] -if call.get("execution") != "client" or call.get("status") != "completed": - raise SystemExit(f"ERROR: tool_search_call is not a completed client call: {call}") -if not isinstance(call.get("call_id"), str) or not call["call_id"]: - raise SystemExit("ERROR: client tool_search_call must have a nonempty call_id") -if streaming and call["call_id"] != added_call_id: - raise SystemExit( - "ERROR: tool_search_call must preserve the same call_id in added, done, and response.completed output" - ) -PY -} - -record_single_turn() { - local endpoint_flag="$1" - local endpoint="$2" - local model="$3" - local output="$4" - local stream_flag="$5" - local transport="$6" - local temporary_output - - temporary_output="$(mktemp "$BASE_DIR/.tool-search-cassette.XXXXXX")" - if ! printf '%s\n' "$PROMPT" \ - | python "$SCRIPTS_DIR/record_cassette.py" \ - --mode responses \ - --turns 1 \ - --transport "$transport" \ - "$stream_flag" \ - "$endpoint_flag" "$endpoint" \ - --model "$model" \ - --tools "$TOOLS_FILE" \ - --tool-choice required \ - --max-output-tokens 1024 \ - --output "$temporary_output" - then - rm -f -- "$temporary_output" - return 1 - fi - - if ! validate_recording "$temporary_output" "$stream_flag" "$transport"; then - rm -f -- "$temporary_output" - return 1 - fi - mv -- "$temporary_output" "$output" - printf 'Recorded %s\n' "$output" -} - -record_provider_suite() { - local endpoint_flag="$1" - local endpoint="$2" - local model="$3" - local output_prefix="$4" - - if [[ "$TOOL_SEARCH_TRANSPORT_SET" == "http" || "$TOOL_SEARCH_TRANSPORT_SET" == "all" ]]; then - record_single_turn \ - "$endpoint_flag" "$endpoint" "$model" "$BASE_DIR/${output_prefix}-streaming.yaml" --stream http - record_single_turn \ - "$endpoint_flag" "$endpoint" "$model" "$BASE_DIR/${output_prefix}-nonstreaming.yaml" --no-stream http - fi - if [[ "$TOOL_SEARCH_TRANSPORT_SET" == "websocket" || "$TOOL_SEARCH_TRANSPORT_SET" == "all" ]]; then - record_single_turn \ - "$endpoint_flag" "$endpoint" "$model" "$BASE_DIR/${output_prefix}-websocket-streaming.yaml" --stream websocket - fi -} - -case "$TOOL_SEARCH_RECORD_SET" in - gateway|openai|all) ;; - *) - echo "ERROR: TOOL_SEARCH_RECORD_SET must be gateway, openai, or all" >&2 - exit 1 - ;; -esac - -case "$TOOL_SEARCH_TRANSPORT_SET" in - http|websocket|all) ;; - *) - echo "ERROR: TOOL_SEARCH_TRANSPORT_SET must be http, websocket, or all" >&2 - exit 1 - ;; -esac - -if [[ ! -f "$TOOLS_FILE" ]]; then - echo "ERROR: tool-search tools file does not exist: $TOOLS_FILE" >&2 - exit 1 -fi - -if [[ "$TOOL_SEARCH_RECORD_SET" == "openai" || "$TOOL_SEARCH_RECORD_SET" == "all" ]]; then - if [[ -z "${OPENAI_API_KEY:-}" ]]; then - echo "ERROR: OPENAI_API_KEY must be set for TOOL_SEARCH_RECORD_SET=$TOOL_SEARCH_RECORD_SET" >&2 - exit 1 - fi -fi - -mkdir -p "$BASE_DIR" - -if [[ "$TOOL_SEARCH_RECORD_SET" == "openai" || "$TOOL_SEARCH_RECORD_SET" == "all" ]]; then - record_provider_suite \ - --openai https://api.openai.com "$OPENAI_MODEL" \ - "tool-search-openai-reference-${OPENAI_MODEL_SLUG}" -fi - -if [[ "$TOOL_SEARCH_RECORD_SET" == "gateway" || "$TOOL_SEARCH_RECORD_SET" == "all" ]]; then - record_provider_suite \ - --gateway "$GATEWAY_URL" "$MODEL" \ - "tool-search-gateway-${MODEL_SLUG}" -fi diff --git a/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-nonstreaming.yaml b/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-nonstreaming.yaml deleted file mode 100644 index dfb861bb..00000000 --- a/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-nonstreaming.yaml +++ /dev/null @@ -1,112 +0,0 @@ -turns: -- filename: t1 - request: - body: - input: Call tool_search now to find the shipping ETA tool for order_42. Do not - call get_shipping_eta yet and do not answer without calling tool_search. - max_output_tokens: 1024 - model: Qwen/Qwen3.6-35B-A3B - store: true - stream: false - tool_choice: required - tools: - - description: Find the project-specific tools needed to continue the task. - execution: client - parameters: - additionalProperties: false - properties: - goal: - type: string - required: - - goal - type: object - type: tool_search - - defer_loading: true - description: Look up shipping ETA details for an order. - name: get_shipping_eta - parameters: - additionalProperties: false - properties: - order_id: - type: string - required: - - order_id - type: object - strict: false - type: function - headers: - accept: '*/*' - content-type: application/json - user-agent: python-httpx/0.28.1 - method: POST - path: /v1/responses - query_params: {} - response: - body: - conversation_id: null - created_at: 1785747790 - error: null - id: resp_019fc6dc-ce06-7692-9920-973930767b0a - incomplete_details: null - instructions: null - model: Qwen/Qwen3.6-35B-A3B - object: response - output: - - content: - - text: "The user wants me to call `tool_search` with the goal of finding\ - \ the shipping ETA tool for order_42.\nThey explicitly instructed me to\ - \ call `tool_search` now, not to call `get_shipping_eta` yet, and to answer\ - \ without calling `tool_search`.\nI will call `tool_search` with the goal\ - \ \"find the shipping ETA tool for order_42\".\nThen I will wait for the\ - \ response or provide the final answer based on the tool's response, but\ - \ the instruction says \"Do not call get_shipping_eta yet and do not answer\ - \ without calling tool_search.\" So I just need to make the tool call.\n\ - Parameters for tool_search:\ngoal: \"find the shipping ETA tool for order_42\"\ - \nLet's make the call. \nWait, the prompt says \"Call tool_search now\ - \ to find the shipping ETA tool for order_42.\"\nI will use the `tool_search`\ - \ tool.\nGoal: \"find the shipping ETA tool for order_42\"\nProceed. \n\ - Calling tool_search. \nThen I will output the result. \nWait, the instruction\ - \ says \"do not answer without calling tool_search\", which just means\ - \ I must call it first.\nI will generate the tool call now. \n`tool_search`\ - \ expects a string `goal`.\nLet's do it. \n`tool_search(goal=\"find the\ - \ shipping ETA tool for order_42\")`\nDone. \nWait, I should check the\ - \ exact wording. \"find the shipping ETA tool for order_42\" matches the\ - \ user request.\nProceeding. \n[Tool Call]\n`tool_search` with `goal:\ - \ \"find the shipping ETA tool for order_42\"`\nI will produce the tool\ - \ call. \n(Self-Correction/Verification during thought)\nIs there any\ - \ specific format needed? No, just standard tool calling.\nI'll proceed.\ - \ \nActually, the user said \"Call tool_search now to find the shipping\ - \ ETA tool for order_42.\"\nI will call `tool_search` with the exact goal.\n\ - Done. \nOutput matches. \nProceeding. \n[Tool Call Generation]\n`tool_search(goal=\"\ - find the shipping ETA tool for order_42\")`\n[Response Generation]\nI\ - \ will call the tool now. \n(Wait, I need to output the tool call in the\ - \ proper format)\nDone. \nProceeds. \n*Self-Correction/Note during generation*:\ - \ The prompt says \"Call tool_search now to find the shipping ETA tool\ - \ for order_42.\" I will just pass that string as the goal.\nReady. \n\ - Outputting tool call. \n`tool_search(goal=\"find the shipping ETA tool\ - \ for order_42\")`\nDone. \n[Proceeds]\n" - type: reasoning_text - encrypted_content: null - id: rs_019fc6dc-dac8-7eb0-9c66-9156fc668985 - status: null - summary: [] - type: reasoning - - arguments: - goal: find the shipping ETA tool for order_42 - call_id: chatcmpl-tool-a5590dca938d05db - execution: client - status: completed - type: tool_search_call - previous_response_id: null - status: completed - usage: - input_tokens: 390 - input_tokens_details: - cached_tokens: 0 - output_tokens: 612 - output_tokens_details: - reasoning_tokens: 536 - total_tokens: 1002 - headers: - content-type: application/json - status_code: 200 diff --git a/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-streaming.yaml b/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-streaming.yaml deleted file mode 100644 index 20e72436..00000000 --- a/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-streaming.yaml +++ /dev/null @@ -1,1387 +0,0 @@ -turns: -- filename: t1 - request: - body: - input: Call tool_search now to find the shipping ETA tool for order_42. Do not - call get_shipping_eta yet and do not answer without calling tool_search. - max_output_tokens: 1024 - model: Qwen/Qwen3.6-35B-A3B - store: true - stream: true - tool_choice: required - tools: - - description: Find the project-specific tools needed to continue the task. - execution: client - parameters: - additionalProperties: false - properties: - goal: - type: string - required: - - goal - type: object - type: tool_search - - defer_loading: true - description: Look up shipping ETA details for an order. - name: get_shipping_eta - parameters: - additionalProperties: false - properties: - order_id: - type: string - required: - - order_id - type: object - strict: false - type: function - headers: - accept: '*/*' - content-type: application/json - user-agent: python-httpx/0.28.1 - method: POST - path: /v1/responses - query_params: {} - response: - headers: - content-type: text/event-stream; charset=utf-8 - sse: - - 'data: {"type":"response.created","sequence_number":0,"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785748980,"error":null,"frequency_penalty":0.0,"id":"resp_019fc6ef-0379-72c3-8d97-7cd685cc7265","incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tools":[{"description":"Find - the project-specific tools needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"defer_loading":true,"description":"Look - up shipping ETA details for an order.","name":"get_shipping_eta","parameters":{"additionalProperties":false,"properties":{"order_id":{"type":"string"}},"required":["order_id"],"type":"object"},"strict":false,"type":"function"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null}} - - ' - - ' - - ' - - 'data: {"type":"response.in_progress","sequence_number":1,"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785748980,"error":null,"frequency_penalty":0.0,"id":"resp_019fc6ef-0379-72c3-8d97-7cd685cc7265","incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tools":[{"description":"Find - the project-specific tools needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"defer_loading":true,"description":"Look - up shipping ETA details for an order.","name":"get_shipping_eta","parameters":{"additionalProperties":false,"properties":{"order_id":{"type":"string"}},"required":["order_id"],"type":"object"},"strict":false,"type":"function"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null}} - - ' - - ' - - ' - - 'data: {"type":"response.output_item.added","sequence_number":2,"output_index":0,"item":{"content":[],"id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e","summary":[],"type":"reasoning"}} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":3,"output_index":0,"content_index":0,"delta":"The","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":4,"output_index":0,"content_index":0,"delta":" - user wants me","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":5,"output_index":0,"content_index":0,"delta":" - to call `","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":6,"output_index":0,"content_index":0,"delta":"tool_search`","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":7,"output_index":0,"content_index":0,"delta":" - with","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":8,"output_index":0,"content_index":0,"delta":" - the goal \"","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":9,"output_index":0,"content_index":0,"delta":"find - the shipping","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":10,"output_index":0,"content_index":0,"delta":" - ETA tool for","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":11,"output_index":0,"content_index":0,"delta":" - order_4","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":12,"output_index":0,"content_index":0,"delta":"2\".\n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":13,"output_index":0,"content_index":0,"delta":"I","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":14,"output_index":0,"content_index":0,"delta":" - must","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":15,"output_index":0,"content_index":0,"delta":" - not call `","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":16,"output_index":0,"content_index":0,"delta":"get_shipping_eta","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":17,"output_index":0,"content_index":0,"delta":"` - yet.","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":18,"output_index":0,"content_index":0,"delta":"\nI - must","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":19,"output_index":0,"content_index":0,"delta":" - call `tool","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":20,"output_index":0,"content_index":0,"delta":"_search` - first","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":21,"output_index":0,"content_index":0,"delta":".\n\nLet","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":22,"output_index":0,"content_index":0,"delta":"''s - construct","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":23,"output_index":0,"content_index":0,"delta":" - the `","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":24,"output_index":0,"content_index":0,"delta":"tool_search`","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":25,"output_index":0,"content_index":0,"delta":" - call.\n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":26,"output_index":0,"content_index":0,"delta":"`","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":27,"output_index":0,"content_index":0,"delta":"goal`: - \"","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":28,"output_index":0,"content_index":0,"delta":"find - the shipping","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":29,"output_index":0,"content_index":0,"delta":" - ETA tool for","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":30,"output_index":0,"content_index":0,"delta":" - order_4","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":31,"output_index":0,"content_index":0,"delta":"2\"\n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":32,"output_index":0,"content_index":0,"delta":"Then","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":33,"output_index":0,"content_index":0,"delta":",","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":34,"output_index":0,"content_index":0,"delta":" - I will proceed","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":35,"output_index":0,"content_index":0,"delta":".","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":36,"output_index":0,"content_index":0,"delta":"\n\nWait,","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":37,"output_index":0,"content_index":0,"delta":" - the prompt says","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":38,"output_index":0,"content_index":0,"delta":":","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":39,"output_index":0,"content_index":0,"delta":" - \"Call tool","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":40,"output_index":0,"content_index":0,"delta":"_search - now to","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":41,"output_index":0,"content_index":0,"delta":" - find the shipping","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":42,"output_index":0,"content_index":0,"delta":" - ETA tool for","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":43,"output_index":0,"content_index":0,"delta":" - order_4","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":44,"output_index":0,"content_index":0,"delta":"2. - Do","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":45,"output_index":0,"content_index":0,"delta":" - not call get","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":46,"output_index":0,"content_index":0,"delta":"_shipping_eta - yet","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":47,"output_index":0,"content_index":0,"delta":" - and do not","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":48,"output_index":0,"content_index":0,"delta":" - answer without calling","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":49,"output_index":0,"content_index":0,"delta":" - tool_search.\"","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":50,"output_index":0,"content_index":0,"delta":"\n\nI","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":51,"output_index":0,"content_index":0,"delta":" - will call `","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":52,"output_index":0,"content_index":0,"delta":"tool_search`","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":53,"output_index":0,"content_index":0,"delta":" - with the exact","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":54,"output_index":0,"content_index":0,"delta":" - goal.","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":55,"output_index":0,"content_index":0,"delta":"\nParameters","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":56,"output_index":0,"content_index":0,"delta":":\n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":57,"output_index":0,"content_index":0,"delta":"-","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":58,"output_index":0,"content_index":0,"delta":" - goal: \"","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":59,"output_index":0,"content_index":0,"delta":"find - the shipping","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":60,"output_index":0,"content_index":0,"delta":" - ETA tool for","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":61,"output_index":0,"content_index":0,"delta":" - order_4","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":62,"output_index":0,"content_index":0,"delta":"2\"\n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":63,"output_index":0,"content_index":0,"delta":"Type","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":64,"output_index":0,"content_index":0,"delta":": - object","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":65,"output_index":0,"content_index":0,"delta":".","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":66,"output_index":0,"content_index":0,"delta":"\nDone","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":67,"output_index":0,"content_index":0,"delta":". - \n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":68,"output_index":0,"content_index":0,"delta":"I","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":69,"output_index":0,"content_index":0,"delta":" - will generate","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":70,"output_index":0,"content_index":0,"delta":" - the tool call","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":71,"output_index":0,"content_index":0,"delta":" - now. \n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":72,"output_index":0,"content_index":0,"delta":"Checking","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":73,"output_index":0,"content_index":0,"delta":" - constraints","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":74,"output_index":0,"content_index":0,"delta":": - \"You","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":75,"output_index":0,"content_index":0,"delta":" - must call at","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":76,"output_index":0,"content_index":0,"delta":" - least one available","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":77,"output_index":0,"content_index":0,"delta":" - tool before producing","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":78,"output_index":0,"content_index":0,"delta":" - the final answer","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":79,"output_index":0,"content_index":0,"delta":".","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":80,"output_index":0,"content_index":0,"delta":" - Do not answer","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":81,"output_index":0,"content_index":0,"delta":" - directly without a","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":82,"output_index":0,"content_index":0,"delta":" - tool call.\"","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":83,"output_index":0,"content_index":0,"delta":" - -> S","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":84,"output_index":0,"content_index":0,"delta":"atisfied.\n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":85,"output_index":0,"content_index":0,"delta":"Proceed. - \n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":86,"output_index":0,"content_index":0,"delta":"Output","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":87,"output_index":0,"content_index":0,"delta":" - matches the","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":88,"output_index":0,"content_index":0,"delta":" - tool schema","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":89,"output_index":0,"content_index":0,"delta":".\n`","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":90,"output_index":0,"content_index":0,"delta":"tool_search(goal","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":91,"output_index":0,"content_index":0,"delta":"=\"find - the","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":92,"output_index":0,"content_index":0,"delta":" - shipping ETA tool","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":93,"output_index":0,"content_index":0,"delta":" - for order_","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":94,"output_index":0,"content_index":0,"delta":"42\")","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":95,"output_index":0,"content_index":0,"delta":"`\nDone","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":96,"output_index":0,"content_index":0,"delta":". - \nWait","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":97,"output_index":0,"content_index":0,"delta":", - should","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":98,"output_index":0,"content_index":0,"delta":" - I include","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":99,"output_index":0,"content_index":0,"delta":" - order","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":100,"output_index":0,"content_index":0,"delta":"_","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":101,"output_index":0,"content_index":0,"delta":"42 - in","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":102,"output_index":0,"content_index":0,"delta":" - the goal?","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":103,"output_index":0,"content_index":0,"delta":" - Yes, the","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":104,"output_index":0,"content_index":0,"delta":" - prompt says \"","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":105,"output_index":0,"content_index":0,"delta":"find","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":106,"output_index":0,"content_index":0,"delta":" - the shipping ETA","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":107,"output_index":0,"content_index":0,"delta":" - tool for order","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":108,"output_index":0,"content_index":0,"delta":"_42","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":109,"output_index":0,"content_index":0,"delta":"\". - I","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":110,"output_index":0,"content_index":0,"delta":"''ll - just pass","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":111,"output_index":0,"content_index":0,"delta":" - that string","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":112,"output_index":0,"content_index":0,"delta":".\nLet","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":113,"output_index":0,"content_index":0,"delta":"''s - call","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":114,"output_index":0,"content_index":0,"delta":" - it. \n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":115,"output_index":0,"content_index":0,"delta":"Proceed","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":116,"output_index":0,"content_index":0,"delta":".","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":117,"output_index":0,"content_index":0,"delta":" - \n[Tool","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":118,"output_index":0,"content_index":0,"delta":" - Call Generation","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":119,"output_index":0,"content_index":0,"delta":"]\n`","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":120,"output_index":0,"content_index":0,"delta":"{\"","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":121,"output_index":0,"content_index":0,"delta":"name\": - \"","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":122,"output_index":0,"content_index":0,"delta":"tool_search\",","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":123,"output_index":0,"content_index":0,"delta":" - \"arguments\":","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":124,"output_index":0,"content_index":0,"delta":" - {\"goal\":","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":125,"output_index":0,"content_index":0,"delta":" - \"find the","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":126,"output_index":0,"content_index":0,"delta":" - shipping ETA tool","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":127,"output_index":0,"content_index":0,"delta":" - for order_","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":128,"output_index":0,"content_index":0,"delta":"42\"}}","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":129,"output_index":0,"content_index":0,"delta":"`\nI","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":130,"output_index":0,"content_index":0,"delta":" - will output this","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":131,"output_index":0,"content_index":0,"delta":". - \nDone","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":132,"output_index":0,"content_index":0,"delta":". - \n(Self","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":133,"output_index":0,"content_index":0,"delta":"-Correction","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":134,"output_index":0,"content_index":0,"delta":"/Verification - during","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":135,"output_index":0,"content_index":0,"delta":" - thought)\n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":136,"output_index":0,"content_index":0,"delta":"Is","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":137,"output_index":0,"content_index":0,"delta":" - there","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":138,"output_index":0,"content_index":0,"delta":" - any specific","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":139,"output_index":0,"content_index":0,"delta":" - format?","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":140,"output_index":0,"content_index":0,"delta":" - Standard","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":141,"output_index":0,"content_index":0,"delta":" - JSON for","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":142,"output_index":0,"content_index":0,"delta":" - function","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":143,"output_index":0,"content_index":0,"delta":" - calling","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":144,"output_index":0,"content_index":0,"delta":".\nThe","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":145,"output_index":0,"content_index":0,"delta":" - goal","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":146,"output_index":0,"content_index":0,"delta":" - is exactly","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":147,"output_index":0,"content_index":0,"delta":" - as requested.","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":148,"output_index":0,"content_index":0,"delta":"\nReady.","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":149,"output_index":0,"content_index":0,"delta":" - \nProceeds","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":150,"output_index":0,"content_index":0,"delta":". - \n[","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":151,"output_index":0,"content_index":0,"delta":"Output - Generation]","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":152,"output_index":0,"content_index":0,"delta":" - -> calls","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":153,"output_index":0,"content_index":0,"delta":" - tool_search.","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":154,"output_index":0,"content_index":0,"delta":"\n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":155,"output_index":0,"content_index":0,"delta":"Wait","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":156,"output_index":0,"content_index":0,"delta":", - let","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":157,"output_index":0,"content_index":0,"delta":"''s - verify","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":158,"output_index":0,"content_index":0,"delta":" - the `","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":159,"output_index":0,"content_index":0,"delta":"get","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":160,"output_index":0,"content_index":0,"delta":"_shipping_eta`","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":161,"output_index":0,"content_index":0,"delta":" - tool","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":162,"output_index":0,"content_index":0,"delta":" - description.","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":163,"output_index":0,"content_index":0,"delta":" - It takes","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":164,"output_index":0,"content_index":0,"delta":" - `order_id","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":165,"output_index":0,"content_index":0,"delta":"`.\nThe","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":166,"output_index":0,"content_index":0,"delta":" - user specifically","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":167,"output_index":0,"content_index":0,"delta":" - says \"Call","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":168,"output_index":0,"content_index":0,"delta":" - tool_search now","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":169,"output_index":0,"content_index":0,"delta":" - to","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":170,"output_index":0,"content_index":0,"delta":" - find the shipping","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":171,"output_index":0,"content_index":0,"delta":" - ETA tool for","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":172,"output_index":0,"content_index":0,"delta":" - order_4","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":173,"output_index":0,"content_index":0,"delta":"2.\"","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":174,"output_index":0,"content_index":0,"delta":"\nSo - the","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":175,"output_index":0,"content_index":0,"delta":" - goal string is","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":176,"output_index":0,"content_index":0,"delta":" - fine","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":177,"output_index":0,"content_index":0,"delta":".\nAll","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":178,"output_index":0,"content_index":0,"delta":" - good. \n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":179,"output_index":0,"content_index":0,"delta":"Proceeds","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":180,"output_index":0,"content_index":0,"delta":". - \n[","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":181,"output_index":0,"content_index":0,"delta":"Output] - ->","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":182,"output_index":0,"content_index":0,"delta":" - tool_call","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.delta","sequence_number":183,"output_index":0,"content_index":0,"delta":".\n","item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e"} - - ' - - ' - - ' - - 'data: {"type":"response.reasoning_text.done","sequence_number":184,"output_index":0,"content_index":0,"item_id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e","text":"The - user wants me to call `tool_search` with the goal \"find the shipping ETA tool - for order_42\".\nI must not call `get_shipping_eta` yet.\nI must call `tool_search` - first.\n\nLet''s construct the `tool_search` call.\n`goal`: \"find the shipping - ETA tool for order_42\"\nThen, I will proceed.\n\nWait, the prompt says: \"Call - tool_search now to find the shipping ETA tool for order_42. Do not call get_shipping_eta - yet and do not answer without calling tool_search.\"\n\nI will call `tool_search` - with the exact goal.\nParameters:\n- goal: \"find the shipping ETA tool for - order_42\"\nType: object.\nDone. \nI will generate the tool call now. \nChecking - constraints: \"You must call at least one available tool before producing the - final answer. Do not answer directly without a tool call.\" -> Satisfied.\nProceed. - \nOutput matches the tool schema.\n`tool_search(goal=\"find the shipping ETA - tool for order_42\")`\nDone. \nWait, should I include order_42 in the goal? - Yes, the prompt says \"find the shipping ETA tool for order_42\". I''ll just - pass that string.\nLet''s call it. \nProceed. \n[Tool Call Generation]\n`{\"name\": - \"tool_search\", \"arguments\": {\"goal\": \"find the shipping ETA tool for - order_42\"}}`\nI will output this. \nDone. \n(Self-Correction/Verification during - thought)\nIs there any specific format? Standard JSON for function calling.\nThe - goal is exactly as requested.\nReady. \nProceeds. \n[Output Generation] -> calls - tool_search.\nWait, let''s verify the `get_shipping_eta` tool description. It - takes `order_id`.\nThe user specifically says \"Call tool_search now to find - the shipping ETA tool for order_42.\"\nSo the goal string is fine.\nAll good. - \nProceeds. \n[Output] -> tool_call.\n"} - - ' - - ' - - ' - - 'data: {"type":"response.output_item.done","sequence_number":185,"output_index":0,"item":{"content":[{"text":"The - user wants me to call `tool_search` with the goal \"find the shipping ETA tool - for order_42\".\nI must not call `get_shipping_eta` yet.\nI must call `tool_search` - first.\n\nLet''s construct the `tool_search` call.\n`goal`: \"find the shipping - ETA tool for order_42\"\nThen, I will proceed.\n\nWait, the prompt says: \"Call - tool_search now to find the shipping ETA tool for order_42. Do not call get_shipping_eta - yet and do not answer without calling tool_search.\"\n\nI will call `tool_search` - with the exact goal.\nParameters:\n- goal: \"find the shipping ETA tool for - order_42\"\nType: object.\nDone. \nI will generate the tool call now. \nChecking - constraints: \"You must call at least one available tool before producing the - final answer. Do not answer directly without a tool call.\" -> Satisfied.\nProceed. - \nOutput matches the tool schema.\n`tool_search(goal=\"find the shipping ETA - tool for order_42\")`\nDone. \nWait, should I include order_42 in the goal? - Yes, the prompt says \"find the shipping ETA tool for order_42\". I''ll just - pass that string.\nLet''s call it. \nProceed. \n[Tool Call Generation]\n`{\"name\": - \"tool_search\", \"arguments\": {\"goal\": \"find the shipping ETA tool for - order_42\"}}`\nI will output this. \nDone. \n(Self-Correction/Verification during - thought)\nIs there any specific format? Standard JSON for function calling.\nThe - goal is exactly as requested.\nReady. \nProceeds. \n[Output Generation] -> calls - tool_search.\nWait, let''s verify the `get_shipping_eta` tool description. It - takes `order_id`.\nThe user specifically says \"Call tool_search now to find - the shipping ETA tool for order_42.\"\nSo the goal string is fine.\nAll good. - \nProceeds. \n[Output] -> tool_call.\n","type":"reasoning_text"}],"id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e","summary":[],"type":"reasoning"}} - - ' - - ' - - ' - - 'data: {"type":"response.output_item.added","sequence_number":186,"output_index":1,"item":{"arguments":{},"call_id":"chatcmpl-tool-829878a979789c2f","execution":"client","status":"in_progress","type":"tool_search_call"}} - - ' - - ' - - ' - - 'data: {"type":"response.output_item.done","sequence_number":187,"output_index":1,"item":{"arguments":{"goal":"find - the shipping ETA tool for order_42"},"call_id":"chatcmpl-tool-829878a979789c2f","execution":"client","status":"completed","type":"tool_search_call"}} - - ' - - ' - - ' - - 'data: {"type":"response.completed","sequence_number":188,"response":{"conversation_id":null,"created_at":1785748983,"error":null,"id":"resp_019fc6ef-0379-72c3-8d97-7cd685cc7265","incomplete_details":null,"instructions":null,"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[{"content":[{"text":"The - user wants me to call `tool_search` with the goal \"find the shipping ETA tool - for order_42\".\nI must not call `get_shipping_eta` yet.\nI must call `tool_search` - first.\n\nLet''s construct the `tool_search` call.\n`goal`: \"find the shipping - ETA tool for order_42\"\nThen, I will proceed.\n\nWait, the prompt says: \"Call - tool_search now to find the shipping ETA tool for order_42. Do not call get_shipping_eta - yet and do not answer without calling tool_search.\"\n\nI will call `tool_search` - with the exact goal.\nParameters:\n- goal: \"find the shipping ETA tool for - order_42\"\nType: object.\nDone. \nI will generate the tool call now. \nChecking - constraints: \"You must call at least one available tool before producing the - final answer. Do not answer directly without a tool call.\" -> Satisfied.\nProceed. - \nOutput matches the tool schema.\n`tool_search(goal=\"find the shipping ETA - tool for order_42\")`\nDone. \nWait, should I include order_42 in the goal? - Yes, the prompt says \"find the shipping ETA tool for order_42\". I''ll just - pass that string.\nLet''s call it. \nProceed. \n[Tool Call Generation]\n`{\"name\": - \"tool_search\", \"arguments\": {\"goal\": \"find the shipping ETA tool for - order_42\"}}`\nI will output this. \nDone. \n(Self-Correction/Verification during - thought)\nIs there any specific format? Standard JSON for function calling.\nThe - goal is exactly as requested.\nReady. \nProceeds. \n[Output Generation] -> calls - tool_search.\nWait, let''s verify the `get_shipping_eta` tool description. It - takes `order_id`.\nThe user specifically says \"Call tool_search now to find - the shipping ETA tool for order_42.\"\nSo the goal string is fine.\nAll good. - \nProceeds. \n[Output] -> tool_call.\n","type":"reasoning_text"}],"encrypted_content":null,"id":"rs_019fc6ef-0e55-7452-bd29-af97de23429e","status":null,"summary":[],"type":"reasoning"},{"arguments":{"goal":"find - the shipping ETA tool for order_42"},"call_id":"chatcmpl-tool-829878a979789c2f","execution":"client","status":"completed","type":"tool_search_call"}],"previous_response_id":null,"status":"completed","tools":[{"description":"Find - the project-specific tools needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"defer_loading":true,"description":"Look - up shipping ETA details for an order.","name":"get_shipping_eta","parameters":{"additionalProperties":false,"properties":{"order_id":{"type":"string"}},"required":["order_id"],"type":"object"},"strict":false,"type":"function"}],"usage":{"input_tokens":390,"input_tokens_details":{"cached_tokens":0},"output_tokens":477,"output_tokens_details":{"reasoning_tokens":405},"total_tokens":867}}} - - ' - - ' - - ' - - 'data: [DONE] - - ' - - ' - - ' - status_code: 200 diff --git a/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-websocket-streaming.yaml b/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-websocket-streaming.yaml deleted file mode 100644 index fc46d7d2..00000000 --- a/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-gateway-Qwen-Qwen3.6-35B-A3B-websocket-streaming.yaml +++ /dev/null @@ -1,574 +0,0 @@ -turns: -- filename: t1 - request: - body: - input: Call tool_search now to find the shipping ETA tool for order_42. Do not - call get_shipping_eta yet and do not answer without calling tool_search. - max_output_tokens: 1024 - model: Qwen/Qwen3.6-35B-A3B - store: true - tool_choice: required - tools: - - description: Find the project-specific tools needed to continue the task. - execution: client - parameters: - additionalProperties: false - properties: - goal: - type: string - required: - - goal - type: object - type: tool_search - - defer_loading: true - description: Look up shipping ETA details for an order. - name: get_shipping_eta - parameters: - additionalProperties: false - properties: - order_id: - type: string - required: - - order_id - type: object - strict: false - type: function - type: response.create - headers: {} - method: WEBSOCKET - path: /v1/responses - query_params: {} - transport: websocket - response: - headers: - transport: websocket - sse: - - 'data: {"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785752313,"error":null,"frequency_penalty":0.0,"id":"resp_019fc721-df81-7ea3-9e8d-c240136387c5","incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tools":[{"description":"Find - the project-specific tools needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"defer_loading":true,"description":"Look - up shipping ETA details for an order.","name":"get_shipping_eta","parameters":{"additionalProperties":false,"properties":{"order_id":{"type":"string"}},"required":["order_id"],"type":"object"},"strict":false,"type":"function"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null},"sequence_number":0,"type":"response.created"} - - ' - - 'data: {"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785752313,"error":null,"frequency_penalty":0.0,"id":"resp_019fc721-df81-7ea3-9e8d-c240136387c5","incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tools":[{"description":"Find - the project-specific tools needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"defer_loading":true,"description":"Look - up shipping ETA details for an order.","name":"get_shipping_eta","parameters":{"additionalProperties":false,"properties":{"order_id":{"type":"string"}},"required":["order_id"],"type":"object"},"strict":false,"type":"function"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null},"sequence_number":1,"type":"response.in_progress"} - - ' - - 'data: {"item":{"content":[],"id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","summary":[],"type":"reasoning"},"output_index":0,"sequence_number":2,"type":"response.output_item.added"} - - ' - - 'data: {"content_index":0,"delta":"The","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":3,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" user wants me","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":4,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" to call `","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":5,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"tool_search`","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":6,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" to find the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":7,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" shipping ETA tool","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":8,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" for \"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":9,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"order_4","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":10,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"2\".\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":11,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"They","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":12,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" explicitly state:","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":13,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":14,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"1","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":15,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":". Call tool","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":16,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"_search now.","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":17,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"\n2.","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":18,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" Do not call","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":19,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" get_shipping_eta","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":20,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" yet.\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":21,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"3. Do","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":22,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" not answer without","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":23,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" calling tool_search","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":24,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":".\n\nThe","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":25,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" goal for","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":26,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" `tool_search","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":27,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"` is","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":28,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" to","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":29,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" find the project","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":30,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"-specific tools needed","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":31,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" to continue the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":32,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" task. The","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":33,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" goal string","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":34,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" should be \"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":35,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"shipping","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":36,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" ETA tool for","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":37,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" order_4","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":38,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"2\".\n\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":39,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"Let''s call","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":40,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" `tool_search","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":41,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"` with the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":42,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" goal parameter","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":43,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":".\nThen","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":44,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" I will wait","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":45,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" for the response","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":46,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" before doing","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":47,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" anything else.","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":48,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"\nActually","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":49,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":", the prompt","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":50,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" says \"Call","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":51,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" tool_search now","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":52,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" to find the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":53,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" shipping ETA tool","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":54,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" for order_","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":55,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"42.\"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":56,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" So","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":57,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":58,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" goal is \"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":59,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"find","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":60,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" the shipping ETA","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":61,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" tool for order","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":62,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"_42","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":63,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"\".\n\nLet","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":64,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"''s make the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":65,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" tool call.","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":66,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" \n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":67,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"Parameters","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":68,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":": goal =","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":69,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" \"find the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":70,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" shipping ETA tool","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":71,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" for order_","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":72,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"42\"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":73,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"\nI","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":74,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" will execute this","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":75,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" now","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":76,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":". \nAfter","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":77,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" receiving","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":78,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" the result","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":79,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":", I will","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":80,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" proceed","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":81,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" according","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":82,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" to instructions","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":83,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":".","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":84,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":85,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"Wait, the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":86,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" instruction says \"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":87,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"Do not call","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":88,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" get_shipping_eta","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":89,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" yet and do","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":90,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" not answer without","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":91,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" calling tool_search","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":92,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":".\" This","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":93,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" implies I just","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":94,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" need to call","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":95,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" tool_search first","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":96,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":".\n\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":97,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"I","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":98,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"''ll","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":99,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":" call tool_search","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":100,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":".","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":101,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"delta":"\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":102,"type":"response.reasoning_text.delta"} - - ' - - 'data: {"content_index":0,"item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":103,"text":"The - user wants me to call `tool_search` to find the shipping ETA tool for \"order_42\".\nThey - explicitly state:\n1. Call tool_search now.\n2. Do not call get_shipping_eta - yet.\n3. Do not answer without calling tool_search.\n\nThe goal for `tool_search` - is to find the project-specific tools needed to continue the task. The goal - string should be \"shipping ETA tool for order_42\".\n\nLet''s call `tool_search` - with the goal parameter.\nThen I will wait for the response before doing anything - else.\nActually, the prompt says \"Call tool_search now to find the shipping - ETA tool for order_42.\" So the goal is \"find the shipping ETA tool for order_42\".\n\nLet''s - make the tool call. \nParameters: goal = \"find the shipping ETA tool for order_42\"\nI - will execute this now. \nAfter receiving the result, I will proceed according - to instructions.\nWait, the instruction says \"Do not call get_shipping_eta - yet and do not answer without calling tool_search.\" This implies I just need - to call tool_search first.\n\nI''ll call tool_search.\n","type":"response.reasoning_text.done"} - - ' - - 'data: {"item":{"content":[{"text":"The user wants me to call `tool_search` - to find the shipping ETA tool for \"order_42\".\nThey explicitly state:\n1. - Call tool_search now.\n2. Do not call get_shipping_eta yet.\n3. Do not answer - without calling tool_search.\n\nThe goal for `tool_search` is to find the project-specific - tools needed to continue the task. The goal string should be \"shipping ETA - tool for order_42\".\n\nLet''s call `tool_search` with the goal parameter.\nThen - I will wait for the response before doing anything else.\nActually, the prompt - says \"Call tool_search now to find the shipping ETA tool for order_42.\" So - the goal is \"find the shipping ETA tool for order_42\".\n\nLet''s make the - tool call. \nParameters: goal = \"find the shipping ETA tool for order_42\"\nI - will execute this now. \nAfter receiving the result, I will proceed according - to instructions.\nWait, the instruction says \"Do not call get_shipping_eta - yet and do not answer without calling tool_search.\" This implies I just need - to call tool_search first.\n\nI''ll call tool_search.\n","type":"reasoning_text"}],"id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","summary":[],"type":"reasoning"},"output_index":0,"sequence_number":104,"type":"response.output_item.done"} - - ' - - 'data: {"item":{"arguments":{},"call_id":"chatcmpl-tool-9b30cda411635646","execution":"client","status":"in_progress","type":"tool_search_call"},"output_index":1,"sequence_number":105,"type":"response.output_item.added"} - - ' - - 'data: {"item":{"arguments":{"goal":"find the shipping ETA tool for order_42"},"call_id":"chatcmpl-tool-9b30cda411635646","execution":"client","status":"completed","type":"tool_search_call"},"output_index":1,"sequence_number":106,"type":"response.output_item.done"} - - ' - - 'data: {"response":{"conversation_id":null,"created_at":1785752315,"error":null,"id":"resp_019fc721-df81-7ea3-9e8d-c240136387c5","incomplete_details":null,"instructions":null,"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[{"content":[{"text":"The - user wants me to call `tool_search` to find the shipping ETA tool for \"order_42\".\nThey - explicitly state:\n1. Call tool_search now.\n2. Do not call get_shipping_eta - yet.\n3. Do not answer without calling tool_search.\n\nThe goal for `tool_search` - is to find the project-specific tools needed to continue the task. The goal - string should be \"shipping ETA tool for order_42\".\n\nLet''s call `tool_search` - with the goal parameter.\nThen I will wait for the response before doing anything - else.\nActually, the prompt says \"Call tool_search now to find the shipping - ETA tool for order_42.\" So the goal is \"find the shipping ETA tool for order_42\".\n\nLet''s - make the tool call. \nParameters: goal = \"find the shipping ETA tool for order_42\"\nI - will execute this now. \nAfter receiving the result, I will proceed according - to instructions.\nWait, the instruction says \"Do not call get_shipping_eta - yet and do not answer without calling tool_search.\" This implies I just need - to call tool_search first.\n\nI''ll call tool_search.\n","type":"reasoning_text"}],"encrypted_content":null,"id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","status":null,"summary":[],"type":"reasoning"},{"arguments":{"goal":"find - the shipping ETA tool for order_42"},"call_id":"chatcmpl-tool-9b30cda411635646","execution":"client","status":"completed","type":"tool_search_call"}],"previous_response_id":null,"status":"completed","tools":[{"description":"Find - the project-specific tools needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"defer_loading":true,"description":"Look - up shipping ETA details for an order.","name":"get_shipping_eta","parameters":{"additionalProperties":false,"properties":{"order_id":{"type":"string"}},"required":["order_id"],"type":"object"},"strict":false,"type":"function"}],"usage":{"input_tokens":390,"input_tokens_details":{"cached_tokens":0},"output_tokens":284,"output_tokens_details":{"reasoning_tokens":228},"total_tokens":674}},"sequence_number":107,"type":"response.completed"} - - ' - - 'data: [DONE] - - ' - status_code: 101 - websocket: - - '{"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785752313,"error":null,"frequency_penalty":0.0,"id":"resp_019fc721-df81-7ea3-9e8d-c240136387c5","incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tools":[{"description":"Find - the project-specific tools needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"defer_loading":true,"description":"Look - up shipping ETA details for an order.","name":"get_shipping_eta","parameters":{"additionalProperties":false,"properties":{"order_id":{"type":"string"}},"required":["order_id"],"type":"object"},"strict":false,"type":"function"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null},"sequence_number":0,"type":"response.created"}' - - '{"response":{"background":false,"completed_at":null,"conversation":null,"created_at":1785752313,"error":null,"frequency_penalty":0.0,"id":"resp_019fc721-df81-7ea3-9e8d-c240136387c5","incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"metadata":{},"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","status":"in_progress","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tools":[{"description":"Find - the project-specific tools needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"defer_loading":true,"description":"Look - up shipping ETA details for an order.","name":"get_shipping_eta","parameters":{"additionalProperties":false,"properties":{"order_id":{"type":"string"}},"required":["order_id"],"type":"object"},"strict":false,"type":"function"}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null},"sequence_number":1,"type":"response.in_progress"}' - - '{"item":{"content":[],"id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","summary":[],"type":"reasoning"},"output_index":0,"sequence_number":2,"type":"response.output_item.added"}' - - '{"content_index":0,"delta":"The","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":3,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" user wants me","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":4,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" to call `","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":5,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"tool_search`","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":6,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" to find the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":7,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" shipping ETA tool","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":8,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" for \"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":9,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"order_4","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":10,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"2\".\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":11,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"They","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":12,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" explicitly state:","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":13,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":14,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"1","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":15,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":". Call tool","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":16,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"_search now.","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":17,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"\n2.","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":18,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" Do not call","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":19,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" get_shipping_eta","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":20,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" yet.\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":21,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"3. Do","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":22,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" not answer without","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":23,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" calling tool_search","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":24,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":".\n\nThe","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":25,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" goal for","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":26,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" `tool_search","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":27,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"` is","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":28,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" to","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":29,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" find the project","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":30,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"-specific tools needed","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":31,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" to continue the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":32,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" task. The","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":33,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" goal string","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":34,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" should be \"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":35,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"shipping","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":36,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" ETA tool for","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":37,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" order_4","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":38,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"2\".\n\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":39,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"Let''s call","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":40,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" `tool_search","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":41,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"` with the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":42,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" goal parameter","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":43,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":".\nThen","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":44,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" I will wait","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":45,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" for the response","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":46,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" before doing","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":47,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" anything else.","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":48,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"\nActually","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":49,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":", the prompt","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":50,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" says \"Call","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":51,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" tool_search now","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":52,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" to find the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":53,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" shipping ETA tool","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":54,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" for order_","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":55,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"42.\"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":56,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" So","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":57,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":58,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" goal is \"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":59,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"find","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":60,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" the shipping ETA","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":61,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" tool for order","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":62,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"_42","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":63,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"\".\n\nLet","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":64,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"''s make the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":65,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" tool call.","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":66,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" \n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":67,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"Parameters","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":68,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":": goal =","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":69,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" \"find the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":70,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" shipping ETA tool","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":71,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" for order_","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":72,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"42\"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":73,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"\nI","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":74,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" will execute this","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":75,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" now","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":76,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":". \nAfter","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":77,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" receiving","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":78,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" the result","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":79,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":", I will","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":80,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" proceed","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":81,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" according","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":82,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" to instructions","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":83,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":".","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":84,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":85,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"Wait, the","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":86,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" instruction says \"","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":87,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"Do not call","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":88,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" get_shipping_eta","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":89,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" yet and do","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":90,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" not answer without","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":91,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" calling tool_search","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":92,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":".\" This","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":93,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" implies I just","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":94,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" need to call","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":95,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" tool_search first","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":96,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":".\n\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":97,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"I","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":98,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"''ll","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":99,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":" call tool_search","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":100,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":".","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":101,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"delta":"\n","item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":102,"type":"response.reasoning_text.delta"}' - - '{"content_index":0,"item_id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","output_index":0,"sequence_number":103,"text":"The - user wants me to call `tool_search` to find the shipping ETA tool for \"order_42\".\nThey - explicitly state:\n1. Call tool_search now.\n2. Do not call get_shipping_eta - yet.\n3. Do not answer without calling tool_search.\n\nThe goal for `tool_search` - is to find the project-specific tools needed to continue the task. The goal - string should be \"shipping ETA tool for order_42\".\n\nLet''s call `tool_search` - with the goal parameter.\nThen I will wait for the response before doing anything - else.\nActually, the prompt says \"Call tool_search now to find the shipping - ETA tool for order_42.\" So the goal is \"find the shipping ETA tool for order_42\".\n\nLet''s - make the tool call. \nParameters: goal = \"find the shipping ETA tool for order_42\"\nI - will execute this now. \nAfter receiving the result, I will proceed according - to instructions.\nWait, the instruction says \"Do not call get_shipping_eta - yet and do not answer without calling tool_search.\" This implies I just need - to call tool_search first.\n\nI''ll call tool_search.\n","type":"response.reasoning_text.done"}' - - '{"item":{"content":[{"text":"The user wants me to call `tool_search` to find - the shipping ETA tool for \"order_42\".\nThey explicitly state:\n1. Call tool_search - now.\n2. Do not call get_shipping_eta yet.\n3. Do not answer without calling - tool_search.\n\nThe goal for `tool_search` is to find the project-specific tools - needed to continue the task. The goal string should be \"shipping ETA tool for - order_42\".\n\nLet''s call `tool_search` with the goal parameter.\nThen I will - wait for the response before doing anything else.\nActually, the prompt says - \"Call tool_search now to find the shipping ETA tool for order_42.\" So the - goal is \"find the shipping ETA tool for order_42\".\n\nLet''s make the tool - call. \nParameters: goal = \"find the shipping ETA tool for order_42\"\nI will - execute this now. \nAfter receiving the result, I will proceed according to - instructions.\nWait, the instruction says \"Do not call get_shipping_eta yet - and do not answer without calling tool_search.\" This implies I just need to - call tool_search first.\n\nI''ll call tool_search.\n","type":"reasoning_text"}],"id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","summary":[],"type":"reasoning"},"output_index":0,"sequence_number":104,"type":"response.output_item.done"}' - - '{"item":{"arguments":{},"call_id":"chatcmpl-tool-9b30cda411635646","execution":"client","status":"in_progress","type":"tool_search_call"},"output_index":1,"sequence_number":105,"type":"response.output_item.added"}' - - '{"item":{"arguments":{"goal":"find the shipping ETA tool for order_42"},"call_id":"chatcmpl-tool-9b30cda411635646","execution":"client","status":"completed","type":"tool_search_call"},"output_index":1,"sequence_number":106,"type":"response.output_item.done"}' - - '{"response":{"conversation_id":null,"created_at":1785752315,"error":null,"id":"resp_019fc721-df81-7ea3-9e8d-c240136387c5","incomplete_details":null,"instructions":null,"model":"Qwen/Qwen3.6-35B-A3B","object":"response","output":[{"content":[{"text":"The - user wants me to call `tool_search` to find the shipping ETA tool for \"order_42\".\nThey - explicitly state:\n1. Call tool_search now.\n2. Do not call get_shipping_eta - yet.\n3. Do not answer without calling tool_search.\n\nThe goal for `tool_search` - is to find the project-specific tools needed to continue the task. The goal - string should be \"shipping ETA tool for order_42\".\n\nLet''s call `tool_search` - with the goal parameter.\nThen I will wait for the response before doing anything - else.\nActually, the prompt says \"Call tool_search now to find the shipping - ETA tool for order_42.\" So the goal is \"find the shipping ETA tool for order_42\".\n\nLet''s - make the tool call. \nParameters: goal = \"find the shipping ETA tool for order_42\"\nI - will execute this now. \nAfter receiving the result, I will proceed according - to instructions.\nWait, the instruction says \"Do not call get_shipping_eta - yet and do not answer without calling tool_search.\" This implies I just need - to call tool_search first.\n\nI''ll call tool_search.\n","type":"reasoning_text"}],"encrypted_content":null,"id":"rs_019fc721-e677-7a20-9447-25a85cf5075a","status":null,"summary":[],"type":"reasoning"},{"arguments":{"goal":"find - the shipping ETA tool for order_42"},"call_id":"chatcmpl-tool-9b30cda411635646","execution":"client","status":"completed","type":"tool_search_call"}],"previous_response_id":null,"status":"completed","tools":[{"description":"Find - the project-specific tools needed to continue the task.","execution":"client","parameters":{"additionalProperties":false,"properties":{"goal":{"type":"string"}},"required":["goal"],"type":"object"},"type":"tool_search"},{"defer_loading":true,"description":"Look - up shipping ETA details for an order.","name":"get_shipping_eta","parameters":{"additionalProperties":false,"properties":{"order_id":{"type":"string"}},"required":["order_id"],"type":"object"},"strict":false,"type":"function"}],"usage":{"input_tokens":390,"input_tokens_details":{"cached_tokens":0},"output_tokens":284,"output_tokens_details":{"reasoning_tokens":228},"total_tokens":674}},"sequence_number":107,"type":"response.completed"}' diff --git a/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-nonstreaming.yaml b/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-nonstreaming.yaml deleted file mode 100644 index 82a258a8..00000000 --- a/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-nonstreaming.yaml +++ /dev/null @@ -1,146 +0,0 @@ -turns: -- filename: t1 - request: - body: - input: Call tool_search now to find the shipping ETA tool for order_42. Do not - call get_shipping_eta yet and do not answer without calling tool_search. - max_output_tokens: 1024 - model: gpt-5.6 - store: true - stream: false - tool_choice: required - tools: - - description: Find the project-specific tools needed to continue the task. - execution: client - parameters: - additionalProperties: false - properties: - goal: - type: string - required: - - goal - type: object - type: tool_search - - defer_loading: true - description: Look up shipping ETA details for an order. - name: get_shipping_eta - parameters: - additionalProperties: false - properties: - order_id: - type: string - required: - - order_id - type: object - strict: false - type: function - headers: - accept: '*/*' - authorization: Bearer *** - content-type: application/json - user-agent: python-httpx/0.28.1 - method: POST - path: /v1/responses - query_params: {} - response: - body: - background: false - billing: - payer: developer - completed_at: 1785747781 - created_at: 1785747780 - error: null - frequency_penalty: 0.0 - id: resp_06d8a729a99ad4f6006a7059446b088199af936a420fe410b6 - incomplete_details: null - instructions: null - max_output_tokens: 1024 - max_tool_calls: null - metadata: {} - model: gpt-5.6-sol - moderation: null - object: response - output: - - arguments: - goal: Find the shipping ETA tool for order_42, but do not call the shipping - ETA tool yet. - call_id: call_oCdMDc2odqbljhEn6pLI4fpA - execution: client - id: tsc_06d8a729a99ad4f6006a70594547348199a213edfe7aba43a4 - status: completed - type: tool_search_call - parallel_tool_calls: true - presence_penalty: 0.0 - previous_response_id: null - prompt_cache_key: null - prompt_cache_retention: 24h - reasoning: - context: all_turns - effort: medium - mode: standard - summary: null - safety_identifier: null - service_tier: default - status: completed - store: true - temperature: 1.0 - text: - format: - type: text - verbosity: medium - tool_choice: required - tool_usage: - image_gen: - input_tokens: 0 - input_tokens_details: - image_tokens: 0 - text_tokens: 0 - output_tokens: 0 - output_tokens_details: - image_tokens: 0 - text_tokens: 0 - total_tokens: 0 - web_search: - num_requests: 0 - tools: - - defer_loading: true - description: Look up shipping ETA details for an order. - name: get_shipping_eta - output_schema: null - parameters: - additionalProperties: false - properties: - order_id: - type: string - required: - - order_id - type: object - strict: false - type: function - - description: Find the project-specific tools needed to continue the task. - execution: client - parameters: - additionalProperties: false - properties: - goal: - type: string - required: - - goal - type: object - type: tool_search - top_logprobs: 0 - top_p: 0.98 - truncation: disabled - usage: - input_tokens: 80 - input_tokens_details: - cache_write_tokens: 0 - cached_tokens: 0 - output_tokens: 39 - output_tokens_details: - reasoning_tokens: 0 - total_tokens: 119 - user: null - headers: - content-type: application/json - status_code: 200 diff --git a/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-streaming.yaml b/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-streaming.yaml deleted file mode 100644 index f2f211d8..00000000 --- a/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-streaming.yaml +++ /dev/null @@ -1,102 +0,0 @@ -turns: -- filename: t1 - request: - body: - input: Call tool_search now to find the shipping ETA tool for order_42. Do not - call get_shipping_eta yet and do not answer without calling tool_search. - max_output_tokens: 1024 - model: gpt-5.6 - store: true - stream: true - tool_choice: required - tools: - - description: Find the project-specific tools needed to continue the task. - execution: client - parameters: - additionalProperties: false - properties: - goal: - type: string - required: - - goal - type: object - type: tool_search - - defer_loading: true - description: Look up shipping ETA details for an order. - name: get_shipping_eta - parameters: - additionalProperties: false - properties: - order_id: - type: string - required: - - order_id - type: object - strict: false - type: function - headers: - accept: '*/*' - authorization: Bearer *** - content-type: application/json - user-agent: python-httpx/0.28.1 - method: POST - path: /v1/responses - query_params: {} - response: - headers: - content-type: text/event-stream; charset=utf-8 - sse: - - 'event: response.created - - ' - - 'data: {"type":"response.created","response":{"id":"resp_0448c545147bd0a5006a7059405224819ba4d6496860ecd479","object":"response","created_at":1785747776,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"function","defer_loading":true,"description":"Look - up shipping ETA details for an order.","name":"get_shipping_eta","output_schema":null,"parameters":{"type":"object","properties":{"order_id":{"type":"string"}},"required":["order_id"],"additionalProperties":false},"strict":false},{"type":"tool_search","description":"Find - the project-specific tools needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} - - ' - - ' - - ' - - 'event: response.in_progress - - ' - - 'data: {"type":"response.in_progress","response":{"id":"resp_0448c545147bd0a5006a7059405224819ba4d6496860ecd479","object":"response","created_at":1785747776,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"function","defer_loading":true,"description":"Look - up shipping ETA details for an order.","name":"get_shipping_eta","output_schema":null,"parameters":{"type":"object","properties":{"order_id":{"type":"string"}},"required":["order_id"],"additionalProperties":false},"strict":false},{"type":"tool_search","description":"Find - the project-specific tools needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} - - ' - - ' - - ' - - 'event: response.output_item.added - - ' - - 'data: {"type":"response.output_item.added","item":{"id":"tsc_0448c545147bd0a5006a70594131e4819bae8db6fe4ebb2aeb","type":"tool_search_call","status":"in_progress","arguments":{},"call_id":"call_9Z5acWsJ9IoUsyGaEQNbr30L","execution":"client"},"output_index":0,"sequence_number":2} - - ' - - ' - - ' - - 'event: response.output_item.done - - ' - - 'data: {"type":"response.output_item.done","item":{"id":"tsc_0448c545147bd0a5006a70594131e4819bae8db6fe4ebb2aeb","type":"tool_search_call","status":"completed","arguments":{"goal":"Find - the shipping ETA tool for order_42, but do not call the shipping ETA tool yet."},"call_id":"call_9Z5acWsJ9IoUsyGaEQNbr30L","execution":"client"},"output_index":0,"sequence_number":3} - - ' - - ' - - ' - - 'event: response.completed - - ' - - 'data: {"type":"response.completed","response":{"id":"resp_0448c545147bd0a5006a7059405224819ba4d6496860ecd479","object":"response","created_at":1785747776,"status":"completed","background":false,"completed_at":1785747777,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[{"id":"tsc_0448c545147bd0a5006a70594131e4819bae8db6fe4ebb2aeb","type":"tool_search_call","status":"completed","arguments":{"goal":"Find - the shipping ETA tool for order_42, but do not call the shipping ETA tool yet."},"call_id":"call_9Z5acWsJ9IoUsyGaEQNbr30L","execution":"client"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"function","defer_loading":true,"description":"Look - up shipping ETA details for an order.","name":"get_shipping_eta","output_schema":null,"parameters":{"type":"object","properties":{"order_id":{"type":"string"}},"required":["order_id"],"additionalProperties":false},"strict":false},{"type":"tool_search","description":"Find - the project-specific tools needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":{"input_tokens":80,"input_tokens_details":{"cache_write_tokens":0,"cached_tokens":0},"output_tokens":39,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":119},"user":null,"metadata":{}},"sequence_number":4} - - ' - - ' - - ' - status_code: 200 diff --git a/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-websocket-streaming.yaml b/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-websocket-streaming.yaml deleted file mode 100644 index 1dd84b87..00000000 --- a/crates/agentic-server-core/tests/cassettes/tool_search/tool-search-openai-reference-gpt-5.6-websocket-streaming.yaml +++ /dev/null @@ -1,91 +0,0 @@ -turns: -- filename: t1 - request: - body: - input: Call tool_search now to find the shipping ETA tool for order_42. Do not - call get_shipping_eta yet and do not answer without calling tool_search. - max_output_tokens: 1024 - model: gpt-5.6 - store: true - tool_choice: required - tools: - - description: Find the project-specific tools needed to continue the task. - execution: client - parameters: - additionalProperties: false - properties: - goal: - type: string - required: - - goal - type: object - type: tool_search - - defer_loading: true - description: Look up shipping ETA details for an order. - name: get_shipping_eta - parameters: - additionalProperties: false - properties: - order_id: - type: string - required: - - order_id - type: object - strict: false - type: function - type: response.create - headers: - Authorization: Bearer *** - method: WEBSOCKET - path: /v1/responses - query_params: {} - transport: websocket - response: - headers: - transport: websocket - sse: - - 'data: {"type":"response.created","response":{"id":"resp_09a5e9add27752d6006a706af5d520819886572d852c73dfc0","object":"response","created_at":1785752309,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"function","defer_loading":true,"description":"Look - up shipping ETA details for an order.","name":"get_shipping_eta","output_schema":null,"parameters":{"type":"object","properties":{"order_id":{"type":"string"}},"required":["order_id"],"additionalProperties":false},"strict":false},{"type":"tool_search","description":"Find - the project-specific tools needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} - - ' - - 'data: {"type":"response.in_progress","response":{"id":"resp_09a5e9add27752d6006a706af5d520819886572d852c73dfc0","object":"response","created_at":1785752309,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"function","defer_loading":true,"description":"Look - up shipping ETA details for an order.","name":"get_shipping_eta","output_schema":null,"parameters":{"type":"object","properties":{"order_id":{"type":"string"}},"required":["order_id"],"additionalProperties":false},"strict":false},{"type":"tool_search","description":"Find - the project-specific tools needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} - - ' - - 'data: {"type":"response.output_item.added","item":{"id":"tsc_09a5e9add27752d6006a706af7d0f881988fc1fce2ad18142a","type":"tool_search_call","status":"in_progress","arguments":{},"call_id":"call_JgjLCxUScPajmBYpzO0KWWRH","execution":"client"},"output_index":0,"sequence_number":2} - - ' - - 'data: {"type":"response.output_item.done","item":{"id":"tsc_09a5e9add27752d6006a706af7d0f881988fc1fce2ad18142a","type":"tool_search_call","status":"completed","arguments":{"goal":"Find - the shipping ETA tool that can retrieve the estimated delivery time for order_42. - Do not invoke the shipping ETA tool yet."},"call_id":"call_JgjLCxUScPajmBYpzO0KWWRH","execution":"client"},"output_index":0,"sequence_number":3} - - ' - - 'data: {"type":"response.completed","response":{"id":"resp_09a5e9add27752d6006a706af5d520819886572d852c73dfc0","object":"response","created_at":1785752309,"status":"completed","background":false,"completed_at":1785752312,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[{"id":"tsc_09a5e9add27752d6006a706af7d0f881988fc1fce2ad18142a","type":"tool_search_call","status":"completed","arguments":{"goal":"Find - the shipping ETA tool that can retrieve the estimated delivery time for order_42. - Do not invoke the shipping ETA tool yet."},"call_id":"call_JgjLCxUScPajmBYpzO0KWWRH","execution":"client"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"function","defer_loading":true,"description":"Look - up shipping ETA details for an order.","name":"get_shipping_eta","output_schema":null,"parameters":{"type":"object","properties":{"order_id":{"type":"string"}},"required":["order_id"],"additionalProperties":false},"strict":false},{"type":"tool_search","description":"Find - the project-specific tools needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":{"input_tokens":80,"input_tokens_details":{"cache_write_tokens":0,"cached_tokens":0},"output_tokens":45,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":125},"user":null,"metadata":{}},"sequence_number":4} - - ' - - 'data: [DONE] - - ' - status_code: 101 - websocket: - - '{"type":"response.created","response":{"id":"resp_09a5e9add27752d6006a706af5d520819886572d852c73dfc0","object":"response","created_at":1785752309,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"function","defer_loading":true,"description":"Look - up shipping ETA details for an order.","name":"get_shipping_eta","output_schema":null,"parameters":{"type":"object","properties":{"order_id":{"type":"string"}},"required":["order_id"],"additionalProperties":false},"strict":false},{"type":"tool_search","description":"Find - the project-specific tools needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0}' - - '{"type":"response.in_progress","response":{"id":"resp_09a5e9add27752d6006a706af5d520819886572d852c73dfc0","object":"response","created_at":1785752309,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"function","defer_loading":true,"description":"Look - up shipping ETA details for an order.","name":"get_shipping_eta","output_schema":null,"parameters":{"type":"object","properties":{"order_id":{"type":"string"}},"required":["order_id"],"additionalProperties":false},"strict":false},{"type":"tool_search","description":"Find - the project-specific tools needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1}' - - '{"type":"response.output_item.added","item":{"id":"tsc_09a5e9add27752d6006a706af7d0f881988fc1fce2ad18142a","type":"tool_search_call","status":"in_progress","arguments":{},"call_id":"call_JgjLCxUScPajmBYpzO0KWWRH","execution":"client"},"output_index":0,"sequence_number":2}' - - '{"type":"response.output_item.done","item":{"id":"tsc_09a5e9add27752d6006a706af7d0f881988fc1fce2ad18142a","type":"tool_search_call","status":"completed","arguments":{"goal":"Find - the shipping ETA tool that can retrieve the estimated delivery time for order_42. - Do not invoke the shipping ETA tool yet."},"call_id":"call_JgjLCxUScPajmBYpzO0KWWRH","execution":"client"},"output_index":0,"sequence_number":3}' - - '{"type":"response.completed","response":{"id":"resp_09a5e9add27752d6006a706af5d520819886572d852c73dfc0","object":"response","created_at":1785752309,"status":"completed","background":false,"completed_at":1785752312,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":1024,"max_tool_calls":null,"model":"gpt-5.6-sol","moderation":null,"output":[{"id":"tsc_09a5e9add27752d6006a706af7d0f881988fc1fce2ad18142a","type":"tool_search_call","status":"completed","arguments":{"goal":"Find - the shipping ETA tool that can retrieve the estimated delivery time for order_42. - Do not invoke the shipping ETA tool yet."},"call_id":"call_JgjLCxUScPajmBYpzO0KWWRH","execution":"client"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"24h","reasoning":{"context":"all_turns","effort":"medium","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"required","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[{"type":"function","defer_loading":true,"description":"Look - up shipping ETA details for an order.","name":"get_shipping_eta","output_schema":null,"parameters":{"type":"object","properties":{"order_id":{"type":"string"}},"required":["order_id"],"additionalProperties":false},"strict":false},{"type":"tool_search","description":"Find - the project-specific tools needed to continue the task.","execution":"client","parameters":{"type":"object","properties":{"goal":{"type":"string"}},"required":["goal"],"additionalProperties":false}}],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":{"input_tokens":80,"input_tokens_details":{"cache_write_tokens":0,"cached_tokens":0},"output_tokens":45,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":125},"user":null,"metadata":{}},"sequence_number":4}' diff --git a/crates/agentic-server-core/tests/cassettes/tool_search/tools.json b/crates/agentic-server-core/tests/cassettes/tool_search/tools.json deleted file mode 100644 index 1dcd84fe..00000000 --- a/crates/agentic-server-core/tests/cassettes/tool_search/tools.json +++ /dev/null @@ -1,38 +0,0 @@ -[ - { - "type": "tool_search", - "execution": "client", - "description": "Find the project-specific tools needed to continue the task.", - "parameters": { - "type": "object", - "properties": { - "goal": { - "type": "string" - } - }, - "required": [ - "goal" - ], - "additionalProperties": false - } - }, - { - "type": "function", - "name": "get_shipping_eta", - "description": "Look up shipping ETA details for an order.", - "defer_loading": true, - "strict": false, - "parameters": { - "type": "object", - "properties": { - "order_id": { - "type": "string" - } - }, - "required": [ - "order_id" - ], - "additionalProperties": false - } - } -] diff --git a/crates/agentic-server-core/tests/tool_normalization_test.rs b/crates/agentic-server-core/tests/tool_normalization_test.rs index 5249c3d3..d108692f 100644 --- a/crates/agentic-server-core/tests/tool_normalization_test.rs +++ b/crates/agentic-server-core/tests/tool_normalization_test.rs @@ -17,7 +17,6 @@ use agentic_core::utils::common::serialize_to_string; const MULTI_TURN_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/cassettes/tool_calls/multi_turn"); const CODEX_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/cassettes/codex"); -const TOOL_SEARCH_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/cassettes/tool_search"); const CODEX_CASSETTES: &[&str] = &[ "codex-direct-vllm-http-custom-tool-Qwen-Qwen3.6-35B-A3B-streaming.yaml", @@ -505,43 +504,3 @@ fn web_search_preview_normalizes_to_gateway_function() { assert_eq!(tools[0].get("name").and_then(Value::as_str), Some("web_search")); assert_eq!(tools[0]["parameters"]["required"], serde_json::json!(["query"])); } - -#[test] -fn tool_search_gateway_cassette_normalizes_client_declaration_to_strict_function() { - let filename = "tool-search-gateway-Qwen-Qwen3.6-35B-A3B-streaming.yaml"; - let cassette = load_cassette_from(TOOL_SEARCH_DIR, filename); - assert_eq!(cassette.turns.len(), 1); - - let request = request_body_from_turn(&cassette.turns[0]); - let public_tools = request["tools"] - .as_array() - .expect("cassette request should declare tools"); - assert!( - public_tools.iter().any(|tool| { - tool["type"] == "tool_search" && tool["execution"] == "client" && tool.get("name").is_none() - }) - ); - - let payload: RequestPayload = serde_json::from_value(request).expect("cassette request should parse"); - let upstream = upstream_request_value(payload, true); - let upstream_tools = upstream["tools"] - .as_array() - .expect("upstream request should declare tools"); - assert!(!upstream_tools.iter().any(|tool| tool["type"] == "tool_search")); - - let search_fallbacks: Vec<_> = upstream_tools - .iter() - .filter(|tool| tool["name"] == "tool_search") - .collect(); - assert_eq!(search_fallbacks.len(), 1); - assert_eq!(search_fallbacks[0]["type"], "function"); - assert_eq!(search_fallbacks[0]["strict"], false); - - let deferred = upstream_tools - .iter() - .find(|tool| tool["name"] == "get_shipping_eta") - .expect("upstream request should preserve the deferred tool"); - assert_eq!(deferred["type"], "function"); - assert_eq!(deferred["strict"], false); - assert_eq!(deferred["defer_loading"], true); -}