LlmGetDefaultModelFlags Function  
 
BOOL WINAPI LlmGetDefaultModelFlags(
  DWORD dwProviderId  
  LPCTSTR lpszModelName,  
  LPDWORD lpdwFlags  
);

The LlmGetDefaultModelFlags function returns the default capability flags for the specified model.

Parameters

dwProviderId
The identifier of the provider associated with the model.
lpszModelName
A null-terminated string which contains the name of the new model. If this parameter is NULL or a zero-length string, the default model for the specified provider will be used.
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 specified model, 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 LlmGetDefaultModelFlags function returns the default capability flags for a model associated with the specified provider. If the model name is recognized, the library will return the inferred capabilities associated with that model. If the model name is not recognized, the dwFlags parameter will return LLM_MODEL_FLAG_NONE.

This function does not require the application to be connected to a service provider. These capabilities are inferred from an internal table of recognized models and may not always reflect the current behavior of a provider, particularly when providers update, rename or replace models. The LlmGetModelFlags function can be used to determine the capabilities of the model that was selected when a connection was established with a provider.

Because the capability flags are derived from the model name rather than explicitly provided by the service provider, the LLM_MODEL_FLAG_INFERRED flag will be set for recognized models.

To obtain the name of the default model the library uses for a specific provider, call the LlmGetDefaultModelName function.

Example

DWORD dwProviderId = LLM_PROVIDER_OPENAI;
TCHAR szModelName[LLM_MODEL_NAMELEN] = _T("");

if (LlmGetDefaultModelName(dwProviderId, szModelName, _countof(szModelName)) > 0)
{
    DWORD dwFlags = LLM_MODEL_FLAG_NONE;

    if (LlmGetDefaultModelFlags(dwProviderId, szModelName, &dwFlags))
    {
        if (dwFlags & LLM_MODEL_FLAG_REASONING)
            _tprintf(_T("The %s model has reasoning capability\n"), szModelName);
    }
    else
    {
        DWORD dwError = LlmGetLastError();
       _tprintf(_T("Unable to retrieve default model flags, error 0x%08lx\n"), dwError);
    }
}

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, LlmGetDefaultModelName, LlmGetModelInfo, LlmValidateModel