Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
os: [ubuntu-24.04]
jdk: [24]
include:
- os: windows-latest
Expand All @@ -49,12 +49,13 @@ jobs:

- name: Run tests
run: bb test

jvm-integration-test:
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
os: [ubuntu-24.04]
jdk: [24]
include:
- os: windows-latest
Expand Down Expand Up @@ -84,14 +85,16 @@ jobs:
# AccessDeniedException exception when renaming temp files
# while downloading dependencies. Workaround: offload some
# of the deps download to the clojure CLI tool.
#
# See https://clojure.atlassian.net/browse/TBUILD-47
clojure -P
bb prod-cli

- name: Run integration tests
run: bb integration-test

graalvm-build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
steps:
Expand Down Expand Up @@ -130,7 +133,7 @@ jobs:

graalvm-integration-test:
needs: graalvm-build
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
steps:
Expand All @@ -148,6 +151,11 @@ jobs:
cli: '1.12.0.1530'
bb: '1.12.200'

- name: Install tinyproxy
run: |
sudo apt-get update -y -qq
sudo apt-get install -y -qq tinyproxy

- uses: actions/download-artifact@v4
name: eca-native

Expand All @@ -156,8 +164,8 @@ jobs:
cp -rf eca-native/eca eca
chmod +x eca

- name: Run integration tests
run: bb integration-test
- name: Run integration tests (via proxy)
run: bb integration-test --proxy

nix-build:
needs: unit-test
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ docs/README.md
docs/CHANGELOG.md
docs/images/

integration-test/stderr.txt
/integration-test/out/
reachability-metadata.json
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

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

## 0.87.2

Expand Down
1 change: 1 addition & 0 deletions bb.edn
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

tag make/tag
get-last-changelog-entry make/get-last-changelog-entry
;; run with -h to see the available options
integration-test make/integration-test

