Skip to content

Commit 8e1cd4b

Browse files
andyfellerCopilotSteveSandersonMS
authored
Add usage and billing metrics docs page (#1720)
* Add usage and billing metrics docs page Document how SDK integrators read token counts, context-window utilization, AI credit cost, and account quota via session events and RPC methods (assistant.usage, session.usage_info, session.metadata.contextInfo, session.usage.getMetrics, models.list, account.getQuota). Examples are provided for TypeScript, Python, Go, .NET, Java, and Rust, and the compiled snippets pass the docs-validation harness. Adds a link to the features index. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: fix assistant.usage cost field in Go/Java/Rust examples; clarify contextInfo token limit semantics - Add cost field (with nil/Option guard) to Go, Java, and Rust assistant.usage snippets so all six languages match the documented field table and the 'functionally equivalent' claim in the intro - Correct the description of session.metadata.contextInfo parameters: promptTokenLimit passes 0 to use the runtime default, while outputTokenLimit passes 0 when the value is unknown (per generated types) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>
1 parent 76a9f18 commit 8e1cd4b

2 files changed

Lines changed: 1356 additions & 0 deletions

File tree

docs/features/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ These guides cover the capabilities you can add to your Copilot SDK application.
1818
| [Session limits](./session-limits.md) | Set an AI Credits budget for a session and observe budget events |
1919
| [Image Input](./image-input.md) | Send images to sessions as attachments |
2020
| [Streaming Events](./streaming-events.md) | Subscribe to real-time session events (40+ event types) |
21+
| [Usage and Billing](./usage-and-billing.md) | Read token counts, context-window utilization, AI credit cost, and account quota |
2122
| [Steering & Queueing](./steering-and-queueing.md) | Control message delivery—immediate steering vs. sequential queueing |
2223
| [Session Persistence](./session-persistence.md) | Resume sessions across restarts, manage session storage |
2324
| [Remote Sessions](./remote-sessions.md) | Share locally hosted sessions to GitHub web and mobile via Mission Control |

0 commit comments

Comments
 (0)