The LlmSetClientOptions function replaces the current option
flags for the client session. These flags control how the client
establishes connections and sends requests to the service provider.
Applications should use care when changing options that affect the
underlying connection, such as LLM_OPTION_SECURE or LLM_OPTION_PROXY.
Changing these options may require the client to establish a new
connection using different settings.
The LLM_OPTION_SECURE option forces the client to use HTTPS when
communicating with the provider. This is appropriate for public API
providers, but may not be supported by locally hosted providers such as
LM Studio or Ollama. Attempting to force a secure connection to a
provider that does not support HTTPS will cause the connection to fail.
The LLM_OPTION_PROXY option causes the client to use the configured
proxy settings when connecting to the provider. This may be required in
managed or corporate network environments, but should not be enabled
unless proxy support is actually needed.
The LLM_OPTION_NOUSERAGENT option does not make requests anonymous.
The provider may still identify the client based on authentication
credentials, IP address information, request patterns, or other HTTP headers
included with the request. For more information, refer to the
LlmSetUserAgent method.
Setting or clearing the LLM_OPTION_NOCACHE option changes whether
provider and model metadata may be cached. Applications can also use
the LlmSetCacheTime function to control caching behavior in
seconds.