currentOptions property

SendOptions get currentOptions

The SendOptions a call to send that omits its own options argument would build for the next turn: SendOptions(model: model, webSearch: webSearch), read fresh from this controller's current model and webSearch every time this getter is read (not cached), so it reflects a setter call made moments — or a frame — earlier.

This is the required starting point for a one-off per-turn override, specifically to avoid the footgun send's own doc comment warns about: because an explicit SendOptions passed to send is used verbatim, building one from scratch — const SendOptions(canvas: true) — silently sends model: 'auto' (SendOptions' own default) even while a model picker bound to model still shows something else selected, with nothing surfacing the mismatch: ModelDowngraded compares the requested model against the answering one, so a self-inflicted 'auto' substitution here looks exactly like a correct request for 'auto'. Start from this getter instead: controller.send(text, options: controller.currentOptions.copyWith(canvas: true)) changes only canvas for that turn and keeps whatever model is actually selected.

Implementation

SendOptions get currentOptions =>
    SendOptions(model: _model, webSearch: _webSearch);