Skip to content

Commit

Permalink
AIX: suppress warning on completion_tokens=0
Browse files Browse the repository at this point in the history
  • Loading branch information
enricoros committed Dec 30, 2024
1 parent 9bfcb50 commit 7626b48
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ function _fromOpenAIUsage(usage: OpenAIWire_API_Chat_Completions.Response['usage
return undefined;

// Require at least the completion tokens, or issue a DEV warning otherwise
if (!usage.completion_tokens) {
if (usage.completion_tokens === undefined) {
// Warn, so we may adjust this usage parsing for Non-OpenAI APIs
console.log('[DEV] AIX: OpenAI-dispatch missing completion tokens in usage', { usage });
return undefined;
Expand Down

0 comments on commit 7626b48

Please sign in to comment.