mirror of
https://github.com/openai/codex.git
synced 2026-11-19 22:30:42 +00:00
Add per-turn prompt cache TTL options (#59480)
## What changed - Expose `PromptCacheTtl` through `TurnStartOptions` and `RecoverTurnRequest`, supporting `30m` and `12h` minimum cache lifetimes. - Carry the selected TTL through turn execution and compaction into `prompt_cache_options.ttl` on Responses HTTP and WebSocket requests. Omit the field when unset and keep the selection scoped to the turn. - Include prompt cache options in WebSocket request reuse checks. ## Testing Add coverage for both TTL values and omission on a subsequent turn without an override, and extend WebSocket serialization coverage to include prompt cache options. GitOrigin-RevId: 8529306e6ad6030fe77c5e6bf19f3810717c0c5e
This commit is contained in:
@@ -609,9 +609,11 @@ impl CodexThread {
|
||||
turn_id,
|
||||
thread_settings,
|
||||
trace,
|
||||
prompt_cache_ttl,
|
||||
cyber_access_program,
|
||||
} = request;
|
||||
let start_options = TurnStartOptions {
|
||||
prompt_cache_ttl,
|
||||
cyber_access_program,
|
||||
..self.session.recovered_turn_start_options(&turn_id).await
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user