mirror of
https://github.com/openai/codex.git
synced 2026-04-27 08:05:51 +00:00
fix: show user warning when using default fallback metadata (#11690)
### What It's currently unclear when the harness falls back to the default, generic `ModelInfo`. This happens when the `remote_models` feature is disabled or the model is truly unknown, and can lead to bad performance and issues in the harness. Add a user-facing warning when this happens so they are aware when their setup is broken. ### Tests Added tests, tested locally.
This commit is contained in:
@@ -74,7 +74,14 @@ async fn emits_warning_when_resumed_model_differs() {
|
||||
.expect("resume conversation");
|
||||
|
||||
// Assert: a Warning event is emitted describing the model mismatch.
|
||||
let warning = wait_for_event(&conversation, |ev| matches!(ev, EventMsg::Warning(_))).await;
|
||||
let warning = wait_for_event(&conversation, |ev| {
|
||||
matches!(
|
||||
ev,
|
||||
EventMsg::Warning(WarningEvent { message })
|
||||
if message.contains("previous-model") && message.contains("current-model")
|
||||
)
|
||||
})
|
||||
.await;
|
||||
let EventMsg::Warning(WarningEvent { message }) = warning else {
|
||||
panic!("expected warning event");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user