-
Notifications
You must be signed in to change notification settings - Fork 22
chore: Changed token_count to only use tokenCountCallback #272
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #272 +/- ##
==========================================
- Coverage 98.00% 98.00% -0.01%
==========================================
Files 23 23
Lines 2004 2002 -2
==========================================
- Hits 1964 1962 -2
Misses 40 40
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -189,7 +189,7 @@ tap.afterEach(async (t) => { | |||
chatMsgs | |||
}) | |||
|
|||
t.llmSummary({ tx, modelId, chatSummary, tokenUsage: true, numMsgs: events.length - 1 }) | |||
t.llmSummary({ tx, modelId, chatSummary, numMsgs: events.length - 1 }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be restored
@@ -98,8 +98,6 @@ tap.test('non-conforming response is handled gracefully', async (t) => { | |||
t.equal(res.finishReason, undefined) | |||
t.same(res.headers, undefined) | |||
t.equal(res.id, undefined) | |||
t.equal(res.inputTokenCount, undefined) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be restored
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i meant the entire file, sorry for the confusion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? What are we trying to test by doing so?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i understand this code is going away in #265. so it's probably fine to leave as is but the test coverage will be missing until we rip it all out.
tests/unit/llm/stream-handler.tap.js
Outdated
@@ -117,8 +117,6 @@ tap.test('handles claude streams', async (t) => { | |||
t.equal(br.finishReason, 'done') | |||
t.equal(br.requestId, 'aws-req-1') | |||
t.equal(br.statusCode, 200) | |||
t.equal(br.inputTokenCount, 5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be restored
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i meant the entire file, sorry for the confusion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for the back and forth. one last comment
@@ -98,8 +98,6 @@ tap.test('non-conforming response is handled gracefully', async (t) => { | |||
t.equal(res.finishReason, undefined) | |||
t.same(res.headers, undefined) | |||
t.equal(res.id, undefined) | |||
t.equal(res.inputTokenCount, undefined) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i meant the entire file, sorry for the confusion
tests/unit/llm/stream-handler.tap.js
Outdated
@@ -117,8 +117,6 @@ tap.test('handles claude streams', async (t) => { | |||
t.equal(br.finishReason, 'done') | |||
t.equal(br.requestId, 'aws-req-1') | |||
t.equal(br.statusCode, 200) | |||
t.equal(br.inputTokenCount, 5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i meant the entire file, sorry for the confusion
This PR resolves #271.