-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Custom vsc model prompt #1504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom vsc model prompt #1504
Conversation
moving preamble instruction to system instruction while using custom reminder in user message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR extends custom system prompts and preamble instructions specifically for experimental VSC model family members using hash-based detection. The changes introduce specialized prompting behavior for hidden models while maintaining backward compatibility with existing model-specific prompts.
Key Changes
- Added hash-based detection for hidden model IDs to enable VSC-specific prompt routing
- Created comprehensive VSC model prompt with planning guidelines, markdown formatting rules, and preamble instructions
- Integrated preamble reminders into user messages for hidden models to reinforce instruction adherence
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/platform/endpoint/common/chatModelCapabilities.ts |
Adds isHiddenModelById function and HIDDEN_MODEL_A_ID_HASHES constant for model ID detection |
src/extension/prompts/node/agent/vscModelPrompts.tsx |
New file defining VSCModelPrompt with planning, formatting, and preamble instructions |
src/extension/prompts/node/agent/allAgentPrompts.ts |
Imports the new VSC model prompts module |
src/extension/prompts/node/agent/agentPrompt.tsx |
Updates prompt resolution logic to use VSC prompts for hidden models and adds preamble reminders |
|
|
||
| const agentPromptResolver = PromptRegistry.getPrompt(this.props.endpoint.model ?? 'unknown'); | ||
| // Try VSCModel prompt for hidden models, otherwise use model-specific prompt | ||
| const modelKey = await isHiddenModelById(this.props.endpoint) ? 'vscModel' : this.props.endpoint.model ?? 'unknown'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will get called for all models. regardless of vsc models. I'd rather we have a special handling for just the hashes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't follow; this needs to be called for all models to check if they belong to vsc models.
9a8eeba to
f84dd5d
Compare
f84dd5d to
c25f3bc
Compare
…modelFamilies' - Reduces code duplication while maintaining same functionality
c25f3bc to
aaded86
Compare
moving preamble instruction to system instruction while using custom reminder in user message.
…modelFamilies' - Reduces code duplication while maintaining same functionality
@microsoft-github-policy-service agree company="Microsoft" |
…code-copilot-chat into ababouelenin/custom-prompt-model-id
ba53292
0634281 to
ba53292
Compare
Changes
We want to extend custom system prompt and preamble instructions for experimental VSC model family using hash-based detection.
Vsc Custom Prompt
1- System Prompt (
vscModelPrompts.tsx):manage_todo_listtool (trivial vs non-trivial tasks)2- Preamble Instructions:
Implementation
isHiddenModelByModelIdto check if the model id it's one of the hidden models