Anthropic's tool search compatibility table lists Haiku 4.5 as supported,
but the capability gate denied all Haiku. Sonnet 5 and Mythos 5 were also
missing from the tool's model picker list.
* Add Claude Opus 5 system prompt
Adds a minimal Opus 5 prompt behind `chat.claudeOpus5Prompt.enabled`,
following Anthropic's guidance for the Claude 5 generation: describe the
environment as facts rather than rules, put the behavioral weight into
scope and correction guidance, and drop the rule lists the model now
handles with its own judgement. Off by default, falling back to the
Claude 4.6 Opus prompt.
Also:
- Remove the Opus 4.8 and Sonnet 5 prompts and their settings. Both
models now use the Claude 4.6 prompts.
- Add comment-etiquette guidance to the shared optimized reminder, so it
reaches every Claude 4.6+ family rather than a single prompt.
- Enable tool search for claude-opus-5.
* Reword Opus 5 prompt to remove borrowed phrasing
The prompt had picked up wording from a reference system prompt during
drafting. Rewrites every affected passage in original wording, keeping
the guidance intact. Verified no shared word sequence of five or more
remains between the branch's added lines and that reference.
* Add tool search to Copilot agent host
* Address review: alias-aware tool-search gating, drop transient candidates, cover prompt branch
- Compute the tool-search capability decision from the family-aliased model in
both the launcher and CopilotAgentSession so an aliased preview model is no
longer rejected and the two stay in agreement.
- Strip the transient tool-search candidate corpus from the completed tool
call's _meta so repeated searches don't bloat synchronized session state or
persist across reconnects.
- Add active/inactive + composition tests for the tool-search prompt line at
both the unit and prompt-registry layers, plus a model-family alias
regression test for tool-search gating.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Remove obsolete tool-search start barrier
* Address tool-search review feedback
* Use the extension's existing tool-embedding cache for Agent Host search
* Address review: keep server tools eager, harden tool-search candidate corpus
- Force server-provided SDK tools to defer:'never' so they stay eager and are
not deferred behind tool_search.
- Default missing candidate descriptions to '' when building the tool-search
corpus, so the all-or-nothing metadata reader never drops a valid corpus.
- Drop the unused inputSchema field from the tool-search candidate corpus
(name + description are all the embeddings ranker consumes).
- Use the client-facing tool name in the custom-tool auto-approve membership
check so a deferred tool_search runtime name resolves correctly.
- Remove a redundant conjunct in _clientToolName already implied by
_isToolSearchActive().
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Temporarily disable GPT tool search
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
getAvailableTools(): skip virtual-tool grouping for any tool-search-capable endpoint (not just Anthropic). Previously GPT-5.4/5.5 ran virtual-tool grouping AND responses-API client tool search simultaneously, so real MCP tools were hidden behind activate_* groups (or trimmed) and never appeared in the request's tools map - making them searchable via tool_search but not callable.
toolSearchTool: exclude always-available (non-deferred) tools from the tool_search candidate set so the limited result slots only go to tools that actually need loading.
Fixes#317998Fixes#317992
chronicle: per-subcommand telemetry attribution for sessionStoreSql tool
Add a 'subcommand' enum input on copilot_sessionStoreSql so each /chronicle slash command (standup, tips, cost-tips, search, improve, reindex) tags its tool calls. Plumb it through _invokeQuery/_invokeStandup/_invokeReindex and emit it on the chronicle.sqlQuery telemetry event (with 'unknown' for ad-hoc model calls). Also add command/target/success dimensions while preserving the legacy 'source' value so existing dashboards keep working. Update each chronicle-*.prompt.md to instruct the model to set the subcommand on every call.
Ensures the search subagent's parentChatSessionId is always set by
falling back to the conversation's sessionId when the capturing token's
chatSessionId is unavailable. Without this fallback the search subagent
spans lacked PARENT_CHAT_SESSION_ID and were uploaded as independent
cloud sessions instead of folding into the parent.
Follow-up fix for #318463.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Two
related issues caused even tiny notebook cell outputs (e.g. 5 bytes)
to be replaced with "Output is too large to be used as context".
1. Inverted size check in `RunNotebookCellOutput`: `getCharLimit` converts
tokens to chars (×4), but it was applied to the byteLength side and
compared against a token count. Compare byteLength against
getCharLimit(tokenBudget / sizeLimitRatio) instead — the threshold was
16× too small.
2. Remove `ReadCellOutput` from `toolsCalledInParallel`. Tools in that set
are invoked eagerly with a sentinel `{ tokenBudget: 1 }` sizing on the
premise that they don't consume sizing info. `RunNotebookCellOutput`
does — it gates output on `sizing.tokenBudget` — so the sentinel made
every non-empty output trip the size check. Letting it use the normal
lazy path gives it the endpoint's real prompt budget.
Anthropic returns 400 (`messages.N.content.M: 'thinking' or 'redacted_thinking'
blocks in the latest assistant message cannot be modified` and `Invalid 'data'
in 'redacted_thinking' block`) when historical thinking/redacted_thinking blocks
have lost or rotated their signature/data on round-trip — most visibly on
claude-haiku-4.5 / claude-sonnet-4.6 in agent mode (~18k hits/day).
The Anthropic Extended Thinking docs explicitly allow omitting thinking blocks
from prior assistant role turns, and on Opus 4.5+/Sonnet 4.6+ omission is
neutral for quality. Pre-#315406 (≤ 0.47) we already did this; #315406 added
'messages' to apiSupportsHistoricalThinking, which is what flipped the behavior.
Reverts only the 'messages' membership; 'responses' (OpenAI Responses API)
still needs to round-trip encrypted reasoning blocks across turns and is
unaffected. Flips the matching unit test and renames model fixtures to
claude-haiku-4-5 (the dominant in-prod offender).
Long lines in read_file output were getting pruned by the token-budget
prompt renderer, so the agent saw an empty result and looped — adding
unbounded session log size each retry. Truncate any line over 2000
characters at the source with a `[truncated]` marker, and append a
notice when any line was truncated so the model knows the data is
abbreviated rather than missing.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Thinking blocks are signed/encrypted by the producing model and tied to its API surface. The previous gate short-circuited the same-model check for the current turn ('!isHistorical || ...'), so a round produced by a different model in the same turn — e.g. a subagent handoff or a mid-turn model switch — would still have its thinking replayed through the endpoint's model. Anthropic Messages rejects this with a signature validation error; Responses treats it as garbage reasoning state.
Make sameModelAsEndpoint a hard precondition for including thinking, regardless of whether the round is historical, matching the existing convention used a few lines below for phase.
Related: https://github.com/microsoft/vscode/issues/316536
Introduces dedicated endpoint resolver classes (CopilotUtilitySmallChatEndpoint,
CopilotUtilityChatEndpoint) in place of the ModelAliasRegistry indirection, and
republishes the resolved utility endpoints under their new family ids
('copilot-utility-small', 'copilot-utility') as LanguageModelChatInformation
entries so that workbench callers using selectLanguageModels({ vendor: 'copilot',
id: 'copilot-utility-small' }) keep working.
- Renames the internal family identifiers everywhere they're consumed:
callers, tests, and workbench code in src/vs/workbench/contrib/chat/.
- Drops src/platform/endpoint/common/modelAliasRegistry.ts.
- CopilotUtilitySmallChatEndpoint.resolve tries a small primary model and
falls back to a second small model if the primary is unavailable.
- CopilotUtilityChatEndpoint.resolve returns the API-marked default base
model (is_chat_fallback === true), preserving existing behavior.
- Updates _copilotBaseModel field and 'copilot-base' literal in
ModelMetadataFetcher to _copilotUtilityModel / 'copilot-utility'.
No user-facing behavior change. The setting-driven 'disabled'/'default'/BYOK
selector support will be layered on top in a follow-up.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
remove comment
remove code smell
remove more code smell
* mcp: show environement variables in mcp server editor
* tools: ensure apply-patch tool does not change files during healing
* mcp: show headers in server editor, too
---------
Co-authored-by: Connor Peet <connor@peet.io>
Tool search is now always enabled for gpt-5.4/gpt-5.5, matching the
messages API path. Aligns the responses API on the same
endpoint.supportsToolSearch capability flag.
Also registers ToolSearchTool for gpt-5.4/gpt-5.5 and the
claude-opus-4.7 variants so model-specific tool gating actually
matches the supported endpoints.
Memory tool is now always enabled. Removes the preview gate, the config
key, the now-unused DI params on MemoryTool/MemoryContextPrompt/
MemoryInstructionsPrompt, and isAnthropicMemoryToolEnabled (replaced by
modelSupportsMemory at the BYOK call site).
Strip Copilot Memory (CAPI) feature entirely
Removes the CAPI-backed Copilot Memory that synced repository-scoped facts
to GitHub. The local file-based MemoryTool with user/session/repo scopes
remains as the sole memory mechanism.
- Delete AgentMemoryService and its test.
- Remove the github.copilot.chat.copilotMemory.enabled setting and its NLS string.
- Remove ConfigKey.CopilotMemoryEnabled.
- Strip all CAPI gating in memoryTool.tsx, memoryContextPrompt.tsx, tools.ts.
- Drop _dispatchRepoCAPI / _repoCreate / _sendRepoTelemetry.
- /memories/repo/ now always routes to local storage.
- Update memoryTool.spec.tsx: remove mock CAPI services and CAPI-only tests.
- Update simulationExtHostToolsService.ts for the new ToolsContribution arity.
Introduce a WorkingDirectory class that encapsulates the "use explicit
working directory if set, otherwise fall back to workspace folders" logic.
This replaces the pattern of passing a raw workingDirectory URI alongside
IWorkspaceService throughout tools, prompts, and confirmation helpers.
- Extension side: WorkingDirectory in platform/workspace/common/ uses
@IWorkspaceService DI injection
- VS Code core side: WorkingDirectory in chat/common/ wraps
IWorkspaceContextService
- Refactored inputGlobToPattern, assertFileOkForTool,
isFileExternalAndNeedsConfirmation, isDirExternalAndNeedsConfirmation,
createEditConfirmation, and resolveToolUri to use WorkingDirectory
- Updated prompt components (WorkspaceFoldersHint,
MultirootWorkspaceStructure) and tool implementations
(findFiles, findTextInFiles, searchSubagent, fetchPage)
* refactor: enhance cache control logic for tools and system prefixes
* refactor: enhance summarization and cache control handling in agent prompts
* refactor: remove unused countCacheControl function from messagesApi tests
* Add tests for summarization and cache control features
- Introduced a new snapshot test for summarization without cache breakpoints in `agentPrompt.spec.tsx`.
- Added a new test suite for `clearAllCacheControl` in `messagesApi.spec.ts` to validate cache control stripping and limits.
- Created a snapshot for summarization without cache breakpoints in the new snapshot file.
* test: pass enableSummarization in summarization.spec helper
The agentPrompt prop split decoupled enableSummarization from
enableCacheBreakpoints, so summarization.spec.tsx — which only set
enableCacheBreakpoints — fell through to the non-summarized branch
and broke 5 snapshot tests. Default the helper's baseProps to
enableSummarization: true so each test exercises the summarized path
as intended; individual tests can still override via otherProps.