sdk_feature: Get Feature Flag

View source: R/compat.R

sdk_featureR Documentation

Get Feature Flag

Description

Get the current value of a feature flag.

Usage

sdk_feature(flag, default = NULL)

Arguments

flag

Name of the feature flag.

default

Default value if flag not set.

Value

The flag value.

Examples


if (interactive()) {
# Check if shared session is enabled
if (sdk_feature("use_shared_session")) {
  session <- create_shared_session(model = "openai:gpt-4o")
}
} else {
  session <- create_chat_session(model = "openai:gpt-4o")
}


aisdk documentation built on May 29, 2026, 9:07 a.m.