feat: report OpenAI finish reason distribution#422
Merged
Conversation
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
hvagadia
marked this pull request as ready for review
July 17, 2026 21:07
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #422 +/- ##
=======================================
Coverage ? 80.69%
=======================================
Files ? 133
Lines ? 17657
Branches ? 0
=======================================
Hits ? 14249
Misses ? 3408
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
nvzhihanj
reviewed
Jul 17, 2026
nvzhihanj
approved these changes
Jul 17, 2026
nv-alicheng
reviewed
Jul 17, 2026
hvagadia
force-pushed
the
agent/finish-reason-reporting
branch
from
July 18, 2026 02:12
9f1c948 to
ef15278
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Capture OpenAI-compatible
finish_reasonvalues and surface their distribution in existing benchmark artifacts. This does not introduce a new artifact.Report visibility
Finish reasons are available in:
events.jsonl: the raw reason is added as a top-levelfinish_reasonfield on applicablesample.completeevents.metrics/final_snapshot.json: fixed counters recordstop,length,tool_calls,content_filter,function_call, andother.performance/result_summary.json: all supported finish reasons are exposed underfinish_reason_counts, including zero counts.report.txtis unchanged. Unknown values remain unchanged inevents.jsonland are aggregated underother. If an OpenAI-compatible response has no string finish reason, the event field is omitted and no distribution counter is incremented.Experiment data
Validated against Kimi-K2.6 served with SGLang through its OpenAI-compatible endpoint:
tool_calls: 36,length: 2stop: 1stop: 100For every experiment,
events.jsonl,metrics/final_snapshot.json, andperformance/result_summary.jsonreported matching counts for observed reasons.Type of change
Related issues
None.
Testing
1,317 passed, 5 skippedwithpytest -m unit)Checklist