CLlmClient::GetModelFlags Method  
 
BOOL GetModelFlags(
  LPDWORD lpdwFlags  
);

The GetModelFlags method returns the flags associated with the current model.

Parameters

lpdwFlags
A pointer to an unsigned integer which may have one or more bit flags set when the method 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.
Name Description
LLM_MODEL_FLAG_NONE No model capabilities defined
LLM_MODEL_FLAG_CHAT Supports conversational text generation
LLM_MODEL_FLAG_SYSTEM_ROLE Accepts a system role message in the input
LLM_MODEL_FLAG_STREAMING Supports streaming responses
LLM_MODEL_FLAG_STRUCTURED Supports structured output (e.g., JSON or schema)
LLM_MODEL_FLAG_VISION Supports image inputs (multimodal)
LLM_MODEL_FLAG_TOOLS Supports tool or function calling
LLM_MODEL_FLAG_REASONING Supports reasoning-oriented generation
LLM_MODEL_FLAG_RESPONSES Supports the Responses API (unified endpoint)
LLM_MODEL_FLAG_FUNCTIONS Supports OpenAI-style function calling with schemas
LLM_MODEL_FLAG_AUDIO Supports audio output (text-to-speech)
LLM_MODEL_FLAG_IMAGE Supports image generation
LLM_MODEL_FLAG_VIDEO Supports video generation
LLM_MODEL_FLAG_TRANSCRIPTION Supports speech-to-text transcription
LLM_MODEL_FLAG_INSTRUCTIONS Supports a dedicated instruction field outside message lists
LLM_MODEL_FLAG_MAX_COMPLETION_TOKENS Uses max_completion_tokens instead of max_tokens in requests
LLM_MODEL_FLAG_IGNORE_TUNING Model should not use explicit sampling and penalty parameters
LLM_MODEL_FLAG_INFERRED Capabilities are inferred rather than explicitly defined

Return Value

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

Remarks

The GetModelFlags method 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.

If the LLM_MODEL_FLAG_IGNORE_TUNING flag is set, requests will omit explicit model-tuning parameters, including temperature, top-p, top-k, frequency penalty, and presence penalty. The model will instead use its provider-defined defaults. This flag is automatically set for models that do not support explicit tuning parameters, including current Anthropic and OpenAI models such as Claude Sonnet 5 and GPT-5.6 Sol. Clearing this flag using SetModelFlags may cause requests to fail if the selected model does not support explicit tuning parameters; for example, some Anthropic models return an HTTP 400 error when non-default tuning values are specified.

In some cases, capability information may be incomplete or inferred. If necessary, applications can override the detected capabilities using the SetModelFlags method. 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