LlmGetModelFlags Function  
 
BOOL WINAPI LlmGetModelFlags(
  HCLIENT hClient,  
  LPDWORD lpdwFlags  
);

The LlmGetModelFlags function returns the flags associated with the current model.

Parameters

hClient
A handle to the client session.
lpdwFlags
A pointer to an unsigned integer which may have one or more bit flags set when the function returns. If there are no capabilities defined for the provider, this value will be set to LLM_MODEL_FLAG_NONE. This parameter cannot be NULL and the value does not need to be initialized by the caller.
ConstantDescription
LLM_MODEL_FLAG_NONENo model capabilities defined
LLM_MODEL_FLAG_CHATSupports conversational text generation
LLM_MODEL_FLAG_SYSTEM_ROLEAccepts a system role message in the input
LLM_MODEL_FLAG_STREAMINGSupports streaming responses
LLM_MODEL_FLAG_STRUCTUREDSupports structured output (e.g., JSON or schema)
LLM_MODEL_FLAG_VISIONSupports image inputs (multimodal)
LLM_MODEL_FLAG_TOOLSSupports tool or function calling
LLM_MODEL_FLAG_REASONINGSupports reasoning-oriented generation
LLM_MODEL_FLAG_RESPONSESSupports the Responses API (unified endpoint)
LLM_MODEL_FLAG_FUNCTIONSSupports OpenAI-style function calling with schemas
LLM_MODEL_FLAG_AUDIOSupports audio output (text-to-speech)
LLM_MODEL_FLAG_IMAGESupports image generation
LLM_MODEL_FLAG_VIDEOSupports video generation
LLM_MODEL_FLAG_TRANSCRIPTIONSupports speech-to-text transcription
LLM_MODEL_FLAG_INSTRUCTIONSSupports a dedicated instruction field outside message lists
LLM_MODEL_FLAG_MAX_COMPLETION_TOKENSUses max_completion_tokens instead of max_tokens in requests
LLM_MODEL_FLAG_INFERREDCapabilities are inferred rather than explicitly defined

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 LlmGetModelFlags function returns a set of bit flags that describe the capabilities supported by the current model associated with the client session. These flags can be used by applications to determine which features are available and adjust behavior accordingly.

Model capabilities may vary between providers and even between models offered by the same provider. Not all providers return complete capability information when enumerating models. In these cases, some flags may be inferred by the library based on the model name and known characteristics of the provider.

Because capability information may be incomplete or inferred, applications should treat these flags as guidance rather than absolute guarantees of behavior. The provider ultimately determines which features are supported and how they are implemented.

The value returned in the lpdwFlags parameter is a bitmask and may contain multiple flags combined using a bitwise OR operation. If no capabilities are defined or available for the model, the value will be set to LLM_MODEL_FLAG_NONE. In practice, most supported models provide at least basic conversational capabilities, so a value of zero is uncommon and typically indicates that capability information is not available or could not be determined.

In some cases, capability information may be incomplete or inferred. If necessary, applications can override the detected capabilities using the LlmSetModelFlags function. This can be useful when working with providers or models that require specific options which are not automatically detected. In general, applications should rely on the default capability detection unless a specific compatibility issue is encountered.

Some flags may be reserved for internal use or represent provider-specific capabilities. Applications should not rely on undocumented flag values and should only test for defined LLM_MODEL_FLAG constants.

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

See Also

LlmEnumModels, LlmGetModelContextSize, LlmGetModelInfo, LlmGetModelName, LlmSetModelFlags