branch: externals/llm
commit fcb32e9f73e47096b66d6c2982cfa24bf201c590
Author: Andrew Hyatt <[email protected]>
Commit: Andrew Hyatt <[email protected]>
Add StepFun 3.5 Flash model, accept reasoning blocks
---
NEWS.org | 3 ++-
llm-models.el | 5 +++++
llm-openai.el | 6 ++++--
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/NEWS.org b/NEWS.org
index 260f58d1d1..9604fd81f2 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -1,6 +1,7 @@
* Version 0.30.1
- Add Claude Sonnet 4.6.
-- Add support for Open AI compatible =reasoning_content= blocks.
+- Add StepFun 3.5 Flash
+- Add support for Open AI compatible =reasoning_content= and =reasoning=
blocks.
* Version 0.30.0
- Add =:input-tokens= and =:output-tokens= to multioutput result.
- Added Qwen 3.5, LFM2 and LFM 2.5 Thinking
diff --git a/llm-models.el b/llm-models.el
index 2c378e15cc..89aca52aeb 100644
--- a/llm-models.el
+++ b/llm-models.el
@@ -429,6 +429,11 @@ REGEX is a regular expression that can be used to identify
the model, uniquely (
:capabilities '(generation free-software reasoning tool-use) ; Modified
MIT license
:context-length 256000
:regex "kimi-k2\\.5")
+ (make-llm-model
+ :name "StepFun 3.5 Flash" :symbol 'stepfun-3.5-flash
+ :capabilities '(generation reasoning tool-use)
+ :context-length 256000
+ :regex "step-3.5-flash")
(make-llm-model
:name "glm-5" :symbol 'glm-5
:capabilities '(generation free-software reasoning tool-use) ; Apache
license
diff --git a/llm-openai.el b/llm-openai.el
index 9f862f0390..a43a5ec1f0 100644
--- a/llm-openai.el
+++ b/llm-openai.el
@@ -354,8 +354,10 @@ STREAMING if non-nil, turn on response streaming."
;; Several Open AI compatible providers such as oMLX include a
;; "reasoning_content" field in the response.
(cl-defmethod llm-provider-extract-reasoning ((_ llm-openai-compatible)
response)
- (assoc-default 'reasoning_content
- (assoc-default 'message (aref (cdr (assoc 'choices response))
0))))
+ (when-let ((message (assoc-default 'message (aref (cdr (assoc 'choices
response)) 0))))
+ (or
+ (assoc-default 'reasoning_content message)
+ (assoc-default 'reasoning message))))
(cl-defmethod llm-provider-populate-tool-uses ((_ llm-openai) prompt tool-uses)