If the function succeeds, the return value is the number of
characters copied into the string buffer, not including the
terminating null character. If the function fails, the return
value is zero. To get extended error information, call
LlmGetLastError.
The LlmGetModelName function returns the model name currently
associated with the client session. This is the model that will be used for
subsequent requests unless it is changed by calling LlmSetModelName.
The model name is stored as part of the session state and does not require
the client session to be disconnected and reconnected.
The returned model name may have been specified when the session was
created, selected automatically from the provider defaults, or changed by a
previous call to LlmSetModelName. If no valid model name is currently
associated with the session, the function will fail.
Changing the model name only affects subsequent requests. It does not
modify any messages or responses already stored in the client history, and
it does not validate that the model exists or is available from the current
provider. To enumerate or validate model names, use functions such as
LlmEnumModels, LlmGetModelInfo, or LlmValidateModel.