Class CapiSessionOptions
WebSocket transport is the default for the CAPI Responses API whenever the
model advertises the ws:/responses endpoint. Setting
setEnableWebSocketResponses(Boolean) to false forces the
HTTP Responses transport instead, which is useful for users behind proxies
where WebSockets fail. This is equivalent to setting the
COPILOT_CLI_DISABLE_WEBSOCKET_RESPONSES environment variable.
These options are scoped under the capi namespace because a single
session can host multiple providers (for example, CAPI and BYOK), so
transport choice is provider-level rather than top-level session state. All
setter methods return this for method chaining.
- Since:
- 1.5.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets whether CAPI Responses API WebSocket transport is enabled.setEnableWebSocketResponses(Boolean enableWebSocketResponses) Sets whether to use CAPI Responses API WebSocket transport.
-
Constructor Details
-
CapiSessionOptions
public CapiSessionOptions()
-
-
Method Details
-
getEnableWebSocketResponses
Gets whether CAPI Responses API WebSocket transport is enabled.- Returns:
falseto force the HTTP Responses transport,trueto explicitly use WebSocket transport, ornullto use the default behavior
-
setEnableWebSocketResponses
Sets whether to use CAPI Responses API WebSocket transport.WebSocket transport is the default for the CAPI Responses API whenever the model advertises the
ws:/responsesendpoint. Set this tofalseto force the HTTP Responses transport instead, which is useful for users behind proxies where WebSockets fail. This is equivalent to setting theCOPILOT_CLI_DISABLE_WEBSOCKET_RESPONSESenvironment variable.- Parameters:
enableWebSocketResponses-falseto force the HTTP Responses transport- Returns:
- this config for method chaining
-