🪙 fix: Deepseek Pricing & Titling (#5459)

This commit is contained in:
Danny Avila 2025-01-25 10:10:53 -05:00 committed by GitHub
parent af430e46f4
commit 60c846b679
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View file

@ -794,7 +794,11 @@ ${convo}
}
title = (
await this.sendPayload(instructionsPayload, { modelOptions, useChatCompletion })
await this.sendPayload(instructionsPayload, {
modelOptions,
useChatCompletion,
context: 'title',
})
).replaceAll('"', '');
const completionTokens = this.getTokenCount(title);
@ -1384,7 +1388,7 @@ ${convo}
return reply;
}
if (reasoningTokens.length > 0) {
if (reasoningTokens.length > 0 && this.options.context !== 'title') {
return reasoningTokens.join('') + message.content;
}

View file

@ -96,7 +96,7 @@ const tokenValues = Object.assign(
'claude-': { prompt: 0.8, completion: 2.4 },
'command-r-plus': { prompt: 3, completion: 15 },
'command-r': { prompt: 0.5, completion: 1.5 },
'deepseek-reasoner': { prompt: 0.14, completion: 0.55 },
'deepseek-reasoner': { prompt: 0.14, completion: 2.19 },
deepseek: { prompt: 0.07, completion: 0.28 },
/* cohere doesn't have rates for the older command models,
so this was from https://artificialanalysis.ai/models/command-light/providers */