feat(core): add disableLLMCorrection setting to skip auto-correction in edit tools (#16000)

This commit is contained in:
Sandy Tao
2026-01-13 09:26:53 +08:00
committed by GitHub
parent 2fc61685a3
commit b81fe68325
13 changed files with 221 additions and 12 deletions

View File

@@ -737,6 +737,7 @@ export async function loadCliConfig(
recordResponses: argv.recordResponses,
retryFetchErrors: settings.general?.retryFetchErrors,
ptyInfo: ptyInfo?.name,
disableLLMCorrection: settings.tools?.disableLLMCorrection,
modelConfigServiceConfig: settings.modelConfigs,
// TODO: loading of hooks based on workspace trust
enableHooks: getEnableHooks(settings),

View File

@@ -1093,6 +1093,18 @@ const SETTINGS_SCHEMA = {
description: 'The number of lines to keep when truncating tool output.',
showInDialog: true,
},
disableLLMCorrection: {
type: 'boolean',
label: 'Disable LLM Correction',
category: 'Tools',
requiresRestart: true,
default: false,
description: oneLine`
Disable LLM-based error correction for edit tools.
When enabled, tools will fail immediately if exact string matches are not found, instead of attempting to self-correct.
`,
showInDialog: true,
},
enableHooks: {
type: 'boolean',
label: 'Enable Hooks System (Experimental)',