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

    Add Open AI's GPT-5 models (#207)
---
 NEWS.org           |  1 +
 llm-models-test.el |  2 +-
 llm-models.el      | 20 ++++++++++++++++++++
 3 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/NEWS.org b/NEWS.org
index e667fffa8c..ab5a2a5ae9 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -3,6 +3,7 @@
 - Change default Vertex, Gemini model to Gemini 2.5 Pro.
 - Add Gemini 2.5 Flash model
 - Fix Vertex / Gemini streaming tool calls
+- Add Open AI GPT-5 models
 * Version 0.27.0
 - Add =thinking= option to control the amount of thinking that happens for 
reasoning models.
 - Fix incorrectly low default Claude max tokens
diff --git a/llm-models-test.el b/llm-models-test.el
index b8d29ef638..91f96443ed 100644
--- a/llm-models-test.el
+++ b/llm-models-test.el
@@ -27,7 +27,7 @@
   ;; It shouldn't be the case that things match because they are first.  So we
   ;; will test various model names against the models and reverse the order of
   ;; the models to ensure that the first match is the unique match.
-  (let ((models-names-to-test '("gpt-3.5-turbo-instructo" "gpt-4" "gpt-4o"
+  (let ((models-names-to-test '("gpt-4" "gpt-4o" "gpt-5" "gpt-5-chat"
                                 "gemini-1.5-flash" "llama-3" "llama-3.1"
                                 "llama3" "llama3.1" 
"gemini-2.0-flash-thinking")))
     (dolist (model-name models-names-to-test)
diff --git a/llm-models.el b/llm-models.el
index 8f4cded106..2d20025d53 100644
--- a/llm-models.el
+++ b/llm-models.el
@@ -110,6 +110,26 @@ REGEX is a regular expression that can be used to identify 
the model, uniquely (
     :capabilities '(generation tool-use image-input)
     :context-length 8192
     :regex (rx (or (seq "gpt-4" string-end) "gpt-4-0613" "gpt-4-0314")))
+   (make-llm-model
+    :name "GPT-5 Chat" :symbol 'gpt-5-chat
+    :capabilities '(generation tool-use image-input json-response reasoning)
+    :context-length 400000
+    :regex "gpt-5-chat")
+   (make-llm-model
+    :name "GPT-5 Nano" :symbol 'gpt-5-nano
+    :capabilities '(generation tool-use image-input json-response reasoning)
+    :context-length 400000
+    :regex "gpt-5-nano")
+   (make-llm-model
+    :name "GPT-5 Mini" :symbol 'gpt-5-mini
+    :capabilities '(generation tool-use image-input json-response reasoning)
+    :context-length 400000
+    :regex "gpt-5-mini")
+   (make-llm-model
+    :name "GPT-5" :symbol 'gpt-5
+    :capabilities '(generation tool-use image-input json-response reasoning)
+    :context-length 400000
+    :regex (rx (seq "gpt-5" (or string-end (seq "-" (+ digit))))))
    (make-llm-model
     :name "text-embedding-3-large" :symbol 'text-embedding-3-large
     :capabilities '(embedding)

Reply via email to