Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 65 additions & 2 deletions nodejs/src/generated/rpc.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

129 changes: 128 additions & 1 deletion rust/src/generated/api_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10077,6 +10077,23 @@ pub struct ModelCapabilitiesOverride {
pub supports: Option<ModelCapabilitiesOverrideSupports>,
}

/// Acknowledges how the runtime resolved a server-level model list.
///
/// <div class="warning">
///
/// **Experimental.** This type is part of an experimental wire-protocol surface
/// and may change or be removed in future SDK or CLI releases.
///
/// </div>
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ModelsListResolution {
/// Version of the applied pre-session context contract.
pub context_version: i32,
/// Resolution mode applied by the runtime.
pub mode: ModelsListResolutionMode,
}

/// List of Copilot models available to the resolved user, including capabilities and billing metadata.
///
/// <div class="warning">
Expand All @@ -10090,6 +10107,9 @@ pub struct ModelCapabilitiesOverride {
pub struct ModelList {
/// List of available models with full metadata
pub models: Vec<Model>,
/// Present only when the runtime applied a pre-session resolution context.
#[serde(skip_serializing_if = "Option::is_none")]
pub resolution: Option<ModelsListResolution>,
}

/// Optional listing options.
Expand Down Expand Up @@ -10178,7 +10198,35 @@ pub struct ModelSetReasoningEffortResult {
pub reasoning_effort: String,
}

/// Optional opaque account selection or compatibility GitHub token used to list models.
/// Ordinary session inputs used to resolve a selectable model snapshot before session creation. Version 1 is limited to local, top-level, Copilot-backed sessions.
///
/// <div class="warning">
///
/// **Experimental.** This type is part of an experimental wire-protocol surface
/// and may change or be removed in future SDK or CLI releases.
///
/// </div>
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ModelsListPreSessionContext {
/// Whether the subsequent top-level session will enable experimental mode.
pub enable_experimental_mode: bool,
/// Execution environment being planned. Version 1 accepts only `local`.
pub execution_environment: ModelsListExecutionEnvironment,
/// Existing ExP assignment response supplied using the same ordinary session input as `session.create`. The runtime interprets assignments; callers must not submit resolved feature or kill-switch claims.
#[serde(skip_serializing_if = "Option::is_none")]
pub exp_assignments: Option<serde_json::Value>,
/// Model backend being planned. Version 1 accepts only `copilot`.
pub model_backend: ModelsListModelBackend,
/// Session kind being planned. Version 1 accepts only `top-level`.
pub session_kind: ModelsListSessionKind,
/// Pre-session context contract version. Version 1 is the only supported value.
pub version: i32,
/// Working directory used to evaluate repository model policy.
pub working_directory: String,
}

/// Optional account selection and pre-session context used to list models.
///
/// <div class="warning">
///
Expand All @@ -10195,6 +10243,9 @@ pub struct ModelsListRequest {
/// Opaque account identifier returned by `account.getAllUsers`. When omitted, the current account is used.
#[serde(skip_serializing_if = "Option::is_none")]
pub selection_id: Option<String>,
/// Optional versioned context for resolving the model picker before creating a session.
#[serde(skip_serializing_if = "Option::is_none")]
pub session_context: Option<ModelsListPreSessionContext>,
}

///
Expand Down Expand Up @@ -21082,6 +21133,9 @@ pub struct WorkspacesWriteAutopilotObjectiveResult {
pub struct ModelsListResult {
/// List of available models with full metadata
pub models: Vec<Model>,
/// Present only when the runtime applied a pre-session resolution context.
#[serde(skip_serializing_if = "Option::is_none")]
pub resolution: Option<ModelsListResolution>,
}

/// The running runtime's complete catalog of well-known built-in model IDs, including supported models and additional IDs with built-in metadata.
Expand Down Expand Up @@ -30406,6 +30460,9 @@ pub enum ModelPickerCategory {
/// Powerful model category optimized for complex tasks.
#[serde(rename = "powerful")]
Powerful,
/// Experimental model category for models that require an explicit experimental opt-in.
#[serde(rename = "experimental")]
Experimental,
/// Unknown variant for forward compatibility.
#[default]
#[serde(other)]
Expand Down Expand Up @@ -30465,6 +30522,76 @@ pub enum ModelPolicyState {
Unknown,
}

/// How a server-level model list was resolved.
///
/// <div class="warning">
///
/// **Experimental.** This type is part of an experimental wire-protocol surface
/// and may change or be removed in future SDK or CLI releases.
///
/// </div>
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
pub enum ModelsListResolutionMode {
/// The runtime applied the supplied pre-session context.
#[serde(rename = "pre-session")]
PreSession,
/// Unknown variant for forward compatibility.
#[default]
#[serde(other)]
Unknown,
}

///
/// <div class="warning">
///
/// **Experimental.** This type is part of an experimental wire-protocol surface
/// and may change or be removed in future SDK or CLI releases.
///
/// </div>
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
pub enum ModelsListExecutionEnvironment {
#[serde(rename = "local")]
Local,
/// Unknown variant for forward compatibility.
#[default]
#[serde(other)]
Unknown,
}

///
/// <div class="warning">
///
/// **Experimental.** This type is part of an experimental wire-protocol surface
/// and may change or be removed in future SDK or CLI releases.
///
/// </div>
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
pub enum ModelsListModelBackend {
#[serde(rename = "copilot")]
Copilot,
/// Unknown variant for forward compatibility.
#[default]
#[serde(other)]
Unknown,
}

///
/// <div class="warning">
///
/// **Experimental.** This type is part of an experimental wire-protocol surface
/// and may change or be removed in future SDK or CLI releases.
///
/// </div>
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
pub enum ModelsListSessionKind {
#[serde(rename = "top-level")]
TopLevel,
/// Unknown variant for forward compatibility.
#[default]
#[serde(other)]
Unknown,
}

/// Provider transport. Defaults to "http".
///
/// <div class="warning">
Expand Down
2 changes: 1 addition & 1 deletion rust/src/generated/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,7 @@ impl<'a> ClientRpcModels<'a> {
///
/// # Parameters
///
/// * `params` - Optional opaque account selection or compatibility GitHub token used to list models.
/// * `params` - Optional account selection and pre-session context used to list models.
///
/// # Returns
///
Expand Down
Loading