mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Expose model settings in app-server thread metadata (#42151)
## What changed - Add nullable `model` and `reasoningEffort` fields to the shared app-server `Thread` object and generated schemas. - Report current settings for loaded threads and the latest persisted settings for unloaded threads across thread read, list, start, resume, rollback, metadata update, and notification paths. - Keep unavailable legacy or filesystem-only settings nullable, and allow metadata reads without loading a thread or dispatching queued work. ## Testing - Cover live-setting precedence, persisted settings after restart, null legacy values, and model metadata returned by thread lifecycle operations. GitOrigin-RevId: 22ebe8a8d1910a820d90a97730d812a00d8c1372
This commit is contained in:
1 parent
6b59cefcbb
commit
986ff1cc7c
50 files changed
+633
-33
No files matched your search
@@ -3,6 +3,7 @@ use crate::error_code::invalid_request;
|
||||
use crate::notification_media::without_notification_media;
|
||||
use crate::outgoing_message::ClientRequestResult;
|
||||
use crate::outgoing_message::ThreadScopedOutgoingMessageSender;
|
||||
use crate::request_processors::apply_live_model_settings;
|
||||
use crate::request_processors::populate_thread_turns_from_history;
|
||||
use crate::request_processors::thread_from_stored_thread;
|
||||
use crate::request_processors::thread_settings_from_config_snapshot;
|
||||
@@ -1245,7 +1246,7 @@ pub(crate) async fn apply_bespoke_event_handling(
|
||||
return;
|
||||
}
|
||||
};
|
||||
let fallback_cwd = conversation.config_snapshot().await.cwd().clone();
|
||||
let config_snapshot = conversation.config_snapshot().await;
|
||||
let stored_thread = match conversation
|
||||
.read_thread(
|
||||
/*include_archived*/ true, /*include_history*/ true,
|
||||
@@ -1268,11 +1269,11 @@ pub(crate) async fn apply_bespoke_event_handling(
|
||||
let loaded_status = thread_watch_manager
|
||||
.loaded_status_for_thread(&conversation_id.to_string())
|
||||
.await;
|
||||
let response = match thread_rollback_response_from_stored_thread(
|
||||
let mut response = match thread_rollback_response_from_stored_thread(
|
||||
stored_thread,
|
||||
conversation.session_configured().session_id.to_string(),
|
||||
fallback_model_provider.as_str(),
|
||||
&fallback_cwd,
|
||||
config_snapshot.cwd(),
|
||||
loaded_status,
|
||||
) {
|
||||
Ok(response) => response,
|
||||
@@ -1284,6 +1285,7 @@ pub(crate) async fn apply_bespoke_event_handling(
|
||||
}
|
||||
};
|
||||
|
||||
apply_live_model_settings(&mut response.thread, &config_snapshot);
|
||||
outgoing.send_response(request_id, response).await;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user