Add experimental alt prompt for Claude Opus 4.7#313916
Merged
Conversation
Contributor
|
Base:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an experiment-gated Claude Opus 4.7 agent prompt to the Copilot extension, so Anthropic Opus 4.7 traffic can use a separate system prompt without changing the existing Opus 4.6 path.
Changes:
- Adds a new experiment-based config key for
github.copilot.chat.claude47OpusPrompt.enabled, defaulting tofalse. - Introduces
Claude47OpusPromptas a standalone Anthropic agent prompt variant with updated instructions for Opus 4.7. - Updates the Anthropic prompt resolver to route
claude-opus-4-7*/claude-opus-4.7*models to the new prompt when the experiment is enabled.
Show a summary per file
| File | Description |
|---|---|
extensions/copilot/src/platform/configuration/common/configurationService.ts |
Adds the experiment-backed config key used to gate the new prompt. |
extensions/copilot/src/extension/prompts/node/agent/anthropicPrompts.tsx |
Adds the new Opus 4.7 prompt class and resolver logic that switches prompt selection based on model + experiment flag. |
extensions/copilot/package.nls.json |
Adds the localized description string for the new setting. |
extensions/copilot/package.json |
Exposes the new experimental setting in the extension manifest. |
Copilot's findings
Comments suppressed due to low confidence (1)
extensions/copilot/src/extension/prompts/node/agent/anthropicPrompts.tsx:651
- This adds new model-selection logic for
claude-opus-4-7*/claude-opus-4.7*, but there is no regression test covering the on/off behavior ofgithub.copilot.chat.claude47OpusPrompt.enabled. The existing prompt snapshot suite already exercises multiple Anthropic families, so without a focused test here a typo in the model match or flag check would silently route 4.7 traffic to the wrong prompt.
if (this.isOpus47(endpoint) && this.configurationService.getExperimentBasedConfig(ConfigKey.Claude47OpusPromptEnabled, this.experimentationService)) {
return Claude47OpusPrompt;
- Files reviewed: 4/4 changed files
- Comments generated: 1
roblourens
approved these changes
May 3, 2026
cbf0916 to
2d93004
Compare
Collaborator
Author
|
Tracking issue: microsoft/vscode-internalbacklog#7600 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Claude47OpusPrompt(standalone copy ofClaude46OpusPrompt) gated behind the experiment-based settinggithub.copilot.chat.claude47OpusPrompt.enabled(defaultfalse). When the setting is on,claude-opus-4-7*/claude-opus-4.7*traffic routes to the new prompt; otherwise it falls back toClaude46OpusPrompt.<skillUsage>primer.