fix(google): Fix 400 Bad Request error with Gemini 3 thought signatures (#6035)
Signed-off-by: rabi <ramishra@redhat.com>
This commit is contained in:
@@ -120,7 +120,7 @@ impl Agent {
|
||||
// User declined - update the specific response message for this request
|
||||
if let Some(response_msg) = request_to_response_map.get(&request.id) {
|
||||
let mut response = response_msg.lock().await;
|
||||
*response = response.clone().with_tool_response(
|
||||
*response = response.clone().with_tool_response_with_metadata(
|
||||
request.id.clone(),
|
||||
Ok(rmcp::model::CallToolResult {
|
||||
content: vec![Content::text(DECLINED_RESPONSE)],
|
||||
@@ -128,6 +128,7 @@ impl Agent {
|
||||
is_error: Some(true),
|
||||
meta: None,
|
||||
}),
|
||||
request.metadata.as_ref(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -155,7 +156,11 @@ impl Agent {
|
||||
|
||||
if let Some((id, result)) = self.tool_result_rx.lock().await.recv().await {
|
||||
let mut response = message_tool_response.lock().await;
|
||||
*response = response.clone().with_tool_response(id, result);
|
||||
*response = response.clone().with_tool_response_with_metadata(
|
||||
id,
|
||||
result,
|
||||
tool_request.metadata.as_ref(),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user