Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
d69b3f8
ci: run on the Develop branch as well
an1ndra Nov 16, 2026
dbd47f2
refactor: frame the gateway as provider-agnostic
an1ndra Nov 16, 2026
4116639
chore: keep Dependabot off Spring Boot major upgrades
an1ndra Nov 16, 2026
18e4a28
docs: add API reference, Postman collection and AGENTS.md
an1ndra Nov 16, 2026
097e302
fix: report not-ready until first-boot seeding completes
an1ndra Nov 16, 2026
8bcbdf5
ci: move all actions to their Node 24 majors
an1ndra Nov 16, 2026
c7dde00
build: move the Maven wrapper to 3.10.1
an1ndra Nov 16, 2026
a96c0c5
feat: circuit breaker and idempotent retries
an1ndra Nov 17, 2026
cb9d017
feat: request limits, parameter fidelity, tokenizer-aware estimates
an1ndra Nov 17, 2026
3c2cf66
feat: Flyway migrations, Hibernate validate, portable baseline
an1ndra Nov 17, 2026
1b3a0a6
feat: exact-match response cache
an1ndra Nov 17, 2026
19a3761
feat: budget windows, per-provider timeouts, drain, probe, CSV export
an1ndra Nov 17, 2026
eb3a728
feat: metrics, tracing, JSON logs and an OpenAPI spec
an1ndra Nov 17, 2026
9b38f8c
feat: capability aliases and weighted canary routing
an1ndra Nov 17, 2026
f023766
feat: admin audit trail and webhook alerts
an1ndra Nov 17, 2026
b85764b
feat: embeddings endpoint, load test and property tests
an1ndra Nov 17, 2026
88fc79f
feat: opt-in redacted prompt logging
an1ndra Nov 17, 2026
ec4a763
feat: per-key model allowlist and a nightly provider canary
an1ndra Nov 17, 2026
b28ac89
docs: slim the README into a landing page
an1ndra Nov 17, 2026
4f3f0f9
docs: add a roadmap page for the three open stories
an1ndra Nov 17, 2026
0cc1694
feat: Valkey limiter, budget reservations, projects, scoped tokens, f…
an1ndra Nov 17, 2026
1717d21
ci: security gates, checksums and an SBOM for releases
an1ndra Nov 17, 2026
307b2c8
docs: add CHANGELOG.md and use it as the release body
an1ndra Nov 17, 2026
f157418
docs: move release notes into changelog/ with one file per tag
an1ndra Nov 17, 2026
a6e839b
fix: run the container as a non-root user; tighten image scan gate
an1ndra Nov 17, 2026
56847d5
ci: pin runners to ubuntu-26.04 (latest LTS)
an1ndra Nov 17, 2026
e83afbb
feat: close the fixable gaps in docs/LIMITS.md
an1ndra Nov 17, 2026
4349e8d
feat: seed Google Gemini using its OpenAI-compatible endpoint
an1ndra Nov 17, 2026
7e2d1f1
feat: add a Bruno collection mirroring the Postman requests
an1ndra Nov 17, 2026
2101b73
fix: close four gaps found in the audit
an1ndra Nov 17, 2026
eb3dc7c
docs: record the post-0.1.0 audit findings in the roadmap
an1ndra Nov 17, 2026
93ae278
fix: close all twelve audit issues
an1ndra Nov 17, 2026
53aaa68
feat: per-provider health in the actuator endpoint
an1ndra Nov 17, 2026
9442aaa
docs: add Why Path comparison and a runnable 60-second demo
an1ndra Nov 17, 2026
384bfd9
build: add a Maven Central release profile
an1ndra Nov 17, 2026
cc79e0f
build: publish under io.github.an1ndra
an1ndra Nov 17, 2026
86724a0
docs: refresh the roadmap to match the issue tracker
an1ndra Nov 17, 2026
d4d8a1c
docs: list the sixteen open stories in the roadmap
an1ndra Nov 17, 2026
be9def1
docs: record the issue label taxonomy
an1ndra Nov 17, 2026
8ac3791
feat: token counting endpoint, idempotent embeddings, project budget …
an1ndra Nov 17, 2026
f0dedb0
feat: project-level rate and concurrency limits
an1ndra Nov 17, 2026
9c5d7d0
feat: operator-defined model aliases
an1ndra Nov 17, 2026
77b26d6
feat: adaptive routing by latency and cost
an1ndra Nov 17, 2026
155da15
feat: Helm chart for Kubernetes
an1ndra Nov 17, 2026
1b18966
docs: roadmap lists the nine stories still open
an1ndra Nov 17, 2026
efa6934
ci: pin every action to a commit SHA
an1ndra Nov 17, 2026
f46ea7b
feat: end-user attribution and per-end-user budgets
an1ndra Nov 17, 2026
c8c83f4
feat: PII redaction and moderation guardrails
an1ndra Nov 17, 2026
0b89a80
feat: Azure OpenAI support
an1ndra Nov 17, 2026
5b3bc64
feat: semantic cache tier
an1ndra Nov 17, 2026
8d5e0ae
docs: roadmap lists the five stories still open, and why
an1ndra Nov 17, 2026
cc3f0b9
release: v0.2.0
an1ndra Nov 17, 2026
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
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ GATEWAY_ADMIN_TOKEN=change-me-to-something-long
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
GROQ_API_KEY=
GEMINI_API_KEY=

