Skip to content

Commit a4ec470

Browse files
committed
Fix regression in check for available models.
Fixes #297
1 parent 6b62114 commit a4ec470

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Unreleased
44

55
- Improve anthropic login wording.
6+
- Fix regression in check for available models. #297
67

78
## 0.100.0
89

src/eca/features/chat.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,6 +1091,8 @@
10911091
Only :prompt-message supports rewrite, other only allow additionalContext append."
10921092
[user-messages source-type
10931093
{:keys [db* config chat-id provider model full-model agent instructions metrics message] :as chat-ctx}]
1094+
(when-not full-model
1095+
(throw (ex-info llm-api/no-available-model-error-msg {})))
10941096
(let [original-text (or message (-> user-messages first :content first :text))
10951097
modify-allowed? (= source-type :prompt-message)
10961098
run-hooks? (#{:prompt-message :eca-command :mcp-prompt} source-type)
@@ -1379,8 +1381,6 @@
13791381
(contains? (:models db) agent-default-model))
13801382
agent-default-model
13811383
(default-model db config))))
1382-
_ (when-not full-model
1383-
(throw (ex-info llm-api/no-available-model-error-msg {})))
13841384
rules (f.rules/all config (:workspace-folders db))
13851385
all-tools (f.tools/all-tools chat-id agent @db* config)
13861386
skills (->> (f.skills/all config (:workspace-folders db))

0 commit comments

Comments
 (0)