feat(codex): add dynamic CLI client profile

This commit is contained in:
AAEE86
2026-09-23 15:57:37 +08:00
parent 2a9d8d3b25
commit 7e033d0571
20 changed files with 707 additions and 61 deletions
+9
View File
@@ -53,6 +53,7 @@ use super::super::router::RequestAdmissionError;
use super::super::{control::GatewayControlDecision, error::GatewayError};
use super::super::{provider_transport, usage};
use crate::codex_profile::spawn_worker as spawn_codex_client_profile_worker;
use crate::maintenance::spawn_account_self_check_worker;
use crate::maintenance::spawn_audit_cleanup_worker;
use crate::maintenance::spawn_db_maintenance_worker;
@@ -148,6 +149,10 @@ fn system_config_key_affects_provider_transport_snapshot(key: &str) -> bool {
}
impl AppState {
pub async fn prewarm_codex_client_profile(&self) -> Result<String, String> {
crate::codex_profile::prewarm(self.runtime_state()).await
}
pub async fn prewarm_chat_pii_redaction_runtime_config(&self) -> Result<bool, String> {
crate::privacy::read_chat_pii_redaction_runtime_config(self)
.await
@@ -2332,6 +2337,10 @@ impl AppState {
crate::task_runtime::TASK_KEY_MODEL_FETCH_WORKER,
spawn_model_fetch_worker(background_state.clone()),
);
supervise_worker(
crate::task_runtime::TASK_KEY_CODEX_CLIENT_PROFILE,
Some(spawn_codex_client_profile_worker(background_state.clone())),
);
supervise_worker(
crate::task_runtime::TASK_KEY_VIDEO_TASK_POLLER,
spawn_video_task_poller(background_state.clone()),