branch: externals/llm
commit 1d2250805db9e71d7d004cc0a86077ae4e498213
Author: Andrew Hyatt <ahy...@gmail.com>
Commit: GitHub <nore...@github.com>

    Add Gemini 2.0 Pro model, and use 2.0 flash as a default (#152)
---
 NEWS.org      | 2 ++
 llm-gemini.el | 2 +-
 llm-models.el | 5 +++++
 llm-test.el   | 2 +-
 4 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index 15646e6bb9..b4668d0fa7 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -1,3 +1,5 @@
+* Version 0.23.1
+- Add Gemini 2.0 pro experimental model, default to 2.0 flash
 * Version 0.23.0
 - Add GitHub's GitHub Models
 - Accept lists as nonstandard
diff --git a/llm-gemini.el b/llm-gemini.el
index cedcbe3bf2..e7b8e6030e 100644
--- a/llm-gemini.el
+++ b/llm-gemini.el
@@ -37,7 +37,7 @@
 
 KEY is the API key for the client.
 You can get this at https://makersuite.google.com/app/apikey.";
-  key (embedding-model "embedding-001") (chat-model "gemini-1.5-pro"))
+  key (embedding-model "embedding-001") (chat-model "gemini-2.0-flash-001"))
 
 (cl-defmethod llm-nonfree-message-info ((_ llm-gemini))
   "Return nonfree terms of service for Gemini."
diff --git a/llm-models.el b/llm-models.el
index 8470fffa6d..72b2c7b275 100644
--- a/llm-models.el
+++ b/llm-models.el
@@ -132,6 +132,11 @@ REGEX is a regular expression that can be used to identify 
the model, uniquely (
     :capabilities '(generation)
     :context-length 32768
     :regex "gemini-2\\.0-flash-thinking")
+   (make-llm-model
+    :name "Gemini 2.0 Pro" :symbol 'gemini-2.0-pro
+    :capabilities '(generation tool-use image-input audio-input video-input)
+    :context-length 1048576
+    :regex "gemini-2\\.0-pro")
    (make-llm-model
     :name "Gemini 1.5 Flash" :symbol 'gemini-1.5-flash
     :capabilities '(generation tool-use image-input audio-input video-input)
diff --git a/llm-test.el b/llm-test.el
index ea7bd5a061..32f6dcbc00 100644
--- a/llm-test.el
+++ b/llm-test.el
@@ -308,7 +308,7 @@
   (should-not (member 'embeddings (llm-capabilities 
(make-llm-openai-compatible :chat-model "llama-3")))))
 
 (ert-deftest llm-test-chat-token-limit-gemini ()
-  (should (= 2097152 (llm-chat-token-limit (make-llm-gemini))))
+  (should (= 1048576 (llm-chat-token-limit (make-llm-gemini))))
   (should (= 1048576 (llm-chat-token-limit
                       (make-llm-gemini :chat-model "gemini-1.5-flash"))))
   (should (= 4096 (llm-chat-token-limit

Reply via email to