# Any other provider slug, e.g. for slug "together":
# GATEWAY_UPSTREAM_TOGETHER_KEY=
Expand Down
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ updates:
open-pull-requests-limit: 5
commit-message:
prefix: "deps"
ignore:
# Spring Boot 4 is a breaking migration (Jackson 3, renamed starters);
# take it deliberately, not as an automatic PR.
- dependency-name: "org.springframework.boot:*"
update-types: ["version-update:semver-major"]
groups:
spring:
patterns:
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
- [ ] `./mvnw verify` passes locally
- [ ] `python3 tools/smoke_test.py` passes against `tools/mock-upstream.py`
- [ ] New behaviour is covered by a test (unit or smoke)
- [ ] README updated if a user-facing endpoint, config key or field changed
- [ ] The matching file in `docs/` updated if an endpoint, config key or field changed
- [ ] No credentials, `.env` files or `data/` contents included
85 changes: 85 additions & 0 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Provider canary

on:
schedule:
- cron: "0 4 * * *"
workflow_dispatch:

permissions:
contents: read
issues: write

jobs:
canary:
name: One tiny call per provider
runs-on: ubuntu-26.04
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up JDK 21
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6
with:
distribution: temurin
java-version: "21"
cache: maven

- name: Skip when no provider secrets are configured
id: gate
run: |
if [ -z "$OPENAI_API_KEY$ANTHROPIC_API_KEY$GROQ_API_KEY" ]; then
echo "enabled=false" >> "$GITHUB_OUTPUT"
echo "No provider secrets configured; skipping the canary."
else
echo "enabled=true" >> "$GITHUB_OUTPUT"
fi

- name: Start the gateway
if: steps.gate.outputs.enabled == 'true'
run: |
./mvnw -B -DskipTests package
GATEWAY_ADMIN_TOKEN=canary java -jar target/path-*.jar > /tmp/gateway.log 2>&1 &
for i in $(seq 1 60); do
curl -sf http://127.0.0.1:8080/actuator/health > /dev/null && break
sleep 1
done
KEY=$(grep -o 'sk-gw-[A-Za-z0-9]*' /tmp/gateway.log | head -1)
echo "PATH_KEY=$KEY" >> "$GITHUB_ENV"
echo "KEY_OK=$([ -n "$KEY" ] && echo yes || echo no)" >> "$GITHUB_ENV"

- name: Probe each provider
if: steps.gate.outputs.enabled == 'true'
run: |
set -e
failed=0
check() {
model="$1"
code=$(curl -s -o /tmp/out.json -w '%{http_code}' http://127.0.0.1:8080/v1/chat/completions \
-H "Authorization: Bearer $PATH_KEY" -H 'Content-Type: application/json' \
-d "{\"model\":\"$model\",\"max_tokens\":8,\"messages\":[{\"role\":\"user\",\"content\":\"ping\"}]}")
if [ "$code" != "200" ]; then
echo "::error::canary failed for $model (HTTP $code): $(head -c 200 /tmp/out.json)"
failed=1
else
echo "canary ok: $model"
fi
}
[ -n "$OPENAI_API_KEY" ] && check gpt-4o-mini
[ -n "$ANTHROPIC_API_KEY" ] && check claude-3.5-haiku
[ -n "$GROQ_API_KEY" ] && check llama-3.3-70b
exit $failed

