Skip to content

Commit e68714e

Browse files
authored
chore: remove reasoning_content from history (#4576)
1 parent 6da2b20 commit e68714e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/ai-native/src/browser/chat/chat-model.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,9 @@ export class ChatModel extends Disposable implements IChatModel {
352352
: request.message.prompt,
353353
});
354354
for (const part of request.response.responseParts) {
355-
if (part.kind === 'treeData' || part.kind === 'component') {
355+
// Remove reasoning_content from history
356+
// https://api-docs.deepseek.com/zh-cn/guides/reasoning_model#%E4%B8%8A%E4%B8%8B%E6%96%87%E6%8B%BC%E6%8E%A5
357+
if (part.kind === 'treeData' || part.kind === 'component' || part.kind === 'reasoning') {
356358
continue;
357359
}
358360
if (part.kind !== 'toolCall') {

0 commit comments

Comments
 (0)