mirror of
https://github.com/openai/codex.git
synced 2026-10-23 18:08:45 +00:00
Default durable threads to paginated history (#40677)
## What changed When `thread/start` omits `historyMode`, select `paginated` for durable threads whose store supports `thread/turns/list` and `thread/items/list`. Continue to default ephemeral threads and threads backed by stores without those APIs to `legacy`. Explicit `legacy` and `paginated` selections keep their existing behavior. ## Testing - Verify durable threads use paginated history with the local store. - Verify ephemeral threads and stores without history-list support use legacy history. GitOrigin-RevId: c94b6a3b522049d541da33c41618c4142370f1a7
This commit is contained in:
@@ -1415,6 +1415,10 @@ impl ThreadRequestProcessor {
|
||||
DynamicToolSpec::Namespace(namespace) => namespace.tools.len(),
|
||||
})
|
||||
.sum();
|
||||
let history_mode = history_mode.or_else(|| {
|
||||
(!config.ephemeral && thread_store.supports_paginated_history_lists())
|
||||
.then_some(ThreadHistoryMode::Paginated)
|
||||
});
|
||||
let mut thread_extension_init = ExtensionDataInit::new();
|
||||
if !selected_capability_roots.is_empty() {
|
||||
thread_extension_init.insert(selected_capability_roots);
|
||||
|
||||
Reference in New Issue
Block a user