Commit 8e1cd4b
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
0 commit comments