mirror of
https://github.com/openai/codex.git
synced 2026-11-20 07:06:24 +00:00
Use server model defaults for fresh TUI startup (#43177)
## Why Fresh startup could use saved client model and reasoning settings that differ from the app server's effective configuration. A cleared server model could also leave startup using a stale client model from bootstrap. ## What changed - Reuse the new-session defaults reader at startup to load `model` and `model_reasoning_effort` through `config/read` before `thread/start`, using the appropriate embedded or remote working directory. - Preserve explicit CLI and selected-profile settings, then apply managed new-thread defaults with the existing precedence rules. - When the server has no configured model, select the startup model from its model catalog, falling back to the bootstrap default if the catalog is empty. - Fall back to local defaults when older servers do not support `config/read`; stop startup before thread creation on other read failures. ## Testing Add request-level tests for defaults and override precedence, working-directory selection, cleared-model fallback, request ordering, unsupported servers, and read failures. GitOrigin-RevId: e094ba5d5501fdb34c393a0117b34dd93d8d4f2b
This commit is contained in:
1 parent
6af345407d
commit
9587c9ef36
6 files changed
+581
-53
No files matched your search
@@ -42,6 +42,12 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn quiet_startup_test_pump() -> StartupDraftPump {
|
||||
let mut pump = startup_test_pump(std::iter::empty());
|
||||
pump.events = Box::pin(futures::stream::pending());
|
||||
pump
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn startup_draft_renders_full_empty_and_multiline_composer_frames() {
|
||||
let mut pump = startup_test_pump(std::iter::empty());
|
||||
|
||||
Reference in new issue
Block a user