The LlmSetModelName function changes the model associated with
the client session. This affects subsequent requests and does not require
the client session 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 for the new model. If your application previously changed the model
flags by calling LlmSetModelFlags, those flags must be set again after
calling this function.
If the model name specified by the lpszModelName parameter is
the same as the current model name associated with the client session,
the function returns successfully without modifying the client state.
Model names are compared as literal string values and this function does
not attempt to resolve provider-specific aliases. For example,
"gpt-5-mini" and "gpt-5.4-mini" would be treated
as different model names even if the provider considers them equivalent
or aliases for the same underlying model.
Changing the model name does not modify or clear the current message
history. However, if conversation history is enabled, previous messages and
responses may be included with subsequent requests to the new model. Because
different models may interpret context differently, applications should
consider calling LlmClearHistory after changing models unless preserving
the previous conversation history is intentional.
This function cannot be called while another operation is in progress for
the client session.