- name: Open an issue when the canary fails
if: failure() && steps.gate.outputs.enabled == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh issue create --repo "${{ github.repository }}" \
--title "Provider canary failed on $(date -u +%Y-%m-%d)" \
--body "The nightly canary could not complete a minimal call. See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}. This usually means a provider changed its API or a key was revoked."

- name: Show gateway log on failure
if: failure()
run: tail -60 /tmp/gateway.log || true
80 changes: 68 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [main]
branches: [main, Develop]
pull_request:
branches: [main]
branches: [main, Develop]
workflow_dispatch:

permissions:
Expand All @@ -17,37 +17,72 @@ concurrency:
jobs:
build:
name: Build and unit tests
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v4

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up JDK 21
uses: actions/setup-java@v4
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6
with:
distribution: temurin
java-version: "21"
cache: maven

- name: Validate the changelog is parseable
run: python3 tools/changelog.py 0.1.0 > /dev/null

- name: Build and test
run: ./mvnw -B verify

- name: Upload test reports
if: failure()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: surefire-reports
path: target/surefire-reports/
retention-days: 7

helm:
name: Helm chart
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4
with:
version: v3.16.3

- name: Lint
run: helm lint deploy/helm/path --set existingSecret=path-credentials

- name: Render every toggle
run: |
helm template path deploy/helm/path --set existingSecret=x > /dev/null
helm template path deploy/helm/path --set existingSecret=x \
--set autoscaling.enabled=true --set postgres.enabled=true \
--set valkey.enabled=true --set serviceMonitor.enabled=true > /dev/null

- name: No credentials are rendered inline
run: |
if helm template path deploy/helm/path --set existingSecret=x | grep -q "kind: Secret"; then
echo "::error::The chart rendered a Secret while existingSecret was set"
exit 1
fi

- name: The drain guard must fail closed
run: |
if helm template path deploy/helm/path --set existingSecret=x \
--set drainTimeoutSeconds=60 --set terminationGracePeriodSeconds=30 > /dev/null 2>&1; then
echo "::error::The chart rendered with a grace period below the drain timeout"
exit 1
fi

e2e:
name: End-to-end smoke test
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
needs: build
steps:
- uses: actions/checkout@v4

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up JDK 21
uses: actions/setup-java@v4
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6
with:
distribution: temurin
java-version: "21"
Expand All @@ -60,7 +95,11 @@ jobs:
run: |
mkdir -p /tmp/opencode
python3 tools/mock-upstream.py 9099 > /tmp/opencode/mock.log 2>&1 &
GATEWAY_ADMIN_TOKEN=test-admin java -jar target/path-*.jar \
GATEWAY_ADMIN_TOKEN=test-admin \
GATEWAY_PROMPT_LOGGING=true \
GATEWAY_GUARDRAILS_MODERATION=true \
GATEWAY_SEMANTIC_MODEL=embed-test \
java -jar target/path-*.jar \
> /tmp/opencode/gateway.log 2>&1 &
for i in $(seq 1 60); do
if curl -sf http://127.0.0.1:8080/actuator/health > /dev/null; then
Expand All @@ -70,8 +109,25 @@ jobs:
sleep 1
done
curl -sf http://127.0.0.1:8080/actuator/health
curl -sf http://127.0.0.1:8080/v3/api-docs -o /tmp/opencode/openapi.json
test -s /tmp/opencode/openapi.json
for i in $(seq 1 30); do
if curl -sf http://127.0.0.1:8080/v1/models | grep -q 'gpt-4o-mini'; then
echo "catalogue seeded after ${i}s"
break
fi
sleep 1
done
python3 tools/smoke_test.py

- name: Upload OpenAPI spec
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: openapi
path: /tmp/opencode/openapi.json
retention-days: 14

- name: Show gateway log on failure
if: failure()
run: tail -60 /tmp/opencode/gateway.log
14 changes: 6 additions & 8 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,23 @@ permissions:
jobs:
analyze:
name: Analyze Java
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v4

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up JDK 21
uses: actions/setup-java@v4
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6
with:
distribution: temurin
java-version: "21"
cache: maven

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v4
with:
languages: java-kotlin
build-mode: autobuild

- name: Autobuild
uses: github/codeql-action/autobuild@v3

uses: github/codeql-action/autobuild@33d7b85da1a04171e211befe2c739303b9a4c066 # v4
- name: Analyze
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v4
Loading
Loading