Skip to content

Commit e4a97a6

Browse files
committed
Gate reasoning history replay
1 parent d5135d6 commit e4a97a6

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

common/src/constants/freebuff-models.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ export const FREEBUFF_MODELS = [
4949
tagline: 'Deepest, 1/day',
5050
availability: 'always',
5151
},
52-
{
53-
id: FREEBUFF_DEEPSEEK_V4_PRO_MODEL_ID,
54-
displayName: 'DeepSeek V4 Pro',
55-
tagline: 'Experimental',
56-
availability: 'always',
57-
},
5852
{
5953
id: FREEBUFF_MINIMAX_MODEL_ID,
6054
displayName: 'MiniMax M2.7',

packages/agent-runtime/src/constants.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ export const globalStopSequence = `${JSON.stringify(endsAgentStepParam)}`
99
* to diff sequential requests and find what's breaking prompt caching.
1010
*/
1111
export const CACHE_DEBUG_FULL_LOGGING = false
12+
13+
// Keep disabled by default to preserve mainline behavior until reasoning-token
14+
// replay has been tested more thoroughly.
15+
export const INCLUDE_REASONING_IN_MESSAGE_HISTORY = false

packages/agent-runtime/src/tools/stream-parser.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
import { generateCompactId } from '@codebuff/common/util/string'
99

1010
import { processStreamWithTools } from '../tool-stream-parser'
11+
import { INCLUDE_REASONING_IN_MESSAGE_HISTORY } from '../constants'
1112
import {
1213
executeCustomToolCall,
1314
executeToolCall,
@@ -276,7 +277,7 @@ export async function processStream(
276277
}
277278

278279
if (chunk.type === 'reasoning') {
279-
if (chunk.text) {
280+
if (INCLUDE_REASONING_IN_MESSAGE_HISTORY && chunk.text) {
280281
assistantMessages.push(
281282
assistantMessage({ type: 'reasoning', text: chunk.text }),
282283
)

0 commit comments

Comments
 (0)