| 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.
| Constant | 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_INFERRED | Capabilities 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
|