@@ -22,6 +22,7 @@ import type { AgentApprovalDecision, AgentSteeringPayload } from "@/lib/agent/ty
2222import { serializeChatAttachments , type RuntimeChatAttachment } from '@/lib/chat-attachments'
2323import { retainCompletedAgentTraceEvents } from '@/lib/agent/trace-retention'
2424import { getAISettingsByModelId } from '@/lib/ai/utils'
25+ import { applyChatReasoningOverride } from '@/lib/ai/chat-reasoning'
2526import type { AiConfig } from '@/app/core/setting/config'
2627import {
2728 buildChatImageContext ,
@@ -147,6 +148,7 @@ export const ChatSend = forwardRef<ChatSendHandle, ChatSendProps>(({
147148 } ) , [ agentSession ] )
148149
149150 const createRequestSnapshot = ( overrideText ?: string ) : AgentRequestSnapshot => ( {
151+ reasoningOverride : useChatStore . getState ( ) . reasoningOverride ,
150152 inputValue : overrideText ?? inputValue ,
151153 requestText : ( overrideText ?? inputValue ) . trim ( ) || t ( 'record.chat.input.addAttachment.attachmentOnlyPrompt' ) ,
152154 linkedResource,
@@ -1097,7 +1099,9 @@ ${hasValidRange ? `**仅在用户明确要求修改/改写/补充/插入时才
10971099 agentSession . configure ( {
10981100 execute : async ( request ) => {
10991101 const modelId = useSettingStore . getState ( ) . primaryModel
1100- const aiConfig = await getAISettingsByModelId ( modelId )
1102+ const aiConfig = applyChatReasoningOverride (
1103+ await getAISettingsByModelId ( modelId ) , modelId , request . reasoningOverride ?? null ,
1104+ )
11011105 const modelSnapshot = {
11021106 id : modelId ,
11031107 name : aiConfig ?. model || modelId ,
0 commit comments