copilot_chat: Add Gemini 2.5 Pro support to Copilot Chat (#28660)

This commit is contained in:
Richard Hao 2025-04-15 03:33:22 +08:00 committed by GitHub
parent 84aa480344
commit 5b6efa4c02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 4 deletions

View file

@ -210,7 +210,9 @@ impl LanguageModel for CopilotChatLanguageModel {
CopilotChatModel::Claude3_5Sonnet => count_anthropic_tokens(request, cx),
CopilotChatModel::Claude3_7Sonnet => count_anthropic_tokens(request, cx),
CopilotChatModel::Claude3_7SonnetThinking => count_anthropic_tokens(request, cx),
CopilotChatModel::Gemini20Flash => count_google_tokens(request, cx),
CopilotChatModel::Gemini20Flash | CopilotChatModel::Gemini25Pro => {
count_google_tokens(request, cx)
}
_ => {
let model = match self.model {
CopilotChatModel::Gpt4o => open_ai::Model::FourOmni,
@ -221,7 +223,8 @@ impl LanguageModel for CopilotChatLanguageModel {
CopilotChatModel::Claude3_5Sonnet
| CopilotChatModel::Claude3_7Sonnet
| CopilotChatModel::Claude3_7SonnetThinking
| CopilotChatModel::Gemini20Flash => {
| CopilotChatModel::Gemini20Flash
| CopilotChatModel::Gemini25Pro => {
unreachable!()
}
};