diff --git a/src/extension/intents/node/agentIntent.ts b/src/extension/intents/node/agentIntent.ts index 24a5fc6bd3..a211c043ac 100644 --- a/src/extension/intents/node/agentIntent.ts +++ b/src/extension/intents/node/agentIntent.ts @@ -10,7 +10,7 @@ import { BudgetExceededError } from '@vscode/prompt-tsx/dist/base/materialized'; import type * as vscode from 'vscode'; import { ChatLocation, ChatResponse } from '../../../platform/chat/common/commonTypes'; import { ConfigKey, IConfigurationService } from '../../../platform/configuration/common/configurationService'; -import { isHiddenModelB, modelCanUseApplyPatchExclusively, modelCanUseReplaceStringExclusively, modelSupportsApplyPatch, modelSupportsMultiReplaceString, modelSupportsReplaceString, modelSupportsSimplifiedApplyPatchInstructions } from '../../../platform/endpoint/common/chatModelCapabilities'; +import { modelCanUseApplyPatchExclusively, modelCanUseReplaceStringExclusively, modelSupportsApplyPatch, modelSupportsMultiReplaceString, modelSupportsReplaceString, modelSupportsSimplifiedApplyPatchInstructions } from '../../../platform/endpoint/common/chatModelCapabilities'; import { IEndpointProvider } from '../../../platform/endpoint/common/endpointProvider'; import { IEnvService } from '../../../platform/env/common/envService'; import { ILogService } from '../../../platform/log/common/logService'; @@ -65,9 +65,8 @@ export const getAgentTools = (instaService: IInstantiationService, request: vsco const allowTools: Record = {}; - const isHiddenModelBFlag = await isHiddenModelB(model); const learned = editToolLearningService.getPreferredEndpointEditTool(model); - if (!isHiddenModelBFlag && learned) { // a learning-enabled (BYOK) model, we should go with what it prefers + if (learned) { // a learning-enabled (BYOK) model, we should go with what it prefers allowTools[ToolName.EditFile] = learned.includes(ToolName.EditFile); allowTools[ToolName.ReplaceString] = learned.includes(ToolName.ReplaceString); allowTools[ToolName.MultiReplaceString] = learned.includes(ToolName.MultiReplaceString); @@ -94,7 +93,7 @@ export const getAgentTools = (instaService: IInstantiationService, request: vsco allowTools[ToolName.RunTests] = await testService.hasAnyTests(); allowTools[ToolName.CoreRunTask] = tasksService.getTasks().length > 0; - if (model.family === 'gpt-5-codex' || model.family.includes('grok-code') || await isHiddenModelB(model)) { + if (model.family === 'gpt-5-codex' || model.family.includes('grok-code')) { allowTools[ToolName.CoreManageTodoList] = false; } diff --git a/src/extension/prompts/node/agent/agentPrompt.tsx b/src/extension/prompts/node/agent/agentPrompt.tsx index 240939cb2a..1409b57025 100644 --- a/src/extension/prompts/node/agent/agentPrompt.tsx +++ b/src/extension/prompts/node/agent/agentPrompt.tsx @@ -7,7 +7,7 @@ import { BasePromptElementProps, Chunk, Image, PromptElement, PromptPiece, Promp import type { ChatRequestEditedFileEvent, LanguageModelToolInformation, NotebookEditor, TaskDefinition, TextEditor } from 'vscode'; import { ChatLocation } from '../../../../platform/chat/common/commonTypes'; import { ConfigKey, IConfigurationService } from '../../../../platform/configuration/common/configurationService'; -import { isHiddenModelB, isVSCModel, modelNeedsStrongReplaceStringHint } from '../../../../platform/endpoint/common/chatModelCapabilities'; +import { isVSCModel, modelNeedsStrongReplaceStringHint } from '../../../../platform/endpoint/common/chatModelCapabilities'; import { CacheType } from '../../../../platform/endpoint/common/endpointTypes'; import { IEnvService, OperatingSystem } from '../../../../platform/env/common/envService'; import { getGitHubRepoInfoFromContext, IGitService } from '../../../../platform/git/common/gitService'; @@ -339,8 +339,7 @@ export class AgentUserMessage extends PromptElement { : ''; const hasToolsToEditNotebook = hasCreateFileTool || hasEditNotebookTool || hasReplaceStringTool || hasApplyPatchTool || hasEditFileTool; const hasTodoTool = !!this.props.availableTools?.find(tool => tool.name === ToolName.CoreManageTodoList); - const isHiddenModelBFlag = await isHiddenModelB(this.props.endpoint); - const shouldUseUserQuery = this.props.endpoint.family.startsWith('grok-code') || isHiddenModelBFlag; + const shouldUseUserQuery = this.props.endpoint.family.startsWith('grok-code'); return ( <> diff --git a/src/extension/prompts/node/agent/xAIPrompts.tsx b/src/extension/prompts/node/agent/xAIPrompts.tsx index a7854f9601..d82f1d34ca 100644 --- a/src/extension/prompts/node/agent/xAIPrompts.tsx +++ b/src/extension/prompts/node/agent/xAIPrompts.tsx @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ import { PromptElement, PromptSizing } from '@vscode/prompt-tsx'; -import { isHiddenModelB } from '../../../../platform/endpoint/common/chatModelCapabilities'; import { IChatEndpoint } from '../../../../platform/networking/common/networking'; import { ToolName } from '../../../tools/common/toolNames'; import { InstructionMessage } from '../base/instructionMessage'; @@ -122,10 +121,6 @@ class DefaultGrokCodeFastAgentPrompt extends PromptElement { - return isHiddenModelB(endpoint); - } - resolvePrompt(endpoint: IChatEndpoint): PromptConstructor | undefined { return DefaultGrokCodeFastAgentPrompt; } diff --git a/src/platform/endpoint/common/chatModelCapabilities.ts b/src/platform/endpoint/common/chatModelCapabilities.ts index ad0ae52f44..dc8d937065 100644 --- a/src/platform/endpoint/common/chatModelCapabilities.ts +++ b/src/platform/endpoint/common/chatModelCapabilities.ts @@ -12,11 +12,6 @@ const HIDDEN_MODEL_A_HASHES = [ '6b0f165d0590bf8d508540a796b4fda77bf6a0a4ed4e8524d5451b1913100a95' ]; -const HIDDEN_MODEL_B_HASHES = [ - 'e0f69b60bf6a6e138121a69884fa51b89aae7315f37d5f41bd0500b2d9346048', - '19bf22638886749a7a346f454f1c957c07db04b3302c0671f1dafa66d00508c6' -]; - const VSC_MODEL_HASHES = [ '7b667eee9b3517fb9aae7061617fd9cec524859fcd6a20a605bfb142a6b0f14e', 'e7cfc1a7adaf9e419044e731b7a9e21940a5280a438b472db0c46752dd70eab3', @@ -35,11 +30,6 @@ export async function isHiddenModelA(model: LanguageModelChat | IChatEndpoint) { return HIDDEN_MODEL_A_HASHES.includes(h); } -export async function isHiddenModelB(model: LanguageModelChat | IChatEndpoint) { - const h = await getCachedSha256Hash(getModelId(model)); - return HIDDEN_MODEL_B_HASHES.includes(h); -} - export async function isVSCModel(model: LanguageModelChat | IChatEndpoint) { const h = await getCachedSha256Hash(getModelId(model)); return VSC_MODEL_HASHES.includes(h); @@ -80,7 +70,7 @@ export function modelPrefersJsonNotebookRepresentation(model: LanguageModelChat * Model supports replace_string_in_file as an edit tool. */ export async function modelSupportsReplaceString(model: LanguageModelChat | IChatEndpoint): Promise { - return model.family.includes('gemini') || model.family.includes('grok-code') || await isHiddenModelB(model) || await modelSupportsMultiReplaceString(model); + return model.family.includes('gemini') || model.family.includes('grok-code') || await modelSupportsMultiReplaceString(model); } /** @@ -95,7 +85,7 @@ export async function modelSupportsMultiReplaceString(model: LanguageModelChat | * without needing insert_edit_into_file. */ export async function modelCanUseReplaceStringExclusively(model: LanguageModelChat | IChatEndpoint): Promise { - return model.family.startsWith('claude') || model.family.startsWith('Anthropic') || model.family.includes('grok-code') || await isHiddenModelB(model); + return model.family.startsWith('claude') || model.family.startsWith('Anthropic') || model.family.includes('grok-code'); } /**