File tree Expand file tree Collapse file tree 3 files changed +27
-1
lines changed
Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 55- Fix reasoning titles in thoughts blocks for openai-responses.
66- Fix hanging LSP diagnostics requests
77- Add ` lspTimeoutSeconds ` to config
8+ - Support ` HTTP_PROXY ` and ` HTTPS_PROXY ` env vars for LLM request via proxies. #73
89
910## 0.32.4
1011
Original file line number Diff line number Diff line change 77 [clojure.string :as string]
88 [eca.config :as config]
99 [eca.logger :as logger]
10- [eca.server :as server]))
10+ [eca.server :as server]
11+ [eca.proxy :as proxy]))
1112
1213(set! *warn-on-reflection* true )
1314
8990
9091(defn ^:private handle-action!
9192 [action options]
93+ (proxy/load! )
9294 (when (= " server" action)
9395 (alter-var-root #'logger/*level* (constantly (keyword (:log-level options))))
9496 (let [finished @(server/run-io-server! (:verbose options))]
Original file line number Diff line number Diff line change 1+ (ns eca.proxy
2+ (:require
3+ [eca.config :as config])
4+ (:import
5+ [java.net URL]))
6+
7+ (set! *warn-on-reflection* true )
8+
9+ (defn load! []
10+ (when-let [^URL url (try (some-> (not-empty (config/get-env " HTTP_PROXY" ))
11+ (URL. ))
12+ (catch Exception _ nil ))]
13+ (System/setProperty " http.proxyHost" (.getHost url))
14+ (let [port (.getPort url)]
15+ (when (not= -1 port)
16+ (System/setProperty " http.proxyPort" (.getPort url)))))
17+ (when-let [^URL url (try (some-> (not-empty (config/get-env " HTTPS_PROXY" ))
18+ (URL. ))
19+ (catch Exception _ nil ))]
20+ (System/setProperty " https.proxyHost" (.getHost url))
21+ (let [port (.getPort url)]
22+ (when (not= -1 port)
23+ (System/setProperty " https.proxyPort" (.getPort url))))))
You can’t perform that action at this time.
0 commit comments