branch: externals/llm
commit 0bd5c4da403cc0d394816684acb2f1cd8c180df5
Author: yydcnjjw <[email protected]>
Commit: GitHub <[email protected]>

    Fix(llm-ollama): Set :reasoning to 'none does not take effect (#239)
    
    :reasoning Set to 'none' the request will ignore the thinking field,
    leading to the use of the default strategy
---
 llm-ollama.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/llm-ollama.el b/llm-ollama.el
index 3e90099221..7d1ad7f551 100644
--- a/llm-ollama.el
+++ b/llm-ollama.el
@@ -190,14 +190,14 @@ PROVIDER is the llm-ollama provider."
     (setq request-plist (plist-put request-plist :stream (if streaming t 
:false)))
     (let ((model (llm-models-match (llm-ollama-chat-model provider))))
       (when (and (llm-chat-prompt-reasoning prompt)
-                 (member 'reasoning (llm-model-capabilities model))
-                 (not (eq 'none (llm-chat-prompt-reasoning prompt))))
+                 (member 'reasoning (llm-model-capabilities model)))
         (setq request-plist (plist-put request-plist :think
-                                       (if (eq 'gpt-oss model)
+                                       (if (eq 'gpt-oss (llm-model-symbol 
model))
                                            (pcase (llm-chat-prompt-reasoning 
prompt)
                                              ('light "low")
                                              ('medium "medium")
-                                             ('maximum "high"))
+                                             ('maximum "high")
+                                             ('none :false))
                                          (if (eq 'none 
(llm-chat-prompt-reasoning prompt))
                                              :false
                                            't))))))

Reply via email to