Responses: set x-client-request-id as convesration_id when talking to responses (#14312)

Right now we're sending the header session_id to responses which is
ignored/dropped. This sets a useful x-client-request-id to the
conversation_id.
This commit is contained in:
Channing Conger
2026-03-10 23:46:05 -07:00
committed by GitHub
parent 78280f872a
commit 2cfa106091
3 changed files with 15 additions and 3 deletions

View File

@@ -75,6 +75,9 @@ impl<T: HttpTransport, A: AuthProvider> ResponsesClient<T, A> {
}
let mut headers = extra_headers;
if let Some(ref conv_id) = conversation_id {
insert_header(&mut headers, "x-client-request-id", conv_id);
}
headers.extend(build_conversation_headers(conversation_id));
if let Some(subagent) = subagent_header(&session_source) {
insert_header(&mut headers, "x-openai-subagent", &subagent);