KG-381 Add input and total tokens count in internal Mock Test framework#1145
Merged
aozherelyeva merged 1 commit intodevelopfrom Nov 21, 2025
Merged
Conversation
9233a0d to
a4af72d
Compare
Qodana for JVM1191 new problems were found
@@ Code coverage @@
+ 71% total lines covered
16497 lines analyzed, 11871 lines covered
# Calculated according to the filters of your coverage tool☁️ View the detailed Qodana report Contact Qodana teamContact us at qodana-support@jetbrains.com
|
- Introduced `updateTokenCounts` function to calculate input, output, and total token counts. - Updated response metadata creation to include token counts where applicable. - Removed unused `inputTokensCount` variable from certain methods.
a4af72d to
17280bd
Compare
Qodana for JVM1191 new problems were found
@@ Code coverage @@
+ 71% total lines covered
16496 lines analyzed, 11870 lines covered
# Calculated according to the filters of your coverage tool☁️ View the detailed Qodana report Contact Qodana teamContact us at qodana-support@jetbrains.com
|
Rizzen
approved these changes
Nov 21, 2025
kpavlov
pushed a commit
that referenced
this pull request
Dec 5, 2025
…rk (#1145) <!-- Thank you for opening a pull request! Please add a brief description of the proposed change here. Also, please tick the appropriate points in the checklist below. --> ## Motivation and Context <!-- Why is this change needed? What problem does it solve? --> [KG-381](https://youtrack.jetbrains.com/issue/KG-381) Add input and total tokens count in internal Mock Test framework 1. The new `updateTokenCounts` function calculates input, output, and total token counts. 2. Updated response metadata creation to include token counts where applicable. 3. Removed unused `inputTokensCount` variable. 4. Added tests for token counter in the MockLLM responses. ## Breaking Changes <!-- Will users need to update their code or configurations? --> None. --- #### Type of the changes - [x] New feature (non-breaking change which adds functionality) - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [x] Tests improvement - [x] Refactoring #### Checklist - [x] The pull request has a description of the proposed change - [x] I read the [Contributing Guidelines](https://github.com/JetBrains/koog/blob/main/CONTRIBUTING.md) before opening the pull request - [x] The pull request uses **`develop`** as the base branch - [x] Tests for the changes have been added - [x] All new and existing tests passed ##### Additional steps for pull requests adding a new feature - [x] An issue describing the proposed change exists - [x] The pull request includes a link to the issue - [x] The change was discussed and approved in the issue - [x] Docs have been added / updated
vova-jb
pushed a commit
that referenced
this pull request
Jan 27, 2026
…rk (#1145) <!-- Thank you for opening a pull request! Please add a brief description of the proposed change here. Also, please tick the appropriate points in the checklist below. --> ## Motivation and Context <!-- Why is this change needed? What problem does it solve? --> [KG-381](https://youtrack.jetbrains.com/issue/KG-381) Add input and total tokens count in internal Mock Test framework 1. The new `updateTokenCounts` function calculates input, output, and total token counts. 2. Updated response metadata creation to include token counts where applicable. 3. Removed unused `inputTokensCount` variable. 4. Added tests for token counter in the MockLLM responses. ## Breaking Changes <!-- Will users need to update their code or configurations? --> None. --- #### Type of the changes - [x] New feature (non-breaking change which adds functionality) - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [x] Tests improvement - [x] Refactoring #### Checklist - [x] The pull request has a description of the proposed change - [x] I read the [Contributing Guidelines](https://github.com/JetBrains/koog/blob/main/CONTRIBUTING.md) before opening the pull request - [x] The pull request uses **`develop`** as the base branch - [x] Tests for the changes have been added - [x] All new and existing tests passed ##### Additional steps for pull requests adding a new feature - [x] An issue describing the proposed change exists - [x] The pull request includes a link to the issue - [x] The change was discussed and approved in the issue - [x] Docs have been added / updated
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.
Motivation and Context
KG-381 Add input and total tokens count in internal Mock Test framework
updateTokenCountsfunction calculates input, output, and total token counts.inputTokensCountvariable.Breaking Changes
None.
Type of the changes
Checklist
developas the base branchAdditional steps for pull requests adding a new feature