#[non_exhaustive]pub struct CapiSessionOptions {
pub enable_web_socket_responses: Option<bool>,
}Expand description
Provider-scoped Copilot API (CAPI) session options.
WebSocket transport is the default for the CAPI Responses API whenever
the model advertises the ws:/responses endpoint. Set
enable_web_socket_responses to
false to force the HTTP Responses transport instead, which is useful
for users behind proxies where WebSockets fail.
Setting it to false is equivalent to setting the
COPILOT_CLI_DISABLE_WEBSOCKET_RESPONSES environment variable. The option
is scoped under the capi namespace because a single session can host
multiple providers, so transport choice is provider-level.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.enable_web_socket_responses: Option<bool>Whether to use WebSocket transport for CAPI Responses API calls.
When Some(false), the runtime uses HTTP Responses transport even if
the selected model advertises ws:/responses. When unset, the runtime
default applies (WebSocket transport when advertised).
Implementations§
Source§impl CapiSessionOptions
impl CapiSessionOptions
Sourcepub fn with_enable_web_socket_responses(self, enable: bool) -> Self
pub fn with_enable_web_socket_responses(self, enable: bool) -> Self
Set whether to use WebSocket transport for CAPI Responses API calls.
Trait Implementations§
Source§impl Clone for CapiSessionOptions
impl Clone for CapiSessionOptions
Source§fn clone(&self) -> CapiSessionOptions
fn clone(&self) -> CapiSessionOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more