mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 06:15:51 +00:00
feat: compact 模型降级为 -1 模式(Opus→Sonnet, Sonnet→Haiku)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -103,6 +103,7 @@ import {
|
||||
getMaxOutputTokensForModel,
|
||||
queryModelWithStreaming,
|
||||
} from '../api/claude.js'
|
||||
import { getCompactModel } from '../../utils/model/model.js'
|
||||
import {
|
||||
getPromptTooLongTokenGap,
|
||||
PROMPT_TOO_LONG_ERROR_MESSAGE,
|
||||
@@ -1314,13 +1315,13 @@ async function streamCompactSummary({
|
||||
const appState = context.getAppState()
|
||||
return appState.toolPermissionContext
|
||||
},
|
||||
model: context.options.mainLoopModel,
|
||||
model: getCompactModel(context.options.mainLoopModel),
|
||||
toolChoice: undefined,
|
||||
isNonInteractiveSession: context.options.isNonInteractiveSession,
|
||||
hasAppendSystemPrompt: !!context.options.appendSystemPrompt,
|
||||
maxOutputTokensOverride: Math.min(
|
||||
COMPACT_MAX_OUTPUT_TOKENS,
|
||||
getMaxOutputTokensForModel(context.options.mainLoopModel),
|
||||
getMaxOutputTokensForModel(getCompactModel(context.options.mainLoopModel)),
|
||||
),
|
||||
querySource: 'compact',
|
||||
agents: context.options.agentDefinitions.activeAgents,
|
||||
|
||||
Reference in New Issue
Block a user