LlmGetModelInfo Function  
 
BOOL WINAPI LlmGetModelInfo(
  HCLIENT hClient,  
  LPCTSTR lpszModelName,  
  LPLLM_MODEL_INFO lpModelInfo  
);

The LlmGetModelInfo function returns information about a specific model for the current provider.

Parameters

hClient
A handle to the client session.
lpszModelName
A pointer to a null-terminated string that specifies the name of the model. This parameter may be NULL or an empty string, in which case information about the current model associated with the client session is returned.
lpModelInfo
A pointer to an LLM_MODEL_INFO structure that receives information about the model. This parameter cannot be NULL. The dwSize member of the structure must be initialized before calling this function.

Return Value

If the function succeeds, the return value is non-zero. If the function fails, the return value is zero. To get extended error information, call LlmGetLastError.

Remarks

The LlmGetModelInfo function retrieves detailed information about a model associated with the provider used by the client session. If a model name is specified, it must be valid for the current provider. If no model name is specified, the function returns information about the model currently associated with the session.

The lpModelInfo parameter must point to an LLM_MODEL_INFO structure whose dwSize member has been initialized to sizeof(LLM_MODEL_INFO). This enables the library to validate the structure version and maintain compatibility with future releases.

The information returned by this function includes the model identifier, provider, capability flags, status flags, token limits, context size, and optional metadata such as display name, owner, version, and creation date. Not all providers supply complete metadata for every model, and some values may be empty or unspecified.

Model capability and limit information should be treated as descriptive metadata rather than an absolute guarantee of behavior. Providers may change model availability, limits, or capabilities over time, and locally hosted models may allow some values, such as context size, to be configured outside of the application.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: csllmv12.lib
Unicode: Implemented as Unicode and ANSI versions

See Also

LlmEnumModels, LlmGetModelFlags, LlmGetModelContextSize, LLM_MODEL_INFO