Skip to content

Commit b520df9

Browse files
committed
Update model preference order for PR generation in CopilotTitleAndDescriptionProvider
1 parent a78cf11 commit b520df9

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

src/lm/copilotTitleAndDescriptionProvider.ts

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,23 +101,35 @@ export class CopilotTitleAndDescriptionProvider implements TitleAndDescriptionPr
101101
* Prioritizes models based on their capabilities for text generation.
102102
*/
103103
private selectBestModel(models: readonly vscode.LanguageModelChat[]): vscode.LanguageModelChat {
104-
// Define model preference order (higher index = higher preference)
104+
// Define model preference order (higher priority = better for PR generation)
105105
const modelPreferences = [
106106
// Basic models (lowest priority)
107107
{ vendor: 'copilot', family: 'gpt-3.5-turbo', priority: 1 },
108108
{ vendor: 'copilot', family: 'gpt-3.5', priority: 1 },
109109

110-
// Advanced models (medium priority)
110+
// Standard GPT-4 models (medium priority)
111111
{ vendor: 'copilot', family: 'gpt-4', priority: 2 },
112-
{ vendor: 'copilot', family: 'gpt-4-turbo', priority: 3 },
113-
{ vendor: 'copilot', family: 'gpt-4o', priority: 4 },
114112
{ vendor: 'copilot', family: 'gpt-4o-mini', priority: 3 },
115-
116-
// Claude models (highest priority for text generation)
117-
{ vendor: 'copilot', family: 'claude-3-haiku', priority: 5 },
118-
{ vendor: 'copilot', family: 'claude-3-sonnet', priority: 6 },
119-
{ vendor: 'copilot', family: 'claude-3-opus', priority: 7 },
120-
{ vendor: 'copilot', family: 'claude-3-5-sonnet', priority: 8 },
113+
{ vendor: 'copilot', family: 'gpt-4-turbo', priority: 4 },
114+
{ vendor: 'copilot', family: 'gpt-4o', priority: 5 },
115+
{ vendor: 'copilot', family: 'gpt-4.1', priority: 6 },
116+
117+
// Claude models (high priority for text generation)
118+
{ vendor: 'copilot', family: 'claude-3-haiku', priority: 7 },
119+
{ vendor: 'copilot', family: 'claude-3-sonnet', priority: 8 },
120+
{ vendor: 'copilot', family: 'claude-3.5-sonnet', priority: 9 },
121+
{ vendor: 'copilot', family: 'claude-3-opus', priority: 10 },
122+
{ vendor: 'copilot', family: 'claude-3.7-sonnet', priority: 11 },
123+
{ vendor: 'copilot', family: 'claude-3.7-sonnet-thought', priority: 12 },
124+
125+
// Gemini models (high priority)
126+
{ vendor: 'copilot', family: 'gemini-2.0-flash', priority: 13 },
127+
{ vendor: 'copilot', family: 'gemini-2.5-pro', priority: 14 },
128+
129+
// Latest advanced models (highest priority)
130+
{ vendor: 'copilot', family: 'o3-mini', priority: 15 },
131+
{ vendor: 'copilot', family: 'claude-sonnet-4', priority: 16 },
132+
{ vendor: 'copilot', family: 'o4-mini', priority: 17 },
121133
];
122134

123135
// Find the highest priority model available

0 commit comments

Comments
 (0)