Skip to content

Commit 7555dd0

Browse files
committed
Fix reasoning for openai o models
1 parent 9038cc7 commit 7555dd0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
- Fix reasoning for openai o models.
6+
57
## 0.11.0
68

79
- Add support for file contexts with line ranges.

src/eca/llm_providers/openai.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
(on-error {:exception e})))))
4343

4444
(defn ^:private past-messages->input [past-messages]
45-
(mapv (fn [{:keys [role content] :as msg}]
45+
(keep (fn [{:keys [role content] :as msg}]
4646
(case role
4747
"tool_call" {:type "function_call"
4848
:name (:name content)
@@ -52,6 +52,7 @@
5252
{:type "function_call_output"
5353
:call_id (:id content)
5454
:output (llm-util/stringfy-tool-result content)}
55+
"reason" nil
5556
msg))
5657
past-messages))
5758

0 commit comments

Comments
 (0)