Skip to content

Commit 03c1bf4

Browse files
committed
Fix extra-payload destructuring in Ollama provider
extra-payload was destructured from the callbacks map (arg 2) but `prompt!` passes it in the opts map (arg 1). This meant extraPayload from model config was silently ignored for Ollama requests. All other providers (openai, anthropic, google, github-copilot) receive extra-payload in the opts map, consistent with how `prompt!` passes it. This fix aligns the Ollama provider with the same pattern.
1 parent 1d7f6a7 commit 03c1bf4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/eca/llm_providers/ollama.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@
118118
}))
119119
messages))
120120

121-
(defn chat! [{:keys [model user-messages reason? instructions api-url past-messages tools extra-headers]}
121+
(defn chat! [{:keys [model user-messages reason? instructions api-url past-messages tools extra-headers extra-payload]}
122122
{:keys [on-message-received on-error on-prepare-tool-call on-tools-called
123-
on-reason extra-payload] :as callbacks}]
123+
on-reason] :as callbacks}]
124124
(let [messages (concat
125125
(normalize-messages (concat [{:role "system" :content instructions}] past-messages))
126126
(normalize-messages user-messages))

0 commit comments

Comments
 (0)