mirror of
https://github.com/openai/codex.git
synced 2026-05-29 23:40:29 +00:00
push
This commit is contained in:
@@ -91,7 +91,7 @@ impl<T: HttpTransport> ResponsesClient<T> {
|
||||
if let Some(ref thread_id) = thread_id {
|
||||
insert_header(&mut headers, "x-client-request-id", thread_id);
|
||||
}
|
||||
headers.extend(build_session_headers(session_id));
|
||||
headers.extend(build_session_headers(session_id, thread_id));
|
||||
if let Some(subagent) = subagent_header(&session_source) {
|
||||
insert_header(&mut headers, "x-openai-subagent", &subagent);
|
||||
}
|
||||
|
||||
@@ -2,11 +2,14 @@ use codex_protocol::protocol::SessionSource;
|
||||
use http::HeaderMap;
|
||||
use http::HeaderValue;
|
||||
|
||||
pub fn build_session_headers(session_id: Option<String>) -> HeaderMap {
|
||||
pub fn build_session_headers(session_id: Option<String>, thread_id: Option<String>) -> HeaderMap {
|
||||
let mut headers = HeaderMap::new();
|
||||
if let Some(id) = session_id {
|
||||
insert_header(&mut headers, "session_id", &id);
|
||||
}
|
||||
if let Some(id) = thread_id {
|
||||
insert_header(&mut headers, "thread_id", &id);
|
||||
}
|
||||
headers
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user