Skip to content

docs: add missing assistant.usage event fields to streaming-events reference#2074

Open
rinceyuan wants to merge 1 commit into
github:mainfrom
rinceyuan:docs/usage-event-fields
Open

docs: add missing assistant.usage event fields to streaming-events reference#2074
rinceyuan wants to merge 1 commit into
github:mainfrom
rinceyuan:docs/usage-event-fields

Conversation

@rinceyuan

Copy link
Copy Markdown
Contributor

Summary

The \�ssistant.usage\ event table in \streaming-events.md\ was missing 8 fields that are present in the \AssistantUsageData\ typed interface:

Field Type Description
\
easoningTokens\ \
umber\ Reasoning/chain-of-thought tokens (subset of outputTokens)
\ imeToFirstTokenMs\ \
umber\ Streaming latency: time to first token
\interTokenLatencyMs\ \
umber\ Streaming throughput: avg inter-token latency
\contentFilterTriggered\ \�oolean\ Content filter triggered flag
\ inishReason\ \string\ Model finish reason (stop/length/tool_calls/content_filter)
\
easoningEffort\ \string\ Reasoning effort level used
\cacheExpiresAt\ \string\ Prompt cache expiration timestamp
\serviceRequestId\ \string\ Server-side request ID for log correlation

These fields are essential for embedders building observability dashboards (token cost monitoring, latency tracking, content safety detection).

Also updated the quick-reference table to include key new fields.

Validation

  • Field names and types verified against
    odejs/src/generated/session-events.ts\ (\AssistantUsageData\ interface)
  • Descriptions taken from JSDoc comments in the typed interface
  • No code changes; docs-only PR

…ference

The assistant.usage event table was missing 8 fields that are present
in the AssistantUsageData interface:

- reasoningTokens: reasoning/chain-of-thought token count
- timeToFirstTokenMs: streaming latency (first token)
- interTokenLatencyMs: streaming throughput (avg inter-token)
- contentFilterTriggered: content filter detection
- finishReason: model finish reason (stop/length/content_filter)
- reasoningEffort: reasoning effort level used
- cacheExpiresAt: prompt cache expiration timestamp
- serviceRequestId: server-side request ID for log correlation

Also update the quick-reference table at the end of the file to
include the key new fields.
@rinceyuan
rinceyuan requested a review from a team as a code owner July 24, 2026 05:32
@rinceyuan

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree company=Microsoft

@rinceyuan

Copy link
Copy Markdown
Contributor Author

@roji Companion to #2072 — documents 8 missing fields from the assistant.usage event (reasoningTokens, timeToFirstTokenMs, interTokenLatencyMs, contentFilterTriggered, finishReason, etc.). Same pattern: type interface has them, docs table was incomplete. Quick review appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant