diff --git a/sgl-router/src/routers/grpc/harmony/builder.rs b/sgl-router/src/routers/grpc/harmony/builder.rs index 734e3168e..378242222 100644 --- a/sgl-router/src/routers/grpc/harmony/builder.rs +++ b/sgl-router/src/routers/grpc/harmony/builder.rs @@ -603,11 +603,11 @@ impl HarmonyBuilder { .iter() .rev() .find_map(|item| match item { - ResponseInputOutputItem::FunctionToolCall { id, name, .. } - if id == call_id => - { - Some(name.clone()) - } + ResponseInputOutputItem::FunctionToolCall { + call_id: item_call_id, + name, + .. + } if item_call_id == call_id => Some(name.clone()), _ => None, }) .ok_or_else(|| format!("No function call found for call_id: {}", call_id))?; diff --git a/sgl-router/src/routers/grpc/harmony/responses.rs b/sgl-router/src/routers/grpc/harmony/responses.rs index ae0aaf2de..4d87f04ea 100644 --- a/sgl-router/src/routers/grpc/harmony/responses.rs +++ b/sgl-router/src/routers/grpc/harmony/responses.rs @@ -1353,7 +1353,7 @@ fn build_next_request_with_tools( .. }) = items .iter_mut() - .find(|item| matches!(item, ResponseInputOutputItem::FunctionToolCall { id, .. } if id == &tool_result.call_id)) + .find(|item| matches!(item, ResponseInputOutputItem::FunctionToolCall { call_id, .. } if call_id == &tool_result.call_id)) { *output = Some(output_str); *status = if tool_result.is_error {