feat: cache tokenizer (#6609)

This commit is contained in:
jif-oai authored and GitHub committed 2025-11-14 17:05:00 +01:00
1 parent 63c8c01f40
commit f17b392470
8 files changed
+112 -45

No files matched your search

+4
View File
@@ -133,6 +133,7 @@ use codex_protocol::protocol::InitialHistory;
use codex_protocol::user_input::UserInput;
use codex_utils_readiness::Readiness;
use codex_utils_readiness::ReadinessFlag;
use codex_utils_tokenizer::warm_model_cache;
/// The high-level interface to the Codex system.
/// It operates as a queue pair where you send submissions and receive events.
@@ -590,6 +591,9 @@ impl Session {
// Create the mutable state for the Session.
let state = SessionState::new(session_configuration.clone());
// Warm the tokenizer cache for the session model without blocking startup.
warm_model_cache(&session_configuration.model);
let services = SessionServices {
mcp_connection_manager,
unified_exec_manager: UnifiedExecSessionManager::default(),