Documentation can be updated for assistant.usage events

Ouverte
#2,834 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

  • #2837 par @rinceyuan — fermée sans fusion

Évaluation

Difficulté
2/5
Temps estimé
1-3 heures
Accessibilité débutants
55/100
Type d'issue
Documentation
Clarté
Plutôt claire
Activité
Active
Stack technique
documentation, typescript
Domaine
documentation

Piste de recherche

The public page on Copilot usage metrics is outside this repository, so the docs edit may land in the docs site, while the JSDoc change belongs in the TypeScript SDK where the assistant.usage event fields are declared. Read the usage event type definitions in the TypeScript source, then document the four token fields and state whether inputTokens includes cache write tokens. Done when the field descriptions answer that question and the wording is consistent with the online page.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

documentation

I have two suggestions for the Copilot SDK doc.

  1. The online documentation page can add more details about the assistant.usage events. The SDK currently exposes all four numbers related to pricing "input tokens", "output tokens", "cache read tokens" and "cache write tokens". The documentation site only mentions input tokens and output tokens. copilot-usage-metrics

  2. The online documentation and the TS SDK inline JSDoc can clarify what the "input tokens" number represent from the SDK events. I noticed that the number for "inputTokens" in my Copilot SDK events are abnormally high compared to the numbers reported by a Claude Agent SDK, making me suspect the "inputTokens" number actually includes tokens that are written to the cache. Given that new models have different price for input token and cache write tokens, the documentation should clarify that.

Langage dominant
Java
Étoiles
10.7k
Forks
1.5k
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de github/copilot-sdk

Toutes les issues de github/copilot-sdk

Issues similaires

Plus d'issues Java

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.