You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Python README formatting now exists on main independently, so merge the updated base to keep it out of this PR's effective diff.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/features/streaming-events.md
+20-3Lines changed: 20 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -443,12 +443,20 @@ Ephemeral. Token usage and cost information for an individual API call.
443
443
|`model`|`string`| ✅ | Model identifier (e.g., `"gpt-5.4"`) |
444
444
|`inputTokens`|`number`|| Input tokens consumed |
445
445
|`outputTokens`|`number`|| Output tokens produced |
446
+
|`reasoningTokens`|`number`|| Output tokens used for reasoning/chain-of-thought (subset of `outputTokens`) |
446
447
|`cacheReadTokens`|`number`|| Tokens read from prompt cache |
447
448
|`cacheWriteTokens`|`number`|| Tokens written to prompt cache |
449
+
|`cacheExpiresAt`|`string`|| ISO 8601 timestamp when the prompt cache for this model call expires |
450
+
|`contentFilterTriggered`|`boolean`|| Whether the response was blocked or truncated by content filtering (`finish_reason === 'content_filter'`) |
451
+
|`finishReason`|`string`|| Model finish reason (e.g., `"stop"`, `"length"`, `"tool_calls"`, `"content_filter"`) |
448
452
|`cost`|`number`|| Model multiplier cost for billing |
449
453
|`duration`|`number`|| API call duration in milliseconds |
454
+
|`timeToFirstTokenMs`|`number`|| Time from request dispatch to first token received (streaming latency) |
455
+
|`interTokenLatencyMs`|`number`|| Average latency between consecutive tokens (streaming throughput) |
456
+
|`reasoningEffort`|`string`|| Reasoning effort level used for this call (e.g., `"low"`, `"medium"`, `"high"`) |
450
457
|`initiator`|`string`|| What triggered this call (e.g., `"sub-agent"`); absent for user-initiated |
451
458
|`apiCallId`|`string`|| Completion ID from the provider (e.g., `chatcmpl-abc123`) |
459
+
|`serviceRequestId`|`string`|| Copilot service request ID (`x-copilot-service-request-id`) for CAPI log correlation |
452
460
|`apiEndpoint`|`"/chat/completions" \| "/v1/messages" \| "/responses" \| "ws:/responses"`|| API endpoint used for the model call; useful for observability and cost attribution. `ws:/responses` is the websocket variant of the responses API |
453
461
|`providerCallId`|`string`|| GitHub request tracing ID (`x-github-request-id`) |
454
462
|`parentToolCallId`|`string`|| Deprecated. Use envelope-level `agentId` for sub-agent attribution |
@@ -733,6 +741,7 @@ A custom agent was invoked as a sub-agent.
733
741
|`agentName`|`string`| ✅ | Internal name of the sub-agent |
734
742
|`agentDisplayName`|`string`| ✅ | Human-readable display name |
735
743
|`agentDescription`|`string`| ✅ | Description of what the sub-agent does |
744
+
|`model`|`string`|| Model the sub-agent will run with, when known at start |
736
745
737
746
### `subagent.completed`
738
747
@@ -743,6 +752,10 @@ A sub-agent finished successfully.
743
752
|`toolCallId`|`string`| ✅ | Matches the corresponding `subagent.started`|
744
753
|`agentName`|`string`| ✅ | Internal name |
745
754
|`agentDisplayName`|`string`| ✅ | Display name |
755
+
|`model`|`string`|| Model used by the sub-agent |
756
+
|`durationMs`|`number`|| Wall-clock execution duration in milliseconds |
757
+
|`totalTokens`|`number`|| Total input and output tokens consumed |
758
+
|`totalToolCalls`|`number`|| Total tool calls made |
746
759
747
760
### `subagent.failed`
748
761
@@ -754,6 +767,10 @@ A sub-agent encountered an error.
754
767
|`agentName`|`string`| ✅ | Internal name |
755
768
|`agentDisplayName`|`string`| ✅ | Display name |
756
769
|`error`|`string`| ✅ | Error message |
770
+
|`model`|`string`|| Model selected for the sub-agent, when known |
771
+
|`durationMs`|`number`|| Wall-clock execution duration in milliseconds |
772
+
|`totalTokens`|`number`|| Total input and output tokens consumed before failure |
773
+
|`totalToolCalls`|`number`|| Total tool calls made before failure |
757
774
758
775
### `subagent.selected`
759
776
@@ -958,9 +975,9 @@ This table lists key `data` payload fields. Common envelope fields are documente
958
975
|`user_input.completed`| ✅ | User Input |`requestId`|
959
976
|`elicitation.requested`| ✅ | User Input |`requestId`, `message`, `requestedSchema`|
960
977
|`elicitation.completed`| ✅ | User Input |`requestId`|
0 commit comments