The LlmValidateModel function verifies that a model name
appears to be valid for the current session. Validation may be
performed using locally available information or by querying the
provider for a list of supported models. If the provider supports
returning model information, this function may perform a lookup to
confirm that the specified model name is recognized. This may
require a network request and can cause the function to block
while the model list is retrieved.
If the provider does not support returning model information, the
function only performs basic validation of the model name. For example,
it will check the name to ensure it does not contain any illegal
characters and uses a format that is common for most service
providers. This function is most commonly used with applications to
validate user input.
A successful return value from this function only indicates that
the model name is syntactically valid. It does not guarantee that the
selected service provider will accept or allow the model to be used. A
provider may reject a valid model name for several reasons, including
the model being unavailable for the current account, restricted to
specific subscription tiers, region-limited, deprecated, disabled by
administrative policy, or not supported by the endpoint being used.
Providers may also change model availability over time without notice.
Applications should be prepared to handle errors returned when
establishing a session or sending a request, even if the model name
was validated successfully.