Update rmcp to 1.7.0 (#24763)

WIll make it easier to uprev when the new draft spec is supported.

Also updates reqwest where needed for compatibility but doesn't update
it everywhere since this is already a large diff.

The new version of rmcp handles certain kinds of authentication failures
differently, this patch includes support for identifying the failing scope
in a WWW-Authenticate header.
This commit is contained in:
Adam Perry @ OpenAI authored and GitHub committed 2026-05-27 14:52:06 -07:00
1 parent c57dee98b7
commit 910578792f
50 files changed
+982 -649

No files matched your search

+7 -12
View File
@@ -44,12 +44,10 @@ pub(crate) fn create_call_tool_result_with_thread_id(
"threadId": thread_id,
"content": content_text,
});
CallToolResult {
content,
is_error,
structured_content: Some(structured_content),
meta: None,
}
let mut result = CallToolResult::success(content);
result.is_error = is_error;
result.structured_content = Some(structured_content);
result
}
/// Run a complete Codex session and stream events back to the client.
@@ -71,12 +69,9 @@ pub async fn run_codex_tool_session(
} = match thread_manager.start_thread(config.clone()).await {
Ok(res) => res,
Err(e) => {
let result = CallToolResult {
content: vec![Content::text(format!("Failed to start Codex session: {e}"))],
is_error: Some(true),
structured_content: None,
meta: None,
};
let result = CallToolResult::error(vec![Content::text(format!(
"Failed to start Codex session: {e}"
))]);
outgoing.send_response(id.clone(), result).await;
return;
}