Warn when a CLI model is absent from the ChatGPT model list (#60270)

## What changed

Show a startup warning when the active model matches the CLI model override but is missing from the ChatGPT model list, for ChatGPT accounts using the OpenAI provider. Suggest checking the spelling or choosing another model with `/model`, while preserving the selected model and submitting queued startup input.

Reuse the transcript-visible warning helper for this notice and existing usage warnings.

## Testing

Extend the startup test to check the warning text, preserved model selection, and queued input submission.

GitOrigin-RevId: bb1e8c415346bf271e25ef4e8571c13b4bc2c8c8
This commit is contained in:
Eric Traut
2026-11-08 17:17:51 +00:00
committed by copyberry
parent 748ab55ca7
commit a73fa8a869
5 changed files with 40 additions and 7 deletions
+1 -1
View File
@@ -393,7 +393,7 @@ impl ChatWidget {
if !warnings.is_empty() {
for warning in warnings {
self.add_to_history(history_cell::new_usage_warning_event(warning));
self.add_to_history(history_cell::new_visible_warning_event(warning));
}
self.request_redraw();
}