File tree Expand file tree Collapse file tree 3 files changed +19
-9
lines changed
Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Original file line number Diff line number Diff line change 33## Unreleased
44
55- Improve read-file summary to show final range properly.
6+ - Improve model capabilities for providers which model name has slash: ` my-provider/anthropic/my-model `
67
78## 0.87.0
89
Original file line number Diff line number Diff line change 229229(defn ^:private valid-message?
230230 " Check if a message should be included in the final output."
231231 [{:keys [role content tool_calls reasoning_content] :as _msg}]
232- (and ( or (= role " tool" ) ; Never remove tool messages
233- (seq tool_calls) ; Keep messages with tool calls
234- (seq reasoning_content) ; Keep messages with reasoning_content (DeepSeek)
235- (and (string? content)
236- (not (string/blank? content)))
237- (sequential? content) )))
232+ (or (= role " tool" ) ; Never remove tool messages
233+ (seq tool_calls) ; Keep messages with tool calls
234+ (seq reasoning_content) ; Keep messages with reasoning_content (DeepSeek)
235+ (and (string? content)
236+ (not (string/blank? content)))
237+ (sequential? content)))
238238
239239(defn ^:private normalize-messages
240240 " Converts ECA message format to OpenAI API format (also used by compatible providers).
Original file line number Diff line number Diff line change 9292 (or (get all-models full-real-model)
9393 ; ; we guess the capabilities from
9494 ; ; the first model with same name
95- (when-let [found-full-model (first (filter #(= (shared/normalize-model-name real-model-name)
96- (shared/normalize-model-name (second (string/split % #"/" 2 ))))
95+ (when-let [found-full-model (first (filter #(or (= (shared/normalize-model-name (string/replace-first real-model-name
96+ #"(.+/)"
97+ " " ))
98+ (shared/normalize-model-name (second (string/split % #"/" 2 ))))
99+ (= (shared/normalize-model-name real-model-name)
100+ (shared/normalize-model-name (second (string/split % #"/" 2 )))))
97101 (keys all-models)))]
98102 (get all-models found-full-model))
99103 {:tools true
129133(comment
130134 (require '[clojure.pprint :as pprint])
131135 (pprint/pprint (models-dev ))
132- (pprint/pprint (all )))
136+ (pprint/pprint (all ))
137+ (require '[eca.db :as db])
138+ (sync-models! db/db*
139+ (config/all @db/db*)
140+ (fn [new-models]
141+ (pprint/pprint new-models))))
You can’t perform that action at this time.
0 commit comments