Skip to content

docs(cli): mention per-model token usage in stream-json result event#21908

Merged
NTaylorMullen merged 1 commit intogoogle-gemini:mainfrom
yongruilin:stream-json-stats
Mar 10, 2026
Merged

docs(cli): mention per-model token usage in stream-json result event#21908
NTaylorMullen merged 1 commit intogoogle-gemini:mainfrom
yongruilin:stream-json-stats

Conversation

@yongruilin
Copy link
Contributor

Summary

Updates the docs/cli/headless.md to reflect that the stream-json result event now includes per-model token usage breakdowns alongside aggregated statistics.

Details

Related Issues

Related to #21839

How to Validate

  1. Review the change in docs/cli/headless.md and confirm the result event description accurately reflects the current StreamStats schema.

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt
    • Windows
      • npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker

@yongruilin yongruilin requested review from a team as code owners March 10, 2026 18:18
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the accuracy of the command-line interface documentation. It updates the description of the stream-json result event to clearly state that it now provides detailed per-model token usage breakdowns, alongside the previously available aggregated statistics. This ensures that users have up-to-date information regarding the output structure and available data, improving clarity and alignment with the actual software behavior.

Highlights

  • Documentation Update: Updated the docs/cli/headless.md file to reflect changes in the stream-json result event output.
  • Token Usage Details: The documentation now explicitly mentions that the result event includes per-model token usage breakdowns, in addition to aggregated statistics.
  • Feature Alignment: This update aligns the documentation with the changes introduced in related pull request feat(core): add per-model token usage to stream-json output #21839.
Changelog
  • docs/cli/headless.md
    • Updated the description for the result event in the Streaming JSON output section to explicitly mention per-model token usage breakdowns.
Activity
  • The pull request was created by yongruilin.
  • No human activity (comments, reviews, etc.) has occurred yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the documentation in docs/cli/headless.md to reflect a recent change in the stream-json output format. The description for the result event is updated to mention that it now includes per-model token usage breakdowns. I have reviewed the change and have no feedback.

Note: Security Review has been skipped due to the limited scope of the PR.

@gemini-cli gemini-cli bot added the priority/p1 Important and should be addressed in the near term. label Mar 10, 2026
Copy link
Contributor

@jkcinouye jkcinouye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@NTaylorMullen NTaylorMullen added this pull request to the merge queue Mar 10, 2026
Merged via the queue into google-gemini:main with commit bc75a61 Mar 10, 2026
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority/p1 Important and should be addressed in the near term.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants