Skip to content

Commit e2cffb8

Browse files
committed
chore: deepseek thinking parsing
1 parent 41b6780 commit e2cffb8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/api/chat/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function createOpenAIWithRateLimit(apiKey: string) {
2626
fetch: async (url, options) => {
2727
// Inject required kwargs for DeepSeek V3.1 to enable thinking. Workaround for old ai sdk version.
2828
const body = JSON.parse(options!.body as string || '{}');
29-
if (body.model === 'deepseek-ai/DeepSeek-V3.1' || body.model === 'DeepSeek-V3.1') {
29+
if (body.model.includes('deepseek-ai/DeepSeek-V3.') || body.model === 'DeepSeek-V3.1') {
3030
options!.body = JSON.stringify({
3131
...body,
3232
chat_template_kwargs: {

0 commit comments

Comments
 (0)