fix: harden gateway routing and protocol fidelity

Preserve request parameters, tool-call completion reasons and retry session
affinity. Bound upstream header waits, stop expired-context scans and add
opt-in redacted request-body diagnostics.

Isolate Playground diagnostics from production pools, report stream failures
accurately, align readiness with discoverable models and honor Docker listen
configuration.

Split Go and WebUI modules by responsibility, add regression tests and CI,
standardize formatting and rewrite the English and Chinese READMEs.

Refs: #6, #18, #19, #20, #21, #22, #23, #24, #25
This commit is contained in:
Jason Xu committed 2026-09-15 00:43:35 +08:00
1 parent 6d1a3c1098
commit ea29a62eca
51 files changed
+10622 -5688

No files matched your search

+66
View File
@@ -0,0 +1,66 @@
name: Checks
on:
push:
branches: ["**"]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: checks-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Go ${{ matrix.go }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
go: ["1.24.x", stable]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
cache: true
- name: Vet
run: go vet ./...
- name: Test with race detection
if: runner.os == 'Linux'
run: go test -race -coverprofile=coverage.out ./...
- name: Test on Windows
if: runner.os == 'Windows'
run: go test ./...
- name: Build
run: go build ./...
format:
name: Formatting and WebUI syntax
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
- run: npm ci --ignore-scripts
- name: Check Go formatting
shell: bash
run: |
unformatted="$(gofmt -l .)"
if [ -n "$unformatted" ]; then
printf '%s\n' "$unformatted"
exit 1
fi
- run: npm run format:check
- run: npm run check:web
- name: Check container entrypoint syntax
run: sh -n docker-entrypoint.sh
+1 -1
View File
@@ -125,7 +125,7 @@ jobs:
run: |
mkdir -p "dist/$PACKAGE_NAME"
go build -trimpath -ldflags="-s -w -X main.version=$RELEASE_TAG" -o "dist/$PACKAGE_NAME/opencode2api$EXTENSION" ./
cp README.md config.example.json "dist/$PACKAGE_NAME/"
cp README.md README.zh-CN.md config.example.json "dist/$PACKAGE_NAME/"
if [[ "$ARCHIVE_FORMAT" == "zip" ]]; then
(cd dist && zip -q -r "$PACKAGE_NAME.zip" "$PACKAGE_NAME")
archive="$PACKAGE_NAME.zip"