local-webpage make/local-webpage}}
85 changes: 85 additions & 0 deletions deps-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,26 @@
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-K3q8dApBM5bzLK6nQPIYevjHqnKDN+E7THIyf0bhD3o="
},
{
"mvn-path": "com/barchart/base/barchart-archon/2.5.10/barchart-archon-2.5.10.pom",
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-ttNvNLKQMA1wTtCZlFYJd7VR6JFI2MdOGHlMpPGccvg="
},
{
"mvn-path": "com/barchart/udt/barchart-udt-archon/2.3.0/barchart-udt-archon-2.3.0.pom",
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-pYvFwljO3N6hn60O9/6o7QWcNuGOmYzk3U2PIB7v8TE="
},
{
"mvn-path": "com/barchart/udt/barchart-udt-bundle/2.3.0/barchart-udt-bundle-2.3.0.jar",
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-5/xl5m09UQOkrMgQ1HFcUHU1GzLGwvXe/UPFSYlhE60="
},
{
"mvn-path": "com/barchart/udt/barchart-udt-bundle/2.3.0/barchart-udt-bundle-2.3.0.pom",
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-/l5UPQXp1ogQxax0tEMr7MwiKyYSt73bMCaY/O82vUw="
},
{
"mvn-path": "com/cognitect/aws/api/0.8.723/api-0.8.723.jar",
"mvn-repo": "https://repo1.maven.org/maven2/",
Expand Down Expand Up @@ -767,6 +787,21 @@
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-4J00XnPKP7yn8+BfMN63Tp053Wt5qT/ujFEfI0F7aCg="
},
{
"mvn-path": "com/google/guava/guava-parent/20.0/guava-parent-20.0.pom",
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-8SJv0H/HKvjWIyvfpwvzHYg6GgHLxUfyOnTpBmxpLfE="
},
{
"mvn-path": "com/google/guava/guava/20.0/guava-20.0.jar",
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-NqZm47ca5/Dw3KI2VLZ+CG5sk9GS9gul39VRnbbCiMg="
},
{
"mvn-path": "com/google/guava/guava/20.0/guava-20.0.pom",
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-NjzIN2e3YNelZNUwHglGfm1I/BwcFmSx4YxQgVzhkHY="
},
{
"mvn-path": "com/google/inject/guice-parent/4.2.2/guice-parent-4.2.2.pom",
"mvn-repo": "https://repo1.maven.org/maven2/",
Expand Down Expand Up @@ -1157,6 +1192,16 @@
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-A0+cuKcLwC7X/0DCTkyNXaNXCedXic5/Q5/m4ipb/h0="
},
{
"mvn-path": "io/netty/netty-all/4.0.44.Final/netty-all-4.0.44.Final.jar",
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-jCvFNQVsv2b5ZWucTpLbjSoXMlKCNGMc7oC8J7yR8hg="
},
{
"mvn-path": "io/netty/netty-all/4.0.44.Final/netty-all-4.0.44.Final.pom",
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-/ZZHTGaIw7m2gboN8KEzeT7DZn/7k8TGrmnrmZAZV8w="
},
{
"mvn-path": "io/netty/netty-bom/4.2.0.Final/netty-bom-4.2.0.Final.pom",
"mvn-repo": "https://repo1.maven.org/maven2/",
Expand All @@ -1182,6 +1227,11 @@
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-YBEweqaNRjZ99sUyr7NiemOh+krBYgPhnrFQWoDfOvo="
},
{
"mvn-path": "io/netty/netty-parent/4.0.44.Final/netty-parent-4.0.44.Final.pom",
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-Zc9FQCl5Hav9RaeRz+Zf2ge0bkbV2sVx/DcsmNImTSU="
},
{
"mvn-path": "io/netty/netty-parent/4.1.30.Final/netty-parent-4.1.30.Final.pom",
"mvn-repo": "https://repo1.maven.org/maven2/",
Expand Down Expand Up @@ -1712,6 +1762,16 @@
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-gtMfHcxFg+/9dE6XkWWxbaZL+GvKYj/F0bA+2U9FyFo="
},
{
"mvn-path": "org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar",
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-islvxoZRLXd/yoXhRPGWzXz+DArsIxJyKUl9Gjj/ZRw="
},
{
"mvn-path": "org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.pom",
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-Ref7ssIx25A6XVqtr8Y2oXOk1UVg94oR/0mAKO+eNF4="
},
{
"mvn-path": "org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.pom",
"mvn-repo": "https://repo1.maven.org/maven2/",
Expand All @@ -1727,6 +1787,11 @@
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-Oi5p0G1kHR87KTEm3J4uTqZWO/jDbIfgq2+kKS0Et5w="
},
{
"mvn-path": "org/apache/commons/commons-parent/41/commons-parent-41.pom",
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-sod8gBb4sokkyOkN1a5AzRHzKNAqHemNgN4iV0qzbsc="
},
{
"mvn-path": "org/apache/commons/commons-parent/42/commons-parent-42.pom",
"mvn-repo": "https://repo1.maven.org/maven2/",
Expand Down Expand Up @@ -3207,6 +3272,16 @@
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-C5sUo9YhBvr+jGinF7h7h60YaFiZRRt1PAT6QbaFd4Q="
},
{
"mvn-path": "org/littleshoot/littleproxy/1.1.2/littleproxy-1.1.2.jar",
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-eWS9BW4UF5212m9Qv6j2AkGTVxrECCA0wTq/osNDWg8="
},
{
"mvn-path": "org/littleshoot/littleproxy/1.1.2/littleproxy-1.1.2.pom",
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-PADML6MSw6aEKjeZR2JdEc0APvP6HimHnq/3lV5bk/I="
},
{
"mvn-path": "org/msgpack/msgpack/0.6.12/msgpack-0.6.12.jar",
"mvn-repo": "https://repo1.maven.org/maven2/",
Expand Down Expand Up @@ -3297,6 +3372,11 @@
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-7WHEYf3Yy2lBLALnF28b953DPxKNXuuY9198rdT/fEM="
},
{
"mvn-path": "org/slf4j/slf4j-api/1.7.24/slf4j-api-1.7.24.pom",
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-16FSZtIvrcHIG7w7YmN4AdEW5ITrbIMSF9w2xTe+SNI="
},
{
"mvn-path": "org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.pom",
"mvn-repo": "https://repo1.maven.org/maven2/",
Expand Down Expand Up @@ -3357,6 +3437,11 @@
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-3qe7VIVu9pOIkiqtCiU4qfNd8nk/iUF5S8smUYp0CK8="
},
{
"mvn-path": "org/slf4j/slf4j-parent/1.7.24/slf4j-parent-1.7.24.pom",
"mvn-repo": "https://repo1.maven.org/maven2/",
"hash": "sha256-NjZ9EnpYbVArYL9U2y1zl+yUVzYg7/Ujhz7BKhLlSDk="
},
{
"mvn-path": "org/slf4j/slf4j-parent/1.7.36/slf4j-parent-1.7.36.pom",
"mvn-repo": "https://repo1.maven.org/maven2/",
Expand Down
18 changes: 14 additions & 4 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,22 @@
:aliases
{:dev {:extra-paths ["dev"]
:extra-deps {cider/cider-nrepl {:mvn/version "0.53.2"}
nrepl/nrepl {:mvn/version "1.3.0"}}}
nrepl/nrepl {:mvn/version "1.3.0"}}
;; Properties useful for low-level debugging
;; :jvm-opts ["-Djdk.httpclient.HttpClient.log=headers,errors"
;; "-Dclojure.storm.instrumentOnlyPrefixes=eca,hato"
;; "-Dflowstorm.startRecording=true"]
}

