ModelName Property  
 

Sets or returns the name of the current model used for requests.

Syntax

object.ModelName [= value ]

Remarks

The ModelName property returns the name of the current model. If this property is changed while there is an active connection, it changes the model associated with the client session. Subsequent requests will use the new model and the client session does not need to be disconnected and reconnected.

The specified model name must be supported by the current provider. When the model name is changed, the internal model flags are reset to the default flags associated with the new model. If your application previously changed the model flags by setting the ModelFlags property, those flags must be set again after changing this property value.

The control does not attempt to resolve provider-specific aliases. For example, "gpt-5-mini" and "gpt-5.4-mini" would be considered different model names even if the provider considers them equivalent or aliases for the same underlying model.

If you set the value of this property to an empty string, the ModelName and ModelFlags properties will revert to the default values for the provider specified by the Provider property. If the current provider does not define a default model, this may result in an error indicating that a model name is required.

Changing the model name does not modify or clear the current message history. However, if conversation history is enabled, previous prompts and responses may still be included with subsequent requests sent to the new model. Because different models may interpret context differently, applications should consider calling ClearHistory after changing models unless preserving the existing conversation history is intentional.

Data Type

String

See Also

DefaultModel Property, HistorySize Property, ModelFlags Property, Provider Property, ProviderName Property, ClearHistory Method, Connect Method