Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

🪙 fix: Deepseek Pricing & Titling (#5459)

Danny Avila60c846b679b8
diff --git a/api/app/clients/OpenAIClient.js b/api/app/clients/OpenAIClient.js
index a4ff4d763c..d084f22187 100644
--- a/api/app/clients/OpenAIClient.js
+++ b/api/app/clients/OpenAIClient.js
@@ -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;
}
diff --git a/api/models/tx.js b/api/models/tx.js
index 9554894ddf..fbca6d9deb 100644
--- a/api/models/tx.js
+++ b/api/models/tx.js
@@ -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 */