mirror of
https://github.com/openai/codex.git
synced 2026-11-03 16:23:51 +00:00
feat: cache tokenizer (#6609)
This commit is contained in:
1 parent
63c8c01f40
commit
f17b392470
8 files changed
+112
-45
No files matched your search
@@ -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(),
|
||||
|
||||
Reference in new issue
Block a user