Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
cfaba1d
fix(billing): harden tiered retry group-switch billing (#6570)
Calcium-Ion Aug 1, 2026
bd585d7
fix(aws): cancel Bedrock requests on client disconnect (#6589)
Calcium-Ion Aug 1, 2026
0ab0202
Feat/auto group (#6590)
Calcium-Ion Aug 1, 2026
d6b5ce9
fix(relay): set Request.GetBody so the HTTP/2 transport can transpare…
BlockchainHe Aug 6, 2026
ea4f021
refactor(relay): move replay metadata onto request bodies
Calcium-Ion Aug 6, 2026
0cd9dc8
Merge commit from fork
RedwindA Aug 6, 2026
c9bc038
feat(channels): refine fetched model categorization (#6632)
seefs001 Aug 7, 2026
b941253
fix: test Claude/Gemini endpoints with native request format (#6698)
seefs001 Aug 7, 2026
1da23d6
feat(rate-limit): add user critical rate limit middleware for access …
Calcium-Ion Aug 6, 2026
e926e5c
fix: 修复兑换码额度精度损失 (#6685)
lihu-001 Aug 7, 2026
5c3abff
CI: enhance release synchronization workflow with optional file syncing
Calcium-Ion Aug 7, 2026
2399de9
fix(ali): stop injecting top_p into requests that omit it (#6674)
ENCHIGO Aug 8, 2026
823e263
fix(channels): classify Qwen TTS models correctly (#6711)
seefs001 Aug 8, 2026
5d3423b
feat(channels): add auto-disable-only channel test mode (#6728)
seefs001 Aug 10, 2026
7dd1000
perf(web): debounce server and large-list searches (#6727)
seefs001 Aug 10, 2026
eab18a8
fix: record reasoning effort consistently in usage logs (#6641)
seefs001 Aug 10, 2026
85feb7a
feat(relay): expose user and group context to parameter overrides (#6…
seefs001 Aug 10, 2026
8ad159a
fix(ollama): preserve reasoning and tool-call context (#6605)
seefs001 Aug 10, 2026
d49160f
fix: backend length validation (#5548)
seefs001 Aug 10, 2026
4cf9107
feat(billing): highlight matched conditional multipliers in logs (#6561)
seefs001 Aug 10, 2026
9c97e78
fix(web): require confirmation before rotating access token (#6749)
seefs001 Aug 10, 2026
253a74d
fix(relay): preserve presence/frequency penalty in Responses conversi…
UzkiS Aug 11, 2026
bb234ff
refactor(responses): remove compact model suffix handling (#6770)
seefs001 Aug 11, 2026
4eaeefb
fix: mobile sidebar (#6760)
seefs001 Aug 11, 2026
ffeb1b2
fix(web): refresh Turnstile token after login attempt (#6764)
thiswod Aug 11, 2026
3d5dc36
fix: 修复 Gemini 风格 /v1/models 列表请求 (#6199)
zhibisora Aug 11, 2026
d799267
fix(oauth): avoid overwriting user state when binding
Calcium-Ion Aug 10, 2026
50e5377
fix(topup): settle recharge orders atomically
Calcium-Ion Aug 10, 2026
ccd535e
fix: harden concurrent quota and status updates
Calcium-Ion Aug 10, 2026
58d4e9b
fix(billing): 异步任务退款时同步减少 used_quota (#6795)
wans10 Aug 13, 2026
15cfded
fix(web): keep fetched model selection in sync with form (#6841)
enwaiax Aug 14, 2026
93d2df8
fix(ali): 修复阿里图片模型映射后仍使用原始模型名判断协议的问题 (#6772)
wxwwt Aug 14, 2026
6260580
chore(deps): bump builder-util-runtime and electron-builder in /elect…
dependabot[bot] Aug 14, 2026
f250f3b
chore(deps): bump dompurify from 3.4.11 to 3.4.13 in /web (#6735)
dependabot[bot] Aug 14, 2026
53a8739
chore(deps-dev): bump fast-uri from 3.1.4 to 3.1.5 in /electron (#6846)
dependabot[bot] Aug 14, 2026
e5efc73
chore(deps-dev): bump tar from 7.5.16 to 7.5.22 in /electron (#6468)
dependabot[bot] Aug 14, 2026
2a0ce34
fix(topup): reject uncreditable orders before payment (#6845)
enwaiax Aug 14, 2026
cf38105
chore(deps-dev): bump js-yaml from 4.3.0 to 4.3.1 in /electron (#6704)
dependabot[bot] Aug 14, 2026
bbf67df
chore(deps-dev): bump electron from 39.8.5 to 39.8.10 in /electron (#…
dependabot[bot] Aug 14, 2026
47ba9d2
fix(topup): guard wallet quota during recharge
Calcium-Ion Aug 14, 2026
7d09c69
fix: prompt_cache_key openai chat -> openai responses (#6861)
seefs001 Aug 15, 2026
e90a7c4
feat: add field passthrough controls for gateway channels (#6847)
seefs001 Aug 15, 2026
4442bb3
fix(relay): stop injecting empty tools into Claude requests
zcxads666 Aug 15, 2026
116255f
fix(oauth): align custom binding response fields in frontend (#6818)
seefs001 Aug 15, 2026
e2c7aa7
test(web): standardize frontend tests on Vitest (#6569)
QuentinHsu Aug 15, 2026
3dda1d5
fix(relaykit): preserve parameterless tools in Claude conversion (#6862)
seefs001 Aug 18, 2026
2b0efd8
refactor: advanced custom channel route editor (#6865)
seefs001 Aug 18, 2026
4add708
feat: channel test (#6917)
seefs001 Aug 18, 2026
137d117
feat(web): fade in streamed response words and harden playground edit…
RedwindA Aug 18, 2026
f116414
fix: settle Responses cached token usage (#6892)
LiaoQi98 Aug 18, 2026
2d8e50b
refactor(web): prevent credential autofill in usage log filters (#6966)
seefs001 Aug 21, 2026
a073f74
refactor: deprecate int32 (#7025)
seefs001 Aug 26, 2026
8c25eee
chore(build): upgrade Bun to 1.4.0
Calcium-Ion Aug 26, 2026
8f6961c
feat: vllm thinking_token_budget (#7027)
seefs001 Aug 26, 2026
cae3676
feat: glm chanel /v1/responses (#7050)
seefs001 Aug 27, 2026
ba2e928
feat(ollama): passthrough Claude Messages and OpenAI Responses (#7051)
seefs001 Aug 27, 2026
e468b73
docs: update PR template and remove PR Check workflow (#7053)
seefs001 Aug 27, 2026
692e8d6
fix(web): restore admin unbinding for built-in providers (#6987)
zcxads666 Aug 29, 2026
ac381ac
fix(billing): 修复时间规则恒真表达式导致倍率全天生效 (#6934)
zcxads666 Aug 29, 2026
7037ac1
fix(docker): add relaykit go.mod to dev build context (#7072)
VladKabiak Aug 29, 2026
eb48396
feat(task): replace built-in task adaptors with a sandboxed JS plugin…
Calcium-Ion Aug 29, 2026
0f2a207
fix(relay): 请求参数校验错误返回 HTTP 400 (#6774)
ax2 Aug 29, 2026
98d50d5
fix(web): recheck setup status after page reload (#6968)
seefs001 Aug 29, 2026
b80d633
feat(auth): encrypt password login transport
Calcium-Ion Aug 29, 2026
8454082
feat(chat): add AQBot preset (#7079)
Licoy Aug 29, 2026
918427d
feat(auth): make password encryption opt-in #6743
Calcium-Ion Aug 29, 2026
6c22550
feat(task): resolve channel-mapped aliases and case variants for plug…
Calcium-Ion Aug 30, 2026
66031a0
fix(model): disable PostgreSQL prepared statements for pooler compati…
Calcium-Ion Aug 30, 2026
0bee5d4
fix(ali): honor image response format (#5513) (#7048)
PuppetKL Aug 30, 2026
dc4732c
feat(web): factory task plugins update only with the system
Calcium-Ion Aug 30, 2026
b5b94bc
fix(subscription): 无有效订阅时前端如实显示「仅用订阅」偏好 (#6222) (#7086)
CR-Yun Aug 30, 2026
1751f43
fix(sqlite): enable WAL + working busy timeout + _txlock=immediate to…
LinineTy Aug 30, 2026
6eb6f35
fix(model): return string from JSON column Valuers for pg simple prot…
Calcium-Ion Aug 30, 2026
b518d00
fix(relay): bound the wait for upstream response headers (fixes unbou…
txgo Aug 30, 2026
7415871
fix initialize database
Calcium-Ion Aug 30, 2026
69a41ee
fix(model): drop leftover prefill_groups unique constraints before Au…
seefs001 Aug 30, 2026
2bf0820
Revert "fix(model): drop leftover prefill_groups unique constraints b…
Calcium-Ion Aug 30, 2026
2b6f1df
fix(model): drop leftover prefill_groups unique constraints before Au…
Calcium-Ion Aug 30, 2026
8c8c415
fix(log): preserve quota in usage statistics (#7108)
jimmyleocn Aug 31, 2026
27ff6a8
fix(model): migrate legacy token key constraints
Calcium-Ion Aug 31, 2026
67a0585
fix(docs): correct Video API links across localized READMEs (#7116)
To3akaRin Aug 31, 2026
b7017c2
fix(model): do not treat no-op system task state writes as lock loss …
seefs001 Sep 1, 2026
0ed497f
feat(relay): hosted-tool conversion fidelity, reasoning normalization…
Calcium-Ion Sep 1, 2026
bbd9744
fix(relay): follow-up billing integrity and conversion completions (#…
Calcium-Ion Sep 3, 2026
aece11d
feat(plugin): add MiniMax-H3 /v2 video generation to the hailuo task …
NebulaMao Sep 3, 2026
d8ca0ed
chore: let owners use human PR templates
Calcium-Ion Sep 3, 2026
73afad5
fix(plugin): account for MiniMax-H3 input media usage (#7171)
Calcium-Ion Sep 3, 2026
057f71c
fix(logs): isolate privileged metadata
Calcium-Ion Sep 3, 2026
219c9e0
优化匿名冷启动与公开内容接口的重复回源请求 (#7166)
Omnls Sep 3, 2026
9f506dd
refactor(logs): simplify LogOther projection and dedupe sensitive keys
Calcium-Ion Sep 3, 2026
9df450f
feat(task): give polling hooks a real query context, host HTTP classi…
Calcium-Ion Sep 3, 2026
36dbbf0
fix: keep ETag valid across different JSON packages
Calcium-Ion Sep 3, 2026
8f5ab8e
fix(ci): resolve release version from trigger tag
Calcium-Ion Sep 3, 2026
32c2619
fix(task): explain 503 when a plugin-claimed model has no channel
Calcium-Ion Sep 3, 2026
3a9f41e
fix: temp disable /messages/count_tokens
Calcium-Ion Sep 4, 2026
7c044d7
feat(relay): explicit @ model modifiers and canonical billing identity
Calcium-Ion Sep 4, 2026
6b659fd
fix(relay): preserve reasoning effort without implicit remapping
Calcium-Ion Sep 5, 2026
d580353
docs: require expression pricing and consolidated tests
Calcium-Ion Sep 5, 2026
eb99ab1
feat(billing): add built-in expression pricing for gpt-6-astra
Calcium-Ion Sep 5, 2026
1569569
Merge QuantumNous/new-api main into fork
3metaJun Sep 5, 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
  •  
  •  
  •  
178 changes: 178 additions & 0 deletions .agents/github/ISSUE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
<!--
Agent-only issue body. Humans use GitHub issue forms.

Keep every heading. If a section does not apply, write why; do not delete it.
Match the user's language in the filled answers. Quote what the user said; do not invent facts.

If a field below is missing from the conversation, ask the user that question
and wait. Ask for the facts themselves. Do not tell the user to confirm a
template, tick checkboxes, or acknowledge the guidelines.

Before filing, refuse out-of-scope requests listed below. Then search the docs,
DeepWiki, README, and the code. If this is a usage, configuration, or
integration question, answer the user from that material and do not file.
-->

## Agent

- Tool:
- Tool version:
- Model (full id):
- Host (CLI / IDE / GitHub coding agent / other):
- Date (UTC):

## User request

(verbatim or close paraphrase)

## Out of scope — refuse

If the request matches any item below, tell the user this repository does not
accept it, point them to the right place when there is one, and **do not file**.

- Coding Plan
- Reverse-engineered channels
- Third-party API wrappers
- Compatibility issues from exposing a Codex endpoint as a general-purpose API through a reverse proxy
- Codex API-specific protocol or behavior treated as standard OpenAI API behavior (confirm with the channel or API provider)
- Pass-through mode forwarding (pass-through forwards as-is; verify upstream yourself)
- Relay reports that only paste an upstream error, with no direct-upstream vs new-api comparison
- Third-party hosting sites, relay services, or API services (contact their operator)
- Usage, configuration, or integration questions (answer from docs and code instead)

- Matched: yes/no
- If yes, what was told to the user (stop here; do not file):

## Kind

- [ ] Bug
- [ ] Feature
- [ ] Investigation
- [ ] Other:

## Usage / configuration / integration check

Search these yourself before filing. Do not send the user to "read the docs first". If this is usage, configuration, or integration: answer the user and do not file.

- https://docs.newapi.ai/ — what was searched, conclusion:
- https://deepwiki.com/QuantumNous/new-api — what was searched, conclusion:
- README / repo docs:
- Relevant code paths and conclusion:
- Can the current version already do this? (required for feature requests):
- Verdict: product bug or new feature / usage question (stop here):

## Environment

- new-api version / commit / image tag (not `latest` / `unknown`):
- Deploy source (repo release / official image / main source / other):
- Database (sqlite / mysql / postgres):

## Problem facts

Ask the user for every item and write it down:

- Actual behavior:
- Impact:
- Frequency:
- Evidence that the problem is in new-api rather than the client or upstream:

## Type-specific details

Fill every applicable type. Write "not applicable" for the rest. Ask the user for missing items; do not invent them.

### Relay / API

- Request endpoint and method:
- Channel type:
- Model:
- Conversion format:
- Pass-through enabled:
- Evidence of upstream native support:
- Equivalent redacted request sent directly upstream: status, body, server logs:
- Same request through new-api: status, body, server logs:

### Billing

- Request endpoint and model:
- Response `usage`:
- Relevant ratio or pricing configuration:
- Consumption log:
- Expected charge and calculation basis:

### Frontend

- Page path:
- Browser and version:
- Active theme:
- Relevant browser Console / Network errors:

### Deployment / upgrade

- Deployment method:
- OS and architecture:
- Database type:
- Versions before and after the upgrade:
- Startup or migration logs:

## Reproduction and expected result

- Steps to reproduce:
- Expected result:
- Related screenshots (optional):

## Feature (feature requests only)

- Feature description:
- Use case:

## Duplicate check

- Search queries (issues, PRs, discussions):
- Closest existing threads:
- Why this is not a duplicate:

## Research

Open the docs and code. Do not write "already checked" without sources.

### Docs

- https://docs.newapi.ai/ :
- https://deepwiki.com/QuantumNous/new-api :
- README / other repo docs:
- Conclusions:

### Code

- Path — what it does, and how it relates:

### Experiments

- Command or redacted request:
- Direct upstream result:
- Result through new-api:
- Conclusion:

## Working theory

- What is broken or missing:
- Why:
- What would falsify this:

## Scope

- In scope for a later PR:
- Out of scope / not this repo:
- Large or directional feature? If yes, this issue is for maintainer alignment; do not open a PR yet.

## Proposed direction

(acceptance criteria, not an implementation dump)

## Not verified

(platforms, databases, providers, versions, paths not checked)

## Related

- Issues / PRs / upstream docs:
136 changes: 136 additions & 0 deletions .agents/github/PR.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
<!--
Agent-only PR body. Humans use `.github/PULL_REQUEST_TEMPLATE.md`.

Keep every heading. If a section does not apply, write why; do not delete it.
Match the user's language in the filled answers. Quote what the user said; do not invent facts.

New features: link an issue; if none exists, file one first with `.agents/github/ISSUE.md`.
Large or directional changes: maintainer agreement on that issue before this PR.

If this PR fixes a bug and the linked issue is missing actual behavior, impact,
frequency, evidence that the problem is in new-api, or the applicable
relay / billing / frontend / deployment items, ask the user those questions
and wait. Ask for the facts. Do not tell the user to confirm a template.

Before opening, refuse the same out-of-scope list as `.agents/github/ISSUE.md`
(Coding Plan, reverse-engineered channels, third-party wrappers, Codex reverse-proxy
compatibility, pass-through-only forwarding, third-party hosts, usage questions).
Tell the user and do not open a PR.

Then search https://docs.newapi.ai/ , https://deepwiki.com/QuantumNous/new-api ,
the README, and the code. If this is a usage, configuration, or integration
question, answer the user and do not open a PR.
-->

## Agent

- Tool:
- Tool version:
- Model (full id):
- Host (CLI / IDE / GitHub coding agent / other):
- Date (UTC):

## Links

- Closes #
- Related:

## User request

(verbatim or close paraphrase)

## Out of scope — refuse

If the change matches any item below, tell the user this repository does not
accept it and **do not open a PR**.

- Coding Plan
- Reverse-engineered channels
- Third-party API wrappers
- Codex channel-type changes, or compatibility from exposing Codex as a general-purpose API
- Codex API-specific protocol or behavior treated as standard OpenAI API behavior
- Pass-through-only forwarding
- Third-party hosting sites, relay services, or API services
- Usage, configuration, or integration (answer from docs and code instead)

- Matched: yes/no
- If yes, what was told to the user (stop here; do not open a PR):

## Kind

- [ ] Bug fix
- [ ] New feature
- [ ] Performance / refactor
- [ ] Docs
- [ ] Other:

## Issue facts

Take these from the linked issue. If a needed item is empty, ask the user that question.

- Actual behavior:
- Impact:
- Frequency:
- Evidence that the problem is in new-api rather than the client or upstream:
- Applicable types and their fields (relay / billing / frontend / deployment; write "not applicable" otherwise):

## Change

(what changed, why it works, grounded in the code actually touched)

## Research

### Duplicate / prior art

- Search queries (issues, PRs):
- What already existed and why this is not a duplicate:

### Docs and code

Open them. Do not write "already checked" without sources.

- https://docs.newapi.ai/ :
- https://deepwiki.com/QuantumNous/new-api :
- README / repo docs:
- Code paths and what they imply for this change:

### Alternatives considered

- Option A:
- Option B:
- Why this approach:

## Files

| Path | Why |
| --- | --- |
| | |

## Behavior

- Before:
- After:
- Explicit non-goals / leftover work:

## Verification

Only what was actually run.

- Commands and results:
- Manual steps and observed result:
- UI: screenshot or recording (or why none):
- Tests added or updated, or why none:
- Databases / providers / platforms exercised:
- Not verified:

## Risks

- Failure modes:
- Billing / quota / auth impact:
- Follow-ups:

## Scope check

- Single focused change: yes/no (if no, why):
- Secrets included: no
- Out of scope (Coding Plan / reverse-engineered channel / third-party wrapper / Codex): no
12 changes: 12 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
# SQL_MAX_LIFETIME=60
# 慢查询日志阈值(毫秒),0 表示关闭慢查询日志,超出 0-3600000 范围回退默认值 200
# SQL_SLOW_THRESHOLD_MS=200
# 跳过用户额度列 64 位 schema 检查(仅在已确认数据库列可容纳 64 位时启用)
# SKIP_64BIT_QUOTA_SCHEMA_CHECK=true


# 缓存相关配置
Expand All @@ -54,12 +56,20 @@
# 任务和功能配置
# 更新任务启用
# UPDATE_TASK=true
# 异步任务硬超时(分钟),按提交时间计算,超时未完成的任务标记失败并退款;0 表示禁用
# TASK_TIMEOUT_MINUTES=1440
# 异步任务连续轮询失败阈值(上游 429/5xx/401/403、网络错误、无法识别的响应),达到后任务标记失败并退款;正常轮询成功一次即归零
# TASK_POLL_MAX_FAILURES=20

# 对话超时设置
# 所有请求超时时间,单位秒,默认为0,表示不限制
# RELAY_TIMEOUT=0
# Relay HTTP 客户端空闲连接超时时间,单位秒,默认跟随 Go 标准库,设置为0表示不限制
# RELAY_IDLE_CONN_TIMEOUT=90
# 等待上游返回响应头的超时时间,单位秒,默认 1800,设置为 0 表示不限制。
# 仅约束「等待响应头」这一段;响应头返回之后的流式传输不受影响。
# 注意:非流式请求通常要等上游生成完毕才会返回响应头,因此该值需留足余量。
# RELAY_RESPONSE_HEADER_TIMEOUT=1800
# 流模式无响应超时时间,单位秒,如果出现空补全可以尝试改为更大值
# STREAMING_TIMEOUT=300

Expand All @@ -77,6 +87,8 @@

# 会话密钥
# SESSION_SECRET=random_string
# 登录密码请求体 RSA-OAEP 加密;默认关闭,且不能替代 HTTPS
# PASSWORD_LOGIN_ENCRYPTION_ENABLED=true
# false/未配置:本地 HTTP 模式,关闭 refresh/logout OriginGuard,且不得设置 TRUSTED_URL;兼容本地开发代理。
# true:启用 Secure Refresh Cookie 和严格 OriginGuard,必须同时列出全部可信 HTTPS Origin。
# SESSION_COOKIE_TRUSTED_URL 多项用英文逗号分隔;不支持通配符、路径或域名后缀匹配。
Expand Down
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ body:
- type: markdown
attributes:
value: |
<!--
If you are an AI coding agent: do not fill this GitHub form. Create the issue with the filled body from `.agents/github/ISSUE.md`.
-->
## 提交前必读(请勿删除本节)

- 文档:https://docs.newapi.ai/
Expand Down
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report_en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ body:
- type: markdown
attributes:
value: |
<!--
If you are an AI coding agent: do not fill this GitHub form. Create the issue with the filled body from `.agents/github/ISSUE.md`.
-->
## Read This First (Do Not Remove This Section)

- Docs: https://docs.newapi.ai/
Expand Down
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ body:
- type: markdown
attributes:
value: |
<!--
If you are an AI coding agent: do not fill this GitHub form. Create the issue with the filled body from `.agents/github/ISSUE.md`.
-->
## 提交前必读(请勿删除本节)

- 文档:https://docs.newapi.ai/
Expand Down
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request_en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ body:
- type: markdown
attributes:
value: |
<!--
If you are an AI coding agent: do not fill this GitHub form. Create the issue with the filled body from `.agents/github/ISSUE.md`.
-->
## Read This First (Do Not Remove This Section)

- Docs: https://docs.newapi.ai/
Expand Down
Loading
Loading