Skip to content

Commit cb836ee

Browse files
disable apply_patch for Vsc Model C. (microsoft#2543)
Co-authored-by: AbdelrahmanAbouelenin <[email protected]>
1 parent 2d76af0 commit cb836ee

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/platform/endpoint/common/chatModelCapabilities.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ export function modelPrefersInstructionsAfterHistory(modelFamily: string) {
113113
* Model supports apply_patch as an edit tool.
114114
*/
115115
export function modelSupportsApplyPatch(model: LanguageModelChat | IChatEndpoint): boolean {
116+
// only using replace string as edit tool, disable apply_patch for VSC Model C
117+
if (isVSCModelC(model)) {
118+
return false;
119+
}
116120
return (model.family.startsWith('gpt') && !model.family.includes('gpt-4o')) || model.family === 'o4-mini' || model.family === 'arctic-fox' || isVSCModelA(model) || isVSCModelB(model) || isHiddenModelB(model.family);
117121
}
118122

@@ -172,6 +176,10 @@ export function modelCanUseImageURL(model: LanguageModelChat | IChatEndpoint): b
172176
* without needing insert_edit_into_file.
173177
*/
174178
export function modelCanUseApplyPatchExclusively(model: LanguageModelChat | IChatEndpoint): boolean {
179+
// only using replace string as edit tool, disable apply_patch for VSC Model C
180+
if (isVSCModelC(model)) {
181+
return false;
182+
}
175183
return isGpt5PlusFamily(model) || isVSCModelA(model) || isVSCModelB(model);
176184
}
177185

0 commit comments

Comments
 (0)