Skip to content
Merged
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
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ jobs:
bun run build

- name: Download dependencies
run: go mod download
run: |
go version
go mod download

- name: Test
run: go test ./...
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/electron-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '>=1.25.1'
go-version-file: go.mod

- name: Build frontend
env:
Expand All @@ -63,6 +63,7 @@ jobs:
run: |
go mod download
go build -ldflags "-s -w -X 'github.com/MAX-API-Next/MAX-API/common.Version=$(git describe --tags)'" -o max-api.exe
go version -m max-api.exe

- name: Update Electron version
run: |
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,18 @@ jobs:
- name: Set up Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version: '>=1.25.1'
go-version-file: go.mod
- name: Build Backend (amd64)
run: |
go mod download
go build -ldflags "-s -w -X 'github.com/MAX-API-Next/MAX-API/common.Version=$VERSION' -extldflags '-static'" -o max-api-$VERSION
go version -m "max-api-$VERSION"
- name: Build Backend (arm64)
run: |
sudo apt-get update
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y gcc-aarch64-linux-gnu
CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build -ldflags "-s -w -X 'github.com/MAX-API-Next/MAX-API/common.Version=$VERSION' -extldflags '-static'" -o max-api-arm64-$VERSION
go version -m "max-api-arm64-$VERSION"
- name: Generate checksums
run: sha256sum max-api-* > checksums-linux.txt

Expand Down Expand Up @@ -94,11 +96,12 @@ jobs:
- name: Set up Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version: '>=1.25.1'
go-version-file: go.mod
- name: Build Backend
run: |
go mod download
go build -ldflags "-X 'github.com/MAX-API-Next/MAX-API/common.Version=$VERSION'" -o max-api-macos-$VERSION
go version -m "max-api-macos-$VERSION"
- name: Generate checksums
run: shasum -a 256 max-api-macos-* > checksums-macos.txt

Expand Down Expand Up @@ -144,11 +147,12 @@ jobs:
- name: Set up Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version: '>=1.25.1'
go-version-file: go.mod
- name: Build Backend
run: |
go mod download
go build -ldflags "-s -w -X 'github.com/MAX-API-Next/MAX-API/common.Version=$VERSION'" -o max-api-$VERSION.exe
go version -m "max-api-$VERSION.exe"
- name: Generate checksums
run: sha256sum max-api-*.exe > checksums-windows.txt

Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is an AI API gateway/proxy built with Go. It aggregates 40+ upstream AI pro

## Tech Stack

- **Backend**: Go 1.22+, Gin web framework, GORM v2 ORM
- **Backend**: Go 1.26.10 (security build baseline), Gin web framework, GORM v2 ORM
- **Frontend**: React 19, TypeScript, Rsbuild, Base UI, Tailwind CSS
- **Databases**: SQLite, MySQL, PostgreSQL (all three must be supported)
- **Cache**: Redis (go-redis) + in-memory cache
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is an AI API gateway/proxy built with Go. It aggregates 40+ upstream AI pro

## Tech Stack

- **Backend**: Go 1.22+, Gin web framework, GORM v2 ORM
- **Backend**: Go 1.26.10 (security build baseline), Gin web framework, GORM v2 ORM
- **Frontend**: React 19, TypeScript, Rsbuild, Base UI, Tailwind CSS
- **Databases**: SQLite, MySQL, PostgreSQL (all three must be supported)
- **Cache**: Redis (go-redis) + in-memory cache
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COPY ./VERSION .
WORKDIR /build/default
RUN DISABLE_ESLINT_PLUGIN='true' VITE_REACT_APP_VERSION=$(cat VERSION) bun run build

FROM golang:1.26.1-alpine@sha256:2389ebfa5b7f43eeafbd6be0c3700cc46690ef842ad962f6c5bd6be49ed82039 AS builder2
FROM golang:1.26.10-alpine@sha256:9ce231b28998b32e116927c61aa5c406183061d4f3f2d61b292c88e7f6bdf7ca AS builder2
ENV GO111MODULE=on CGO_ENABLED=0

ARG TARGETOS
Expand All @@ -28,7 +28,8 @@ RUN go mod download

COPY . .
COPY --from=builder /build/default/dist ./web/default/dist
RUN go build -ldflags "-s -w -X 'github.com/MAX-API-Next/MAX-API/common.Version=$(cat VERSION)'" -o max-api
RUN go build -ldflags "-s -w -X 'github.com/MAX-API-Next/MAX-API/common.Version=$(cat VERSION)'" -o max-api \
&& go version -m max-api

FROM debian:bookworm-slim@sha256:f06537653ac770703bc45b4b113475bd402f451e85223f0f2837acbf89ab020a

Expand Down
5 changes: 3 additions & 2 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Backend-only build for frontend development
# Skips frontend build, uses a placeholder for //go:embed web/dist

FROM golang:1.26.1-alpine AS builder
FROM golang:1.26.10-alpine@sha256:9ce231b28998b32e116927c61aa5c406183061d4f3f2d61b292c88e7f6bdf7ca AS builder

ENV GO111MODULE=on CGO_ENABLED=0
ARG TARGETOS
Expand All @@ -19,7 +19,8 @@ COPY . .
RUN mkdir -p web/default/dist && \
echo '<!doctype html><html><head><title>dev</title></head><body>use frontend dev server</body></html>' > web/default/dist/index.html

