File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 22
33## Unreleased
44
5+ - Custom providers do not require the existense of ` key ` or ` keyEnv ` . #194
6+
57## 0.76.0
68
79- Updated instructions for ` /login ` command and invalid input handling.
Original file line number Diff line number Diff line change 3838 :url " https://api.openai.com"
3939 :key nil
4040 :keyEnv " OPENAI_API_KEY"
41+ :requiresAuth? true
4142 :models {" gpt-5-codex" {}
4243 " gpt-5" {}
4344 " gpt-5-mini" {}
4950 :url " https://api.anthropic.com"
5051 :key nil
5152 :keyEnv " ANTHROPIC_API_KEY"
53+ :requiresAuth? true
5254 :models {" claude-sonnet-4-5-20250929" {}
5355 " claude-sonnet-4-20250514" {}
5456 " claude-opus-4-1-20250805" {}
5860 :url " https://api.githubcopilot.com"
5961 :key nil ; ; not supported, requires login auth
6062 :keyEnv nil ; ; not supported, requires login auth
63+ :requiresAuth? true
6164 :models {" claude-haiku-4.5" {}
6265 " claude-opus-4.1" {}
6366 " claude-sonnet-4.5" {}
7174 :url " https://generativelanguage.googleapis.com/v1beta/openai"
7275 :key nil
7376 :keyEnv " GOOGLE_API_KEY"
77+ :requiresAuth? true
7478 :models {" gemini-2.0-flash" {}
7579 " gemini-2.5-pro" {}}}
7680 " ollama" {:url " http://localhost:11434"
Original file line number Diff line number Diff line change 6666
6767(defn ^:private auth-valid? [full-model db config]
6868 (let [[provider _model] (string/split full-model #"/" 2 )]
69- (and (llm-util/provider-api-url provider config)
70- (llm-util/provider-api-key provider (get-in db [:auth provider]) config))))
69+ (or (not (get-in config [:providers provider :requiresAuth? ] false ))
70+ (and (llm-util/provider-api-url provider config)
71+ (llm-util/provider-api-key provider (get-in db [:auth provider]) config)))))
7172
7273(defn sync-models! [db* config on-models-updated]
7374 (let [all-models (all )
9798 (:models provider-config))))
9899 {}
99100 (:providers config))
100- authenticated-models (into {}
101- (filter #(auth-valid? (first %) db config) all-supported-models))
102101 ollama-api-url (llm-util/provider-api-url " ollama" config)
103102 ollama-models (mapv
104103 (fn [{:keys [model] :as ollama-model}]
114113 (select-keys ollama-model [:tools :reason? ])))
115114 {}
116115 ollama-models)
116+ authenticated-models (into {}
117+ (filter #(auth-valid? (first %) db config) all-supported-models))
117118 all-models (merge authenticated-models local-models)]
118119 (swap! db* assoc :models all-models)
119120 (on-models-updated all-models)))
You can’t perform that action at this time.
0 commit comments