Class SessionModelApi
model namespace.- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionManaged, repository, and CLI model overrides to overlay onto the session at startup.Identifies the target session.list()Optional listing options.list(SessionModelListParams params) Optional listing options.Host-supplied exact model selection IDs to allow for this running session.Reasoning effort level to apply to the currently selected model.An Auto preference request for the session.switchTo(SessionModelSwitchToParams params) Target model identifier and optional reasoning effort, summary, capability overrides, and context tier.
-
Method Details
-
getCurrent
Identifies the target session.- Since:
- 1.0.0
-
switchTo
@CopilotExperimental public CompletableFuture<SessionModelSwitchToResult> switchTo(SessionModelSwitchToParams params) Target model identifier and optional reasoning effort, summary, capability overrides, and context tier.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
switchAutoTier
@CopilotExperimental public CompletableFuture<SessionModelSwitchAutoTierResult> switchAutoTier(SessionModelSwitchAutoTierParams params) An Auto preference request for the session. This updates Auto configuration only; it does not change the selected model to `auto`.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
applyStartupOverlay
@CopilotExperimental public CompletableFuture<SessionModelApplyStartupOverlayResult> applyStartupOverlay(SessionModelApplyStartupOverlayParams params) Managed, repository, and CLI model overrides to overlay onto the session at startup.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
setAllowedModels
@CopilotExperimental public CompletableFuture<SessionModelSetAllowedModelsResult> setAllowedModels(SessionModelSetAllowedModelsParams params) Host-supplied exact model selection IDs to allow for this running session. CAPI IDs are intersected with repository `.github/allowed_models.txt` policy; provider-qualified IDs remain exempt from repository-only policy but are restricted by this host list. Omit or pass null to clear the host restriction; an explicit empty or disjoint list is rejected. Validation and pre-selection fallback failures preserve the previous restriction. Failures after a fallback selection commits retain the new restriction and selected model; callers should inspect current session state after such an error.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
setReasoningEffort
@CopilotExperimental public CompletableFuture<SessionModelSetReasoningEffortResult> setReasoningEffort(SessionModelSetReasoningEffortParams params) Reasoning effort level to apply to the currently selected model.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
list
Optional listing options.Invokes the method with no params, applying the runtime defaults.
- Since:
- 1.0.0
-
list
@CopilotExperimental public CompletableFuture<SessionModelListResult> list(SessionModelListParams params) Optional listing options.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-