:test {:extra-deps {lambdaisland/kaocha {:mvn/version "1.91.1392"}
org.clojure/test.check {:mvn/version "1.1.1"}
nubank/matcher-combinators {:mvn/version "3.9.1"}
http-kit/http-kit {:mvn/version "2.8.0"}}
:jvm-opts ["-XX:-OmitStackTraceInFastThrow"]
http-kit/http-kit {:mvn/version "2.8.0"}
org.littleshoot/littleproxy {:mvn/version "1.1.2"}}
:jvm-opts ["-XX:-OmitStackTraceInFastThrow"
;; required for channeling https requirests via http
;; proxy with basic authentication scheme.
"-Djdk.http.auth.tunneling.disabledSchemes="]
:extra-paths ["test"]
:main-opts ["-m" "kaocha.runner"]}
:build {:extra-paths ["resources"]
Expand All @@ -43,4 +53,4 @@
"-Dborkdude.dynaload.aot=true"
"-Dclojure.compiler.direct-linking=true"
"-Dclojure.spec.skip-macros=true"]
:extra-deps {com.github.clj-easy/graal-build-time {:mvn/version "1.0.5"}}}}}
:extra-deps {com.github.clj-easy/graal-build-time {:mvn/version "1.0.5"}}}}}
13 changes: 13 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@ It's possible to retrieve content of any configs with a string value using the `
- `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)
- `netrc`: Support Unix RC [credential files](./models.md#credential-file-authentication)

## Proxy Configuration

ECA supports proxies with basic cleartext authentication via the de-facto env vars:

```bash
HTTP_PROXY="http://user:pass@host:port"
HTTPS_PROXY="http://user:pass@host:port"
http_proxy="http://user:pass@host:port"
https_proxy="http://user:pass@host:port"
```

Lowercase var wins if both are set. Credentials (if used) must match for HTTP and HTTPS.

## Providers / Models

For providers and models configuration check the [dedicated models section](./models.md#custom-providers).
Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
clojure
clojure-lsp
git
tinyproxy
];

env = {
Expand Down
Loading
Loading