Skip to content

Commit b3593d8

Browse files
danny-avilajustinmdickey
authored andcommitted
🪙 fix: Deepseek Pricing & Titling (danny-avila#5459)
1 parent 4432461 commit b3593d8

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

api/app/clients/OpenAIClient.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,11 @@ ${convo}
794794
}
795795

796796
title = (
797-
await this.sendPayload(instructionsPayload, { modelOptions, useChatCompletion })
797+
await this.sendPayload(instructionsPayload, {
798+
modelOptions,
799+
useChatCompletion,
800+
context: 'title',
801+
})
798802
).replaceAll('"', '');
799803

800804
const completionTokens = this.getTokenCount(title);
@@ -1384,7 +1388,7 @@ ${convo}
13841388
return reply;
13851389
}
13861390

1387-
if (reasoningTokens.length > 0) {
1391+
if (reasoningTokens.length > 0 && this.options.context !== 'title') {
13881392
return reasoningTokens.join('') + message.content;
13891393
}
13901394

api/models/tx.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const tokenValues = Object.assign(
9696
'claude-': { prompt: 0.8, completion: 2.4 },
9797
'command-r-plus': { prompt: 3, completion: 15 },
9898
'command-r': { prompt: 0.5, completion: 1.5 },
99-
'deepseek-reasoner': { prompt: 0.14, completion: 0.55 },
99+
'deepseek-reasoner': { prompt: 0.14, completion: 2.19 },
100100
deepseek: { prompt: 0.07, completion: 0.28 },
101101
/* cohere doesn't have rates for the older command models,
102102
so this was from https://artificialanalysis.ai/models/command-light/providers */

0 commit comments

Comments
 (0)