Skip to content

Commit 6a0fb68

Browse files
committed
Fix 0.75.3 regression on custom openai-chat providers.
1 parent 2d3a840 commit 6a0fb68

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
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 0.75.3 regression on custom openai-chat providers.
6+
57
## 0.75.3
68

79
- Support custom think tag start and end for openai-chat models via `think-tag-start` and `think-tag-end` provider configs. #188

src/eca/llm_providers/openai_chat.clj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,11 @@
292292
Compatible with OpenRouter and other OpenAI-compatible providers."
293293
[{:keys [model user-messages instructions temperature api-key api-url url-relative-path
294294
past-messages tools extra-payload extra-headers supports-image?
295-
think-tag-start think-tag-end]
296-
:or {think-tag-start "<think>"
297-
think-tag-end "</think>"}}
295+
think-tag-start think-tag-end]}
298296
{:keys [on-message-received on-error on-prepare-tool-call on-tools-called on-reason on-usage-updated] :as callbacks}]
299-
(let [stream? (boolean callbacks)
297+
(let [think-tag-start (or think-tag-start "<think>")
298+
think-tag-end (or think-tag-end "</think>")
299+
stream? (boolean callbacks)
300300
messages (vec (concat
301301
(when instructions [{:role "system" :content instructions}])
302302
(normalize-messages past-messages supports-image? think-tag-start think-tag-end)

0 commit comments

Comments
 (0)