Skip to content

Commit aee6800

Browse files
committed
Add release notes/docs, minor text adjustments
1 parent 88b39d2 commit aee6800

File tree

9 files changed

+28
-20
lines changed

9 files changed

+28
-20
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
# while downloading dependencies. Workaround: offload some
8787
# of the deps download to the clojure CLI tool.
8888
#
89-
# See https://clojure.atlassian.net/jira/software/c/projects/TBUILD/issues?jql=project%20%3D%20TBUILD%20ORDER%20BY%20created%20DESC&selectedIssue=TBUILD-47
89+
# See https://clojure.atlassian.net/browse/TBUILD-47
9090
clojure -P
9191
bb prod-cli
9292

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ docs/README.md
3636
docs/CHANGELOG.md
3737
docs/images/
3838

39-
integration-test/out
39+
/integration-test/out/
4040
reachability-metadata.json

CHANGELOG.md

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

55
- Add dynamic model discovery via `fetchModels` provider config for OpenAI-compatible `/models` endpoints
66
- Improve error handling for incompatible models messages in chat. #209
7+
- Add basic username/password proxy authentication support and recognize lowercase http[s]_proxy env var alongside HTTP[S]_PROXY. #248
78

89
## 0.87.2
910

docs/configuration.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,19 @@ It's possible to retrieve content of any configs with a string value using the `
5757
- `classpath`: `${classpath:path/to/eca/file}` to get a file content from [ECA's classpath](https://github.com/editor-code-assistant/eca/tree/master/resources)
5858
- `netrc`: Support Unix RC [credential files](./models.md#credential-file-authentication)
5959

60+
## Proxy Configuration
61+
62+
ECA supports proxies with basic cleartext authentication via the de-facto env vars:
63+
64+
```bash
65+
HTTP_PROXY="http://user:pass@host:port"
66+
HTTPS_PROXY="http://user:pass@host:port"
67+
http_proxy="http://user:pass@host:port"
68+
https_proxy="http://user:pass@host:port"
69+
```
70+
71+
Lowercase var wins if both are set. Credentials (if used) must match for HTTP and HTTPS.
72+
6073
## Providers / Models
6174

6275
For providers and models configuration check the [dedicated models section](./models.md#custom-providers).

scripts/make.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
:list-ns {:desc "List available test namespaces."
103103
:alias :l}
104104

105-
:ns {:desc "Comma-separated list of test namespaces to run.."
105+
:ns {:desc "Comma-separated list of test namespaces to run."
106106
:type :string
107107
:validate (fn [s]
108108
(every? #(some #{%} entrypoint/namespaces)

src/eca/proxy.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
(defn proxy-urls-system-env-get
4545
"Returns a map of the HTTP and HTTPS proxy environment variables,
46-
preferring lowercase variable names over uppercase:
46+
preferring lowercase variable names over uppercase.
4747
4848
The map includes:
4949

test/eca/client_test_helpers.clj

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@
2929
32 KB and does not buffer responses."
3030
[handler-fn]
3131
(proxy [HttpFiltersSource] []
32-
(clientToProxyRequest [http-obj]
33-
;; always return nil to accept the request
34-
;; or you can normalize the URI here if you want
35-
nil)
36-
3732
(filterRequest [original-request ctx]
3833
(proxy [HttpFiltersAdapter] [original-request]
3934
(proxyToServerRequest [http-obj]
@@ -179,13 +174,12 @@
179174
nil)
180175

181176
(defmacro with-client-proxied
182-
"Runs BODY with a temporary LittleProxy server active on a random local port,
183-
while setting `eca.client-http/*hato-http-client*` to route traffic through the
184-
proxy for any Hato requests made in BODY.
185-
186-
Starts a proxy using the provided request HANDLER-FN and optional OPTS. Ensures
187-
the proxy is shut down after BODY executes, and `eca.client-http/*hato-http-client*`
188-
is reset to nil.
177+
"Runs BODY with a temporary LittleProxy server on a random local port,
178+
configuring `eca.client-http/*hato-http-client*` so all Hato
179+
requests in BODY are routed through the proxy. The proxy is started
180+
using the provided HANDLER-FN and optional OPTS, and is always shut
181+
down afterward, with `eca.client-http/*hato-http-client*` reset to
182+
nil.
189183
190184
During execution, any calls to `eca.client-http/merge-with-global-http-client`
191185
are recorded in `*http-client-captures*` as a sequence of merged options maps.

test/eca/llm_providers/openai_chat_test.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
:model "ibm/granite-4-h-tiny",
2323
:choices [{:index 0,
2424
:message {:role "assistant",
25-
:content "Hello from proxy!"
25+
:content "Hello there!"
2626
:tool_calls []},
2727
:logprobs nil,
2828
:finish_reason "stop"}]
@@ -47,7 +47,7 @@
4747
:uri "/v1/chat/completions"
4848
:body body}
4949
(select-keys @req* [:method :uri :body])))
50-
(is (= {:output-text "Hello from proxy!"}
50+
(is (= {:output-text "Hello there!"}
5151
(select-keys response [:output-text]))))))))
5252

5353
(deftest normalize-messages-test

test/eca/llm_providers/openai_test.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
(reset! req* req)
1414
;; fake a successful non-stream JSON response
1515
{:status 200
16-
:body {:output [{:content [{:text "Hello from responses proxy!"}]}]}})
16+
:body {:output [{:content [{:text "Hello from responses!"}]}]}})
1717

1818
(let [body {:model "mymodel"
1919
:input "hi"
@@ -31,7 +31,7 @@
3131
(select-keys @req* [:method :uri :body])))
3232

3333
;; parsed response
34-
(is (= {:output-text "Hello from responses proxy!"}
34+
(is (= {:output-text "Hello from responses!"}
3535
(select-keys response [:output-text]))))))))
3636

3737
(deftest oauth-authorize-test

0 commit comments

Comments
 (0)