MCPcopy Index your code
hub / github.com/github/copilot-sdk / AssistantMessageData

Struct AssistantMessageData

go/rpc/zsession_events.go:206–245  ·  view source on GitHub ↗

Assistant response containing text content, optional tool requests, and interaction metadata

Source from the content-addressed store, hash-verified

204
205// Assistant response containing text content, optional tool requests, and interaction metadata
206type AssistantMessageData struct {
207 // Provider's completion / response identifier; shared across all chunks of a single API call. Used to group multi-chunk assistant utterances.
208 APICallID *string `json:"apiCallId,omitempty"`
209 // Provider-agnostic citations linking spans of this message's content to the sources that support them. Experimental; only populated when citation emission is enabled.
210 // Experimental: Citations is part of an experimental API and may change or be removed.
211 Citations *Citations `json:"citations,omitempty"`
212 // The assistant's text response content
213 Content string `json:"content"`
214 // Encrypted reasoning content from OpenAI models. Session-bound and stripped on resume.
215 EncryptedContent *string `json:"encryptedContent,omitempty"`
216 // CAPI interaction ID for correlating this message with upstream telemetry
217 InteractionID *string `json:"interactionId,omitempty"`
218 // Unique identifier for this assistant message
219 MessageID string `json:"messageId"`
220 // Model that produced this assistant message, if known
221 Model *string `json:"model,omitempty"`
222 // Actual output token count from the API response (completion_tokens), used for accurate token accounting
223 OutputTokens *int64 `json:"outputTokens,omitempty"`
224 // Tool call ID of the parent tool invocation when this event originates from a sub-agent
225 // Deprecated: ParentToolCallID is deprecated.
226 ParentToolCallID *string `json:"parentToolCallId,omitempty"`
227 // Generation phase for phased-output models (e.g., thinking vs. response phases)
228 Phase *string `json:"phase,omitempty"`
229 // Opaque/encrypted extended thinking data from Anthropic models. Session-bound and stripped on resume.
230 ReasoningOpaque *string `json:"reasoningOpaque,omitempty"`
231 // Readable reasoning text from the model's extended thinking
232 ReasoningText *string `json:"reasoningText,omitempty"`
233 // OpenAI-compatible wire field the provider used for reasoning (e.g. reasoning_content/reasoning). Populated only when non-canonical, so the dialect round-trips across turns.
234 ReasoningWireField *string `json:"reasoningWireField,omitempty"`
235 // GitHub request tracing ID (x-github-request-id header) for correlating with server-side logs
236 RequestID *string `json:"requestId,omitempty"`
237 // Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping
238 ServerTools *AssistantMessageServerTools `json:"serverTools,omitempty"`
239 // Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation
240 ServiceRequestID *string `json:"serviceRequestId,omitempty"`
241 // Tool invocations requested by the assistant in this message
242 ToolRequests []AssistantMessageToolRequest `json:"toolRequests,omitzero"`
243 // Identifier for the agent loop turn that produced this message, matching the corresponding assistant.turn_start event
244 TurnID *string `json:"turnId,omitempty"`
245}
246
247func (*AssistantMessageData) sessionEventData() {}
248func (*AssistantMessageData) Type() SessionEventType { return SessionEventTypeAssistantMessage }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected