>,
/// Accumulated nano-AI units cost for this model
///
///
@@ -882,8 +882,8 @@ pub struct SessionShutdownData {
#[serde(skip_serializing_if = "Option::is_none")]
pub system_tokens: Option,
/// Session-wide per-token-type accumulated token counts
- #[serde(default)]
- pub token_details: HashMap,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub token_details: Option>,
/// Tool definitions token count at shutdown
#[serde(skip_serializing_if = "Option::is_none")]
pub tool_definitions_tokens: Option,
@@ -1101,8 +1101,8 @@ pub struct UserMessageData {
#[serde(skip_serializing_if = "Option::is_none")]
pub agent_mode: Option,
/// Files, selections, or GitHub references attached to the message
- #[serde(default)]
- pub attachments: Vec,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub attachments: Option>,
/// The user's message text as displayed in the timeline
pub content: String,
/// CAPI interaction ID for correlating this user message with its turn
@@ -1112,8 +1112,8 @@ pub struct UserMessageData {
#[serde(skip_serializing_if = "Option::is_none")]
pub is_autopilot_continuation: Option,
/// Path-backed native document attachments that stayed on the tagged_files path flow because native upload could not read them or would exceed the request size limit
- #[serde(default)]
- pub native_document_path_fallback_paths: Vec,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub native_document_path_fallback_paths: Option>,
/// Parent agent task ID for background telemetry correlated to this user turn
#[serde(skip_serializing_if = "Option::is_none")]
pub parent_agent_task_id: Option,
@@ -1121,8 +1121,8 @@ pub struct UserMessageData {
#[serde(skip_serializing_if = "Option::is_none")]
pub source: Option,
/// Normalized document MIME types that were sent natively instead of through tagged_files XML
- #[serde(default)]
- pub supported_native_document_mime_types: Vec,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub supported_native_document_mime_types: Option>,
/// Transformed version of the message sent to the model, with XML wrapping, timestamps, and other augmentations for prompt caching
#[serde(skip_serializing_if = "Option::is_none")]
pub transformed_content: Option,
@@ -1220,8 +1220,8 @@ pub struct AssistantMessageData {
/// and may change or be removed in future SDK or CLI releases.
///
///
- #[serde(default)]
- pub anthropic_advisor_blocks: Vec,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub anthropic_advisor_blocks: Option>,
/// Anthropic advisor model ID used for this response, for timeline display on replay
///
///
@@ -1269,8 +1269,8 @@ pub struct AssistantMessageData {
#[serde(skip_serializing_if = "Option::is_none")]
pub service_request_id: Option
,
/// Tool invocations requested by the assistant in this message
- #[serde(default)]
- pub tool_requests: Vec,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub tool_requests: Option>,
/// Identifier for the agent loop turn that produced this message, matching the corresponding assistant.turn_start event
#[serde(skip_serializing_if = "Option::is_none")]
pub turn_id: Option,
@@ -1422,8 +1422,8 @@ pub struct AssistantUsageData {
pub provider_call_id: Option,
/// Per-quota resource usage snapshots, keyed by quota identifier
#[doc(hidden)]
- #[serde(default)]
- pub(crate) quota_snapshots: HashMap,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub(crate) quota_snapshots: Option>,
/// Reasoning effort level used for model calls, if applicable (e.g. "none", "low", "medium", "high", "xhigh", "max")
#[serde(skip_serializing_if = "Option::is_none")]
pub reasoning_effort: Option,
@@ -1610,8 +1610,8 @@ pub struct ToolExecutionCompleteContentResourceLinkIcon {
#[serde(skip_serializing_if = "Option::is_none")]
pub mime_type: Option,
/// Available icon sizes (e.g., ['16x16', '32x32'])
- #[serde(default)]
- pub sizes: Vec,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub sizes: Option>,
/// URL or path to the icon image
pub src: String,
/// Theme variant this icon is intended for
@@ -1627,8 +1627,8 @@ pub struct ToolExecutionCompleteContentResourceLink {
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option,
/// Icons associated with this resource
- #[serde(default)]
- pub icons: Vec,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub icons: Option>,
/// MIME type of the resource content
#[serde(skip_serializing_if = "Option::is_none")]
pub mime_type: Option,
@@ -1686,14 +1686,14 @@ pub struct ToolExecutionCompleteContentResource {
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ToolExecutionCompleteUIResourceMetaUICsp {
- #[serde(default)]
- pub base_uri_domains: Vec,
- #[serde(default)]
- pub connect_domains: Vec,
- #[serde(default)]
- pub frame_domains: Vec,
- #[serde(default)]
- pub resource_domains: Vec,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub base_uri_domains: Option>,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub connect_domains: Option>,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub frame_domains: Option>,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub resource_domains: Option>,
}
/// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsCamera` type.
@@ -1785,8 +1785,8 @@ pub struct ToolExecutionCompleteResult {
/// Concise tool result text sent to the LLM for chat completion, potentially truncated for token efficiency
pub content: String,
/// Structured content blocks (text, images, audio, resources) returned by the tool in their native format
- #[serde(default)]
- pub contents: Vec,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub contents: Option>,
/// Full detailed tool result for UI/timeline display, preserving complete content such as diffs. Falls back to content when absent.
#[serde(skip_serializing_if = "Option::is_none")]
pub detailed_content: Option,
@@ -1803,8 +1803,8 @@ pub struct ToolExecutionCompleteToolDescriptionMetaUI {
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_uri: Option,
/// Who can access this tool
- #[serde(default)]
- pub visibility: Vec,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub visibility: Option>,
}
/// MCP Apps metadata for UI resource association
@@ -1865,8 +1865,8 @@ pub struct ToolExecutionCompleteData {
#[serde(skip_serializing_if = "Option::is_none")]
pub tool_description: Option,
/// Tool-specific telemetry data (e.g., CodeQL check counts, grep match counts)
- #[serde(default)]
- pub tool_telemetry: HashMap,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub tool_telemetry: Option>,
/// Identifier for the agent loop turn this tool was invoked in, matching the corresponding assistant.turn_start event
#[serde(skip_serializing_if = "Option::is_none")]
pub turn_id: Option,
@@ -1877,8 +1877,8 @@ pub struct ToolExecutionCompleteData {
#[serde(rename_all = "camelCase")]
pub struct SkillInvokedData {
/// Tool names that should be auto-approved when this skill is active
- #[serde(default)]
- pub allowed_tools: Vec,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub allowed_tools: Option>,
/// Full content of the skill file, injected into the conversation for the model
pub content: String,
/// Description of the skill from its SKILL.md frontmatter
@@ -1978,7 +1978,7 @@ pub struct SubagentSelectedData {
/// Internal name of the selected custom agent
pub agent_name: String,
/// List of tool names available to this agent, or null for all tools
- pub tools: Vec