model property

String get model

Model requested for a turn that does not pass its own SendOptions to send — see send's doc comment for the exact precedence rule.

Settable: assigning a new value does not touch messages or the underlying session, so switching models mid-conversation keeps the transcript and the server-side conversation_id intact — only later turns pick up the new model. The setter throws StateError while isStreaming is true; see its own doc comment for why.

Implementation

String get model => _model;
set model (String value)

Implementation

set model(String value) {
  _guardAgainstStreamingMutation('model');
  _model = value;
  notifyListeners();
}