Send prompt_cache_key (#2200)

To optimize prompt caching performance.
This commit is contained in:
pakrym-oai
2025-08-11 16:37:45 -07:00
committed by GitHub
parent 6220e8ac2e
commit 6a6bf99e2c
2 changed files with 3 additions and 0 deletions

View File

@@ -169,6 +169,7 @@ impl ModelClient {
store,
stream: true,
include,
prompt_cache_key: Some(self.session_id.to_string()),
};
let mut attempt = 0;

View File

@@ -215,6 +215,8 @@ pub(crate) struct ResponsesApiRequest<'a> {
pub(crate) store: bool,
pub(crate) stream: bool,
pub(crate) include: Vec<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) prompt_cache_key: Option<String>,
}
pub(crate) fn create_reasoning_param_for_request(