RUN go build -ldflags "-s -w -X 'github.com/MAX-API-Next/MAX-API/common.Version=$(cat VERSION)'" -o max-api
RUN go build -ldflags "-s -w -X 'github.com/MAX-API-Next/MAX-API/common.Version=$(cat VERSION)'" -o max-api \
&& go version -m max-api

FROM debian:bookworm-slim

Expand Down
2 changes: 2 additions & 0 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ MAX API is not a foundation model and does not claim to have already achieved AG

## 🚢 Deployment guide

The security baseline for source builds is **Go 1.26.10**, which includes the certificate verification fix for CVE-2026-111943. Recompile with the patched toolchain and replace the backend binary when upgrading; installing a newer Go version or restarting an old binary does not update its standard library. CI and Docker builds use this version consistently.

The following steps use a stable release as an example. Pin the version tag and commit, and complete backup, verification, and rollback preparation before upgrading.

Docker Compose is recommended:
Expand Down
2 changes: 2 additions & 0 deletions README.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ MAX API n'est pas un modèle de fondation et ne prétend pas avoir déjà attein

## 🚢 Guide de déploiement

La référence de sécurité pour les compilations depuis les sources est **Go 1.26.10**, qui inclut le correctif de vérification des certificats pour CVE-2026-111943. Recompilez avec la chaîne d'outils corrigée et remplacez le binaire du backend lors de la mise à niveau ; installer une nouvelle version de Go ou redémarrer un ancien binaire ne met pas à jour sa bibliothèque standard. Les compilations CI et Docker utilisent cette même version.

Les étapes suivantes prennent une version stable comme exemple. Figez le tag et le commit utilisés, puis préparez la sauvegarde, la vérification et le retour arrière avant toute mise à niveau.

Docker Compose est recommandé :
Expand Down
2 changes: 2 additions & 0 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ MAX API は基盤モデルではなく、現時点で AGI や自律運用を実

## 🚢 デプロイガイド

ソースからビルドする際のセキュリティ基準は **Go 1.26.10** です。CVE-2026-111943 の証明書検証修正が含まれます。更新時は修正済みツールチェーンで再コンパイルし、バックエンドの実行ファイルを置き換えてください。Go のインストール更新や古い実行ファイルの再起動だけでは、組み込まれた標準ライブラリは更新されません。CI と Docker でも同じバージョンを使用します。

以下の手順は正式版を例にしています。使用するバージョンタグとコミットを固定し、アップグレード前にバックアップ、検証、ロールバックの準備を完了してください。

Docker Compose を推奨します:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ MAX API 不是基础模型,也不宣称当前已经实现 AGI 或自治运维

## 🚢 部署指南

源码构建的安全基线为 **Go 1.26.10**,包含 CVE-2026-111943 的证书校验修补。升级时必须使用修补后的工具链重新编译并替换后端二进制;仅安装新版 Go 或重启旧产物不会更新其中的标准库。CI 和 Docker 构建统一采用此版本。

以下步骤以正式版为例。请固定版本标签和对应提交,并在升级前完成备份、校验和回滚准备。

推荐使用 Docker Compose:
Expand Down
2 changes: 2 additions & 0 deletions README.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ MAX API 不是基础模型,也不宣称当前已经实现 AGI 或自治运维

## 🚢 部署指南

源码构建的安全基线为 **Go 1.26.10**,包含 CVE-2026-111943 的证书校验修补。升级时必须使用修补后的工具链重新编译并替换后端二进制;仅安装新版 Go 或重启旧产物不会更新其中的标准库。CI 和 Docker 构建统一采用此版本。

以下步骤以正式版为例。请固定版本标签和对应提交,并在升级前完成备份、校验和回滚准备。

推荐使用 Docker Compose:
Expand Down
2 changes: 2 additions & 0 deletions README.zh_TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ MAX API 不是基礎模型,也不宣稱目前已經實現 AGI 或自治運維

## 🚢 部署指南

原始碼建置的安全基準為 **Go 1.26.10**,包含 CVE-2026-111943 的憑證驗證修補。升級時必須使用修補後的工具鏈重新編譯並替換後端執行檔;僅安裝新版 Go 或重新啟動舊產物不會更新其中的標準函式庫。CI 與 Docker 建置統一採用此版本。

以下步驟以正式版為例。請固定版本標籤和對應提交,並在升級前完成備份、驗證和回復準備。

建議使用 Docker Compose:
Expand Down
2 changes: 2 additions & 0 deletions electron/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ This will:

## Building for Production

Build the backend with **Go 1.26.10** before packaging Electron. This is the security baseline for CVE-2026-111943; replace any previously built backend binary, since rebuilding only the Electron wrapper does not update Go's embedded standard library. The root `go.mod` defines the version used by CI.

### Quick Build
```bash
# Ensure Go binary exists in parent directory
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module github.com/MAX-API-Next/MAX-API

// +heroku goVersion go1.25
go 1.25.1
// +heroku goVersion go1.26.10
go 1.26.10

require (
github.com/Azure/go-ntlmssp v0.1.1
Expand Down
Loading