Skip to content

Commit fa89c18

Browse files
authored
Merge pull request #348 from djr7C4/o3-and-o4-mini
2 parents a8caa47 + e2f8e11 commit fa89c18

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

chatgpt-shell-openai.el

+14-14
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,24 @@ HANDLER, FILTER and OTHER-PARAMS."
122122
:token-width 3
123123
;; https://platform.openai.com/docs/models/gpt-4o-mini-search-preview
124124
:context-window 128000)
125+
(chatgpt-shell-openai-make-model
126+
:version "o4-mini"
127+
:token-width 3
128+
:context-window 200000
129+
:reasoning-effort t
130+
:validate-command #'chatgpt-shell-validate-no-system-prompt)
131+
(chatgpt-shell-openai-make-model
132+
:version "o3"
133+
:token-width 3
134+
:context-window 200000
135+
:reasoning-effort t
136+
:validate-command #'chatgpt-shell-validate-no-system-prompt)
125137
(chatgpt-shell-openai-make-model
126138
:version "o3-mini"
127139
:token-width 3
128140
:context-window 200000
129141
:reasoning-effort t
130-
:validate-command
131-
;; TODO: Standardize whether or not a model supports system prompts.
132-
(lambda (command model settings)
133-
(or (chatgpt-shell-openai--validate-command command model settings)
134-
(when (map-elt settings :system-prompt)
135-
(format "Model \"%s\" does not support system prompts. Please unset via \"M-x chatgpt-shell-swap-system-prompt\" by selecting None."
136-
(map-elt model :version))))))
142+
:validate-command #'chatgpt-shell-validate-no-system-prompt)
137143
(chatgpt-shell-openai-make-model
138144
:version "o1"
139145
:token-width 3
@@ -154,13 +160,7 @@ HANDLER, FILTER and OTHER-PARAMS."
154160
;; https://platform.openai.com/docs/models/gpt-01-mini
155161
:context-window 128000
156162
;; Reasoning effort is only supported for o1 and o3-mini.
157-
:validate-command
158-
;; TODO: Standardize whether or not a model supports system prompts.
159-
(lambda (command model settings)
160-
(or (chatgpt-shell-openai--validate-command command model settings)
161-
(when (map-elt settings :system-prompt)
162-
(format "Model \"%s\" does not support system prompts. Please unset via \"M-x chatgpt-shell-swap-system-prompt\" by selecting None."
163-
(map-elt model :version))))))
163+
:validate-command #'chatgpt-shell-validate-no-system-prompt)
164164
(chatgpt-shell-openai-make-model
165165
:version "gpt-4.5-preview"
166166
:token-width 3

0 commit comments

Comments
 (0)