mirror of
https://github.com/openai/codex.git
synced 2026-04-29 17:06:51 +00:00
make model optional in config (#7769)
- Make Config.model optional and centralize default-selection logic in ModelsManager, including a default_model helper (with codex-auto-balanced when available) so sessions now carry an explicit chosen model separate from the base config. - Resolve `model` once in `core` and `tui` from config. Then store the state of it on other structs. - Move refreshing models to be before resolving the default model
This commit is contained in:
@@ -487,9 +487,13 @@ async fn stdio_image_completions_round_trip() -> anyhow::Result<()> {
|
||||
|
||||
// Chat Completions assertion: the second POST should include a tool role message
|
||||
// with an array `content` containing an item with the expected data URL.
|
||||
let requests = server.received_requests().await.expect("requests captured");
|
||||
let all_requests = server.received_requests().await.expect("requests captured");
|
||||
let requests: Vec<_> = all_requests
|
||||
.iter()
|
||||
.filter(|req| req.method == "POST" && req.url.path().ends_with("/chat/completions"))
|
||||
.collect();
|
||||
assert!(requests.len() >= 2, "expected two chat completion calls");
|
||||
let second = &requests[1];
|
||||
let second = requests[1];
|
||||
let body: Value = serde_json::from_slice(&second.body)?;
|
||||
let messages = body
|
||||
.get("messages")
|
||||
|
||||
Reference in New Issue
Block a user