Options Property  
 

Returns or sets the connection and session options used by the control.

Syntax

object.Options [= value ]

Remarks

The Options property is an Integer value which specifies one or more option flags. The property value is created by combining one or more of the following values using a bitwise Or operation:

Constant Value Description
llmOptionNone 0 A standard connection to the server is established using the default behavior for the selected provider. No additional options are enabled, and the connection will use the provider's default protocol, caching behavior, and request headers.
llmOptionNoCache &H1 Disables provider and model metadata caching for the client session. When this option is specified, the control will not reuse cached metadata, and provider or model information will be retrieved from the server each time it is required. This may be useful when testing or when current data is required.
llmOptionKeepAlive &H2 Enables persistent HTTP connections using the keep-alive mechanism. When enabled, the underlying HTTP connection may be reused for multiple requests, reducing connection overhead and improving performance. If this option is not specified, the connection may be closed after each request.
llmOptionProxy &H8 Specifies that the connection should be made using the current Windows proxy server configuration. If the user does not have a proxy server configuration, this option is ignored. This option is typically used in environments where direct internet access is restricted.
llmOptionNoUserAgent &H20 Prevents the control from sending a User-Agent header with requests to the provider. By default, a User-Agent string is included to identify the client. This option may be used when a provider does not require a User-Agent header.
llmOptionSecure &H1000 Forces the use of a secure HTTPS connection when communicating with the provider. If the specified base URL or provider default would normally use an insecure protocol, the connection will be upgraded to HTTPS. Connections to providers such as OpenAI, Google and Anthropic will always use secure connections.
llmOptionDefault llmOptionNone Specifies the default option set, which is equivalent to llmOptionNone. No additional flags are enabled and the connection uses standard behavior.

Setting the Options property changes the current option flags for the current 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 llmOptionSecure or llmOptionProxy. Changing these options while there is an active connection may result in unexpected errors. The client may need to establish a new connection using updated settings.

The llmOptionSecure 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 llmOptionProxy option causes the client to use the configured Windows proxy settings when connecting to the provider. This may be required in managed or corporate network environments, but should generally only be enabled when proxy support is actually required.

The llmOptionNoUserAgent option does not make requests anonymously. 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 UserAgent property.

Setting or clearing the llmOptionNoCache option changes whether provider and model metadata may be cached. Applications can also set the CacheTime property to control caching behavior.

Data Type

Integer (Int32)

See Also

BaseUrl Property, CacheTime Property, IdleTime Property, KeepAlive Property, Secure Property, Timeout Property, UserAgent Property, Connect Method