Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
9823ebc
fix(billing): bill cache_creation_input_tokens reported in prompt_tok…
yxkong Oct 25, 2026
bc795cc
fix:修复stop为非字符串和[]string的协议转换问题 (#7935)
sszj987-crypto Oct 25, 2026
f1569d1
fix(pricing): classify dynamic per-request billing correctly (#8010)
seefs001 Oct 25, 2026
4d962e4
fix(relaykit): preserve tool argument numbers in Claude responses (#7…
zxdvd Oct 25, 2026
0165fef
fix(relaykit): preserve Gemini text alongside tool calls (#7998)
zxdvd Oct 25, 2026
34003e9
test: stabilize channel affinity cache keys (#8009)
sstar16 Oct 25, 2026
01da3a5
perf(relay): stop recompiling param override regexes on every request…
seefs001 Oct 27, 2026
ad56112
fix(relay): apply GPT-6 chat parameter rules to gpt-6.1-sol and gpt-6…
feitianbubu Oct 28, 2026
5478811
fix: count completed non-stream relays after context cancellation (#7…
feitianbubu Oct 28, 2026
49271d2
fix(aws): preserve safeguards in Bedrock Invoke requests (#8071)
lushuntian Oct 28, 2026
55515db
fix(relay): terminate streams on exact bare done markers (#8074)
seefs001 Oct 28, 2026
26c488c
fix(relay): allow Azure channels to opt in to Responses WebSocket (#8…
seefs001 Oct 28, 2026
b08ee86
fix(cloudflare): preserve embedding response data (#8041)
donaldxdonald Oct 28, 2026
fcc241c
fix: start affinity fallback at the highest channel priority (#8078)
seefs001 Oct 28, 2026
e449cc7
feat: sample immediate task successes in model performance metrics (#…
feitianbubu Oct 28, 2026
a2defd2
Merge commit from fork
RedwindA Oct 29, 2026
9eda50a
Merge commit from fork
RedwindA Oct 30, 2026
829f082
fix: unmount authenticated layout on sign-out to stop credential-less…
feitianbubu Oct 30, 2026
f366017
Merge commit from fork
seefs001 Oct 30, 2026
4193734
fix(logger): keep gin access and recovery logs on the current log fil…
RedwindA Oct 30, 2026
a3851c2
fix: save Turnstile keys before enabling (#7960)
chronicle12345 Oct 30, 2026
3150dfe
chore(deps): bump github.com/go-jose/go-jose/v4 from 4.1.4 to 4.1.6 (…
dependabot[bot] Oct 30, 2026
837b814
chore(deps): bump undici in /electron (#8006)
dependabot[bot] Oct 30, 2026
ee0f0ac
chore(deps-dev): bump electron from 41.10.6 to 42.11.16 in /electron …
dependabot[bot] Oct 30, 2026
7fa815e
chore(deps-dev): bump fast-uri from 3.1.7 to 3.1.9 in /electron (#8007)
dependabot[bot] Oct 30, 2026
1695171
chore(deps): bump tailwind-merge from 3.6.0 to 3.7.0 in /web (#8106)
dependabot[bot] Oct 30, 2026
cef7820
chore(deps-dev): bump knip from 6.27.0 to 6.43.0 in /web (#8105)
dependabot[bot] Oct 30, 2026
9fc70bb
chore(deps-dev): bump @tanstack/react-query-devtools in /web (#8104)
dependabot[bot] Oct 30, 2026
6e78cb3
chore(deps): bump marked from 18.0.6 to 18.1.2 in /web (#8103)
dependabot[bot] Oct 30, 2026
1e8c707
chore(deps): bump @codemirror/language from 6.12.4 to 6.13.1 in /web …
dependabot[bot] Oct 30, 2026
883eeb8
feat(plugins): warn about task models a plugin cannot charge
Calcium-Ion Oct 30, 2026
7743627
fix(deps): upgrade DOMPurify to 3.4.17 (#8116)
seefs001 Oct 30, 2026
37d23dc
fix(profile): honor global sidebar visibility (#7429)
jimmyleocn Oct 30, 2026
c59f6fd
feat(plugins): serve task plugins at the vendors' own paths and answe…
Calcium-Ion Oct 30, 2026
8b253de
fix(plugins): keep Kling 4.0 durations in range and map every video s…
Calcium-Ion Oct 30, 2026
1424ffd
fix(plugins): load plugins that declare their own /{key} address (#8119)
Calcium-Ion Oct 30, 2026
fe57cba
fix(plugins): prefer Kling's returned price (list_price) for Kling 4.…
feitianbubu Oct 31, 2026
ea343c4
fix(plugins): charge relayed streams even when the reserve or task in…
Calcium-Ion Oct 31, 2026
d0abbf6
feat(plugins): generate video with Gemini Omni on Vertex AI channels …
feitianbubu Nov 1, 2026
70e6af6
perf: read and edit request JSON and base64 with moego (#8148)
Calcium-Ion Nov 1, 2026
651d5a2
fix(xai): preserve token details in stream usage conversion (#6420)
KangLeon Nov 2, 2026
c046559
feat(plugins): bill gemini omni by the tokens vertex reports (#8153)
feitianbubu Nov 2, 2026
45746ee
feat(relay): add opt-in HTTP/2 health checks (#8059)
Perfecto23 Nov 2, 2026
9b473a3
fix(twofa): restart the failure count after a lockout expires (#8172)
Alear030 Nov 3, 2026
52c1730
feat(gemini): add Argon fields and reasoning mappings (#8177)
seefs001 Nov 3, 2026
83b18fe
feat(channel): return created IDs with input mappings (#8164)
heyrry Nov 3, 2026
94b5216
feat(vertex): add per-channel v1beta1 endpoint switch (#8179)
seefs001 Nov 3, 2026
ba5f736
fix(gemini): bill embeddings from upstream usageMetadata (#8182)
seefs001 Nov 3, 2026
7061447
fix(auth): 校验 Redis 鉴权缓存完整性 (#8200)
Calcium-Ion Nov 4, 2026
3374f25
feat: forward image complexity and markup for gpt-image-2.6 (#8208)
feitianbubu Nov 5, 2026
e3e7420
fix(pricing): guide users through model pricing issues
Calcium-Ion Nov 1, 2026
72f3dc7
fix(pricing): review model price changes before saving
Calcium-Ion Nov 5, 2026
2de51a1
fix(cache): 修复用户和令牌缓存的 Redis 跨槽错误 (#8218)
wang48 Nov 5, 2026
6fa80ab
fix: clarify session cache actions and expose per-rule clearing
Calcium-Ion Nov 5, 2026
a5a4659
fix(vertex): cache service-account access tokens until they expire
Calcium-Ion Nov 6, 2026
e034390
refactor(aws): remove the unused api_key HTTP request path
Calcium-Ion Nov 6, 2026
8c8940c
fix(plugins): serve uploaded plugins at top-level /v1 paths (#8241)
Calcium-Ion Nov 6, 2026
433830b
fix(channel): restore a multi-key channel when a key is enabled after…
Calcium-Ion Nov 7, 2026
ada15c0
fix(channel): keep a manual channel disable when a request fails
Calcium-Ion Nov 7, 2026
9c2c370
fix(sqlite): keep the default SQLite settings when SQLITE_PATH is a p…
Calcium-Ion Nov 7, 2026
a3fd673
feat(deepseek): 补全 Responses 工具历史缺失的 reasoning (#8162)
markcheney1 Nov 7, 2026
dd50ee0
feat(plugins): add gemini omni 1.2 flash and send every input image t…
feitianbubu Nov 7, 2026
e8298df
feat(channels): 高级自定义渠道增加 DeepSeek 搜索与抓取路径选项 (#8250)
longtsing Nov 8, 2026
48a6c87
fix(oauth): persist inviter when creating OAuth users (#8247)
Yorick-Ryu Nov 8, 2026
8faf1d4
fix(web): translate legal consent text on auth pages (#8254)
seefs001 Nov 8, 2026
bd6bb53
feat: support HOST env to set the listen address (#8269)
feitianbubu Nov 9, 2026
0409dec
fix(deepseek): map developer role to system for chat completions (#8287)
seefs001 Nov 10, 2026
579573a
feat(payment): 易支付支持 RSA 签名方式 (#8291)
Calcium-Ion Nov 11, 2026
be5e315
fix(channels): 切换渠道时重置模型重定向同步状态 (#8304)
scarletkc Nov 11, 2026
a9932d1
fix(web): sync risk confirmation text on composition end and blur
Calcium-Ion Nov 12, 2026
f3d8b73
perf: 升级 MoeForge moejs/moego,请求体按需流式读取 (#8311)
Calcium-Ion Nov 12, 2026
7b857f5
feat(plugins): add provider plugins, request plugins and a community …
Calcium-Ion Nov 12, 2026
f2aa912
chore(plugins): release vertex-ai 1.3.1 (#8313)
Calcium-Ion Nov 12, 2026
0bda086
chore(web-deps): upgrade frontend dependencies (#6999)
QuentinHsu Nov 12, 2026
6ef123c
perf(password): improve password validation and feedback (#6928)
QuentinHsu Nov 13, 2026
87c8848
fix(i18n): name the super admin in the compliance lock notice (#6955)
QuentinHsu Nov 13, 2026
b20e056
fix(web): align TanStack router devtools with the router core (#8320)
Calcium-Ion Nov 13, 2026
1122e0f
fix(web): keep channel plugin settings inside the drawer (#8323)
seefs001 Nov 13, 2026
c9c6da2
fix: 升级 moego 到 v0.1.0-alpha.3,修复无 AVX 的 x86-64 CPU 上的 SIGILL 崩溃 (#8322)
Calcium-Ion Nov 13, 2026
1a193ef
merge(upstream): sync new-api v1.0.0-rc.51
heiying0917 Nov 19, 2026
81f05ea
fix(upstream): 适配 rc.51 的日志 writer、插件保留路由与测试
heiying0917 Nov 19, 2026
29cac5f
fix(upstream): 评估脚本在 commit 多时因 SIGPIPE 退出 141
heiying0917 Nov 19, 2026
56be426
docs(worklog): 同步上游 rc.51
heiying0917 Nov 19, 2026
a5a00ce
docs(worklog): 更正 rc.51 计费修复描述,补 PR 号
heiying0917 Nov 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 12 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# ===================== tokenfunc 环境变量 =====================
# make 与 docker compose 都读取本文件(compose.yml / makefile)。
# ===================== tokenfunc 环境变量 ==============# make 与 docker compose 都读取本文件(compose.yml / makefile)。
# 开发:make dev 会自动复制本文件为 .env,默认值开箱即用。
# 生产:必须改掉所有密码与 TF_SESSION_SECRET,并按需打开 HTTPS 相关项。
#
Expand Down Expand Up @@ -37,6 +36,9 @@ TF_SESSION_SECRET=tokenfunc-dev-session-secret
# TF_DEFAULT_LANGUAGE=zh-CN
# ===================== 以下为上游 new-api 全部可用变量参考 =====================

=======
# 监听地址,留空监听所有网卡
# HOST=127.0.0.1
# 端口号
# PORT=3000
# 前端基础URL
Expand Down Expand Up @@ -101,12 +103,20 @@ TF_SESSION_SECRET=tokenfunc-dev-session-secret
# TASK_TIMEOUT_MINUTES=4320
# 异步任务连续轮询失败阈值(上游 429/5xx/401/403、网络错误、无法识别的响应),达到后任务标记失败并退款;正常轮询成功一次即归零
# TASK_POLL_MAX_FAILURES=20
# 插件每次调用的 JavaScript 最多可分配的内存,单位 MB,默认 512,0 表示不限制;调大 MAX_REQUEST_BODY_MB 时通常也要调大
# PLUGIN_MEMORY_LIMIT_MB=512

# 对话超时设置
# 所有请求超时时间,单位秒,默认为0,表示不限制
# RELAY_TIMEOUT=0
# Relay HTTP 客户端空闲连接超时时间,单位秒,默认跟随 Go 标准库,设置为0表示不限制
# RELAY_IDLE_CONN_TIMEOUT=90
# HTTP/2 连接连续未收到任何帧多少秒后发送 PING;0(默认)关闭健康探测。
# 适用于上游连接,包括代理与分片连接;与发给客户端的 SSE 心跳独立。
# RELAY_HTTP2_PING_IDLE_TIMEOUT=0
# 启用探测后等待 PING 应答的秒数;0 或负数使用 Go 默认值 15 秒。
# 仅关闭未应答的连接,正常应答的慢请求可继续等待。
# RELAY_HTTP2_PING_TIMEOUT=15
# 等待上游返回响应头的超时时间,单位秒,默认 1800,设置为 0 表示不限制。
# 仅约束「等待响应头」这一段;响应头返回之后的流式传输不受影响。
# 注意:非流式请求通常要等上游生成完毕才会返回响应头,因此该值需留足余量。
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/electron-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
if: runner.os == 'Windows'
run: |
go mod download
go build -pgo="$(go list -m -f '{{.Dir}}' github.com/Calcium-Ion/moejs)/default.pgo" -ldflags "-s -w -X 'github.com/QuantumNous/new-api/common.Version=$(git describe --tags)'" -o tokenfunc.exe
go build -pgo="$(go list -m -f '{{.Dir}}' github.com/MoeForge/moejs)/default.pgo" -ldflags "-s -w -X 'github.com/QuantumNous/new-api/common.Version=$(git describe --tags)'" -o tokenfunc.exe

- name: Update Electron version
run: |
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ jobs:
- name: Build Backend (amd64)
run: |
go mod download
go build -pgo="$(go list -m -f '{{.Dir}}' github.com/Calcium-Ion/moejs)/default.pgo" -ldflags "-s -w -X 'github.com/QuantumNous/new-api/common.Version=$VERSION' -extldflags '-static'" -o tokenfunc-$VERSION
go build -pgo="$(go list -m -f '{{.Dir}}' github.com/MoeForge/moejs)/default.pgo" -ldflags "-s -w -X 'github.com/QuantumNous/new-api/common.Version=$VERSION' -extldflags '-static'" -o tokenfunc-$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 -pgo="$(go list -m -f '{{.Dir}}' github.com/Calcium-Ion/moejs)/default.pgo" -ldflags "-s -w -X 'github.com/QuantumNous/new-api/common.Version=$VERSION' -extldflags '-static'" -o tokenfunc-arm64-$VERSION
CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build -pgo="$(go list -m -f '{{.Dir}}' github.com/MoeForge/moejs)/default.pgo" -ldflags "-s -w -X 'github.com/QuantumNous/new-api/common.Version=$VERSION' -extldflags '-static'" -o tokenfunc-arm64-$VERSION
- name: Generate checksums
run: sha256sum tokenfunc-* > checksums-linux.txt

Expand All @@ -64,6 +64,7 @@ jobs:
files: |
tokenfunc-*
checksums-linux.txt
THIRD-PARTY-LICENSES.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -102,7 +103,7 @@ jobs:
- name: Build Backend
run: |
go mod download
go build -pgo="$(go list -m -f '{{.Dir}}' github.com/Calcium-Ion/moejs)/default.pgo" -ldflags "-X 'github.com/QuantumNous/new-api/common.Version=$VERSION'" -o tokenfunc-macos-$VERSION
go build -pgo="$(go list -m -f '{{.Dir}}' github.com/MoeForge/moejs)/default.pgo" -ldflags "-X 'github.com/QuantumNous/new-api/common.Version=$VERSION'" -o tokenfunc-macos-$VERSION
- name: Generate checksums
run: shasum -a 256 tokenfunc-macos-* > checksums-macos.txt

Expand Down Expand Up @@ -153,7 +154,7 @@ jobs:
- name: Build Backend
run: |
go mod download
go build -pgo="$(go list -m -f '{{.Dir}}' github.com/Calcium-Ion/moejs)/default.pgo" -ldflags "-s -w -X 'github.com/QuantumNous/new-api/common.Version=$VERSION'" -o tokenfunc-$VERSION.exe
go build -pgo="$(go list -m -f '{{.Dir}}' github.com/MoeForge/moejs)/default.pgo" -ldflags "-s -w -X 'github.com/QuantumNous/new-api/common.Version=$VERSION'" -o tokenfunc-$VERSION.exe
- name: Generate checksums
run: sha256sum tokenfunc-*.exe > checksums-windows.txt

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN go mod download

COPY . .
COPY --from=builder /build/web/dist ./web/dist
RUN go build -pgo="$(go list -m -f '{{.Dir}}' github.com/Calcium-Ion/moejs)/default.pgo" -ldflags "-s -w -X 'github.com/QuantumNous/new-api/common.Version=$(cat VERSION)'" -o tokenfunc
RUN go build -pgo="$(go list -m -f '{{.Dir}}' github.com/MoeForge/moejs)/default.pgo" -ldflags "-s -w -X 'github.com/QuantumNous/new-api/common.Version=$(cat VERSION)'" -o tokenfunc

FROM debian:bookworm-slim@sha256:f06537653ac770703bc45b4b113475bd402f451e85223f0f2837acbf89ab020a

Expand Down
Loading
Loading