Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
a4ea805
fix(openai): recover rejected encrypted reasoning signatures
wucm667 Sep 29, 2026
5ace069
fix(pricing): preserve exponents when trimming scaled prices
ouchihao Sep 29, 2026
e180a93
fix(users): show normalized errors when bulk updating limits
ouchihao Sep 29, 2026
636faa6
fix(profile): ignore obsolete notification email code responses
ouchihao Sep 29, 2026
7d0bf9c
fix(usage): preserve zero user multipliers in cost details
ouchihao Sep 29, 2026
3a1a37b
fix(ops): retain byte units for sub-byte throughput
ouchihao Sep 29, 2026
cee7603
fix(announcements): report failed read confirmations accurately
ouchihao Sep 29, 2026
8bc375b
fix(batch-image): allow access lookup retries after request failures
ouchihao Sep 29, 2026
8a495b0
fix(usage): ignore obsolete cleanup task list responses
ouchihao Sep 29, 2026
8167d85
fix(ui): close selectors when they become disabled
ouchihao Sep 29, 2026
2e2b8f6
fix(auth): avoid starting OAuth code cooldowns after unmount
ouchihao Sep 29, 2026
00a922c
fix(backup): prevent polling from restarting after navigation
ouchihao Sep 29, 2026
e0019da
fix(ui): limit Escape to the most recently opened dialog
ouchihao Sep 29, 2026
c641453
fix(auth): share pending step-up verification prompts
ouchihao Sep 29, 2026
7542046
fix(plugins): ignore obsolete configuration UI sessions
ouchihao Sep 30, 2026
21d90fb
fix(auth): keep cleared compliance state isolated from pending requests
ouchihao Sep 30, 2026
3613174
fix(grok): fail over silent-refusal empty response.completed on Grok …
YahooYuan666 Sep 30, 2026
27f4a17
test(grok): cover empty response.completed failover for PlatformGrok
YahooYuan666 Sep 30, 2026
73381fc
fix(openai-ws): bill each later turn with the current group pricing
SPHINX998 Oct 1, 2026
71e97d1
fix(models): enforce account mappings for remote Codex discovery
lyy0709 Oct 1, 2026
f3d7526
fix(apicompat): flatten named chat tool_choice for Responses
SPHINX998 Oct 1, 2026
9a8ab4f
fix(apicompat): keep chat developer messages as developer role
SPHINX998 Oct 1, 2026
7a767d5
fix(apicompat): pair legacy chat function calls with their results
SPHINX998 Oct 1, 2026
15f469c
fix(gateway): ignore negative content block index in buffered Anthrop…
SPHINX998 Oct 1, 2026
775c1a3
fix(apicompat): preserve refusals when converting Responses to Chat
SPHINX998 Oct 1, 2026
b6a157c
fix(openai): account image input usage on WS passthrough
SPHINX998 Oct 1, 2026
1888de1
fix(models): list composite exact route aliases
wucm667 Oct 1, 2026
4407849
fix(channels): 追加模型时不再改写已留空的价格条目
duckducktw Oct 1, 2026
c0e5a46
fix(codex): never advertise null service_tiers in models manifest
kingsleydon Oct 2, 2026
dd7ee21
style(codex): use tagged switch for capability conflict fallback
kingsleydon Oct 2, 2026
1838039
chore(codex): drop added comments
kingsleydon Oct 2, 2026
4b6ed15
fix(custom-pages): ignore obsolete Markdown responses
ouchihao Oct 2, 2026
1c996fe
fix(payment): stop late Stripe callbacks after leaving the page
ouchihao Oct 2, 2026
abdfbb7
fix(web): bypass bare API aliases from embedded frontend fallback
neotan Oct 2, 2026
5800abf
fix(models): preserve composite catalog isolation after base update
wucm667 Oct 3, 2026
852f0f8
fix(anthropic): preserve requested tool change beta headers
Achordchan Oct 3, 2026
abbe42a
fix(profile): preserve email binding draft during user refresh
ShanYi-Hui Oct 3, 2026
856d7ea
fix: expose mapped antigravity test models
yJader Oct 3, 2026
f385bba
docs: keep connectivity test fix out of README
yJader Oct 3, 2026
8f63651
fix(admin): keep scheduled test results scoped to the expanded plan
ouchihao Oct 3, 2026
4551fb0
fix(monitor): ignore obsolete template manager list responses
ouchihao Oct 3, 2026
b472042
fix(ops): discard stale alert event pages after filter changes
ouchihao Oct 3, 2026
81bd85e
fix(ops): require loaded settings before saving
ouchihao Oct 3, 2026
b07b1fb
fix(ops): validate alert rule durations as whole minutes
ouchihao Oct 3, 2026
da4419e
fix(anthropic): keep cache TTL order valid on the mimic path
cyhhao Oct 3, 2026
679a718
feat(accounts): compact account search and filters
wucm667 Oct 4, 2026
9f84204
fix(streaming): preserve chat stream heartbeat comments
wucm667 Oct 4, 2026
412718e
fix(apicompat): always include `signature` on Anthropic thinking blocks
3219378872 Oct 5, 2026
0173861
fix(channel-monitor): build zhipu probe URL from the configured endpoint
hezhaoqian1 Oct 6, 2026
5ef517d
fix(accounts): attribute connectivity test failure logs
Achordchan Oct 6, 2026
54810f8
fix(grok): include consent token and origin in SSO device approval
whhphd Oct 6, 2026
0dccd7b
fix(opencode): correct Zen qwen3.8-max endpoint and reject unsupporte…
aishangwuji Oct 6, 2026
aa3b049
fix(opencode): cap Retry-After hint at 24h for usage refresh backoff
aishangwuji Oct 6, 2026
480f668
fix(opencode): cap Retry-After hint for billing probe schedule
aishangwuji Oct 6, 2026
df89228
fix(opencode): report 403 as neutral forbidden in usage snapshot
aishangwuji Oct 6, 2026
3f1a2ea
chore: sync VERSION to 0.2.14 [skip ci]
github-actions[bot] Oct 7, 2026
d5f490e
fix(usage): replace misleading long-context multiplier badge
wucm667 Oct 7, 2026
7b1aa93
fix(groups): preserve numeric values when editing RPM overrides
ouchihao Oct 7, 2026
795a7e2
fix(payment): stop Airwallex checkout after leaving the page
ouchihao Oct 7, 2026
f022a04
fix(admin): use the saved passthrough rule enabled state
ouchihao Oct 7, 2026
3f2f66f
fix(profile): preserve username edits made during save
ouchihao Oct 7, 2026
8811c12
fix(groups): ignore stale rate multiplier loads
ouchihao Oct 7, 2026
61e1afd
perf(openai): lazily rebuild input when stripping namespaces
liuyh06 Oct 7, 2026
6f6a27f
feat(usage): show per-request output TPS by default
lyy0709 Oct 7, 2026
38dd23f
chore: remove PR screenshots
lyy0709 Oct 7, 2026
1817a84
feat(ops): show per-request output TPS percentiles
lyy0709 Oct 7, 2026
18182f1
style(ops): align output TPS tooltip indentation
lyy0709 Oct 7, 2026
7cd3dc8
fix(channel-monitor): require request samples before health scoring
wucm667 Oct 8, 2026
db29b3a
Merge pull request #7811 from kingsleydon/fix/codex-service-tiers-nul…
Wei-Shaw Oct 8, 2026
6db4171
Merge pull request #7779 from SPHINX998/fix/ws-turn-group-pricing
Wei-Shaw Oct 8, 2026
ef16f8a
Merge pull request #7792 from SPHINX998/fix/ws-passthrough-image-usage
Wei-Shaw Oct 8, 2026
f087fdb
Merge pull request #7785 from SPHINX998/fix/apicompat-chat-named-tool…
Wei-Shaw Oct 8, 2026
f9bd97c
Merge pull request #7786 from SPHINX998/fix/apicompat-chat-developer-…
Wei-Shaw Oct 8, 2026
8d50466
Merge pull request #7787 from SPHINX998/fix/apicompat-chat-legacy-fun…
Wei-Shaw Oct 8, 2026
9d49d27
Merge pull request #7788 from SPHINX998/fix/apicompat-responses-refus…
Wei-Shaw Oct 8, 2026
cc4a1e3
Merge pull request #7789 from SPHINX998/fix/anthropic-buffered-negati…
Wei-Shaw Oct 8, 2026
e473fba
Merge pull request #7869 from 3219378872/fix/thinking-signature-key
Wei-Shaw Oct 8, 2026
f19cd4f
Merge pull request #7844 from cyhhao/fix/anthropic-cache-ttl-order
Wei-Shaw Oct 8, 2026
1293692
Merge pull request #7827 from Achordchan/fix/anthropic-tool-change-betas
Wei-Shaw Oct 8, 2026
2afe7d4
Merge pull request #7910 from liuyh06/codex/fix-responses-namespace-noop
Wei-Shaw Oct 8, 2026
6cacccc
Merge pull request #7775 from YahooYuan666/fix/grok-empty-completed-s…
Wei-Shaw Oct 8, 2026
90afaf1
Merge pull request #7854 from wucm667/fix/issue-7852-chat-stream-hear…
Wei-Shaw Oct 8, 2026
bbf1d37
Merge pull request #7891 from aishangwuji/fix/opencode-go-usage-retry…
Wei-Shaw Oct 8, 2026
3c27476
Merge pull request #7889 from aishangwuji/fix/opencode-zen-routing-an…
Wei-Shaw Oct 8, 2026
bb0d4a5
Merge pull request #7887 from whhphd/fix/grok-sso-consent
Wei-Shaw Oct 8, 2026
4b8c557
Merge pull request #7877 from hezhaoqian1/fix/upstream-channel-monito…
Wei-Shaw Oct 8, 2026
3a7fd4a
Merge pull request #7837 from yJader/fix/antigravity-account-test-models
Wei-Shaw Oct 8, 2026
458865e
Merge pull request #7878 from Achordchan/fix/account-test-log-context
Wei-Shaw Oct 8, 2026
bc63bd2
Merge pull request #7782 from lyy0709/codex/fix-remote-model-catalog
Wei-Shaw Oct 8, 2026
7ff5cff
Merge pull request #7822 from neotan/fix/issue-7670-bare-api-alias-by…
Wei-Shaw Oct 8, 2026
4bcad06
Merge pull request #7800 from duckducktw/fix/pricing-entry-autofill-a…
Wei-Shaw Oct 8, 2026
7fc5332
Merge pull request #7904 from ouchihao/codex/bug-group-rate-load-race
Wei-Shaw Oct 8, 2026
b126b94
Merge pull request #7903 from ouchihao/codex/bug-profile-username-draft
Wei-Shaw Oct 8, 2026
cdbf1d6
Merge pull request #7902 from ouchihao/codex/bug-passthrough-toggle-s…
Wei-Shaw Oct 8, 2026
c2f0edc
Merge pull request #7901 from ouchihao/codex/bug-airwallex-navigation
Wei-Shaw Oct 8, 2026
1865f28
Merge pull request #7900 from ouchihao/codex/bug-rpm-edit-number
Wei-Shaw Oct 8, 2026
d1202be
Merge pull request #7843 from ouchihao/codex/bug-alert-rule-integer-d…
Wei-Shaw Oct 8, 2026
486b226
Merge pull request #7842 from ouchihao/codex/bug-ops-settings-load-guard
Wei-Shaw Oct 8, 2026
02aad47
Merge pull request #7841 from ouchihao/codex/bug-alert-events-paginat…
Wei-Shaw Oct 8, 2026
2c6bd63
Merge pull request #7840 from ouchihao/codex/bug-monitor-template-lis…
Wei-Shaw Oct 8, 2026
f3bcad3
Merge pull request #7839 from ouchihao/codex/bug-scheduled-results-race
Wei-Shaw Oct 8, 2026
4747827
Merge pull request #7819 from ouchihao/codex/bug-stripe-payment-unmount
Wei-Shaw Oct 8, 2026
b949744
Merge pull request #7818 from ouchihao/codex/bug-custom-page-request-…
Wei-Shaw Oct 8, 2026
48c647b
Merge pull request #7833 from ShanYi-Hui/fix/preserve-email-binding-d…
Wei-Shaw Oct 8, 2026
ba3af61
Merge pull request #7897 from wucm667/fix/issue-7894-long-context-marker
Wei-Shaw Oct 8, 2026
0ac774e
Merge pull request #7853 from wucm667/feat/issue-7847-compact-account…
Wei-Shaw Oct 8, 2026
8e2c4fa
Merge pull request #7793 from wucm667/fix/issue-7784-composite-route-…
Wei-Shaw Oct 8, 2026
745ff1d
Merge pull request #7911 from lyy0709/codex/usage-output-tps
Wei-Shaw Oct 8, 2026
2eb7ccb
Merge pull request #7703 from wucm667/fix/issue-7700-thinking-signature
Wei-Shaw Oct 8, 2026
9e46f2d
Merge pull request #7732 from ouchihao/codex/bug-step-up-concurrent-p…
Wei-Shaw Oct 8, 2026
0682393
Merge pull request #7765 from ouchihao/codex/bug-compliance-reset-race
Wei-Shaw Oct 8, 2026
2c13fb5
Merge pull request #7764 from ouchihao/codex/bug-plugin-config-sessio…
Wei-Shaw Oct 8, 2026
3dc2a9c
Merge pull request #7731 from ouchihao/codex/bug-dialog-escape-stack
Wei-Shaw Oct 8, 2026
0b51cbe
Merge pull request #7729 from ouchihao/codex/bug-backup-polling-unmount
Wei-Shaw Oct 8, 2026
3149d62
Merge pull request #7724 from ouchihao/codex/bug-cleanup-task-race
Wei-Shaw Oct 8, 2026
6cfa0f4
Merge pull request #7723 from ouchihao/codex/bug-batch-image-access-r…
Wei-Shaw Oct 8, 2026
9663b5c
Merge pull request #7722 from ouchihao/codex/bug-announcement-read-fa…
Wei-Shaw Oct 8, 2026
b0c2c4d
Merge pull request #7720 from ouchihao/codex/bug-usage-zero-rate
Wei-Shaw Oct 8, 2026
a618338
Merge pull request #7719 from ouchihao/codex/bug-notify-email-timers
Wei-Shaw Oct 8, 2026
d068b86
Merge pull request #7718 from ouchihao/codex/bug-bulk-user-error-message
Wei-Shaw Oct 8, 2026
5a6e826
Merge pull request #7716 from ouchihao/codex/bug-scaled-price-exponent
Wei-Shaw Oct 8, 2026
80dd728
Merge pull request #7728 from ouchihao/codex/bug-oauth-code-unmount
Wei-Shaw Oct 8, 2026
3a012ac
Merge pull request #7725 from ouchihao/codex/bug-select-disabled-open
Wei-Shaw Oct 8, 2026
3e69643
Merge pull request #7721 from ouchihao/codex/bug-fractional-byte-rate
Wei-Shaw Oct 8, 2026
5fc0e48
Merge pull request #7916 from wucm667/fix/issue-7914-monitor-request-…
Wei-Shaw Oct 8, 2026
c063a40
refactor(provider): 以 provider profile 收敛多协议供应商默认端点表
SavitarC Sep 27, 2026
3f8eea0
refactor(provider): profile 端点改为按协议登记,Responses 路径约定并入 profile
SavitarC Sep 27, 2026
8ac2936
refactor(gateway): 三个入站入口的上游协议分流收敛为 resolveUpstreamProtocol
SavitarC Sep 27, 2026
105c955
fix(gateway): /v1/responses 转 Anthropic 时统一以去空白的请求模型兜底映射
SavitarC Sep 27, 2026
3b89cc0
refactor(platform): 后端平台列表改由平台清单派生
SavitarC Oct 2, 2026
eefa7dd
refactor(platform): 平台白名单由数据库约束改为应用层校验
SavitarC Oct 2, 2026
c556aee
refactor(platform): 多协议供应商的转发与探测判断改查 profile
SavitarC Sep 27, 2026
7ffa38a
feat(frontend): 平台列表与多协议账号表单改由平台清单驱动
SavitarC Sep 27, 2026
e2939cd
feat(platform): 接入 Command Code 平台
SavitarC Oct 3, 2026
874871a
feat(platform): 接入 Cline 平台
SavitarC Oct 3, 2026
9264414
fix(provider): 修复 Claude 计费与钱包冷却并隔离模型目录缓存
SavitarC Oct 9, 2026
7ca08d5
fix(frontend): 按平台能力展示模型同步入口并同步 Zen 规则
SavitarC Oct 9, 2026
387ee20
test(platform): 补录制路由基准与平台约束迁移防护
SavitarC Oct 9, 2026
c61f6eb
fix(security): 升级 Go 1.27.2 与 x/net 修复安全扫描
SavitarC Oct 9, 2026
5f93bb3
fix(ci): 升级 lint 支持 Go 1.27.2 并保留 HTTP2 兼容检查
SavitarC Oct 9, 2026
d85cebe
fix(ci): 升级 schema 导入器支持 Go 1.27.2 导出格式
SavitarC Oct 9, 2026
d0392ed
Merge pull request #7618 from SavitarC/feat/provider-profile
Wei-Shaw Oct 9, 2026
dab3b87
fix(openai): declare web_search when OAuth history replays web_search…
Oct 8, 2026
64caa9a
fix(openai): declare web_search via additional_tools for Responses Lite
Oct 8, 2026
85e3110
fix(lint): check type assertions in web_search history helper and test
Wei-Shaw Oct 9, 2026
f2669c8
Merge pull request #7939 from IrisRainbowNeko/fix/issue-7927-web-sear…
Wei-Shaw Oct 9, 2026
4a2c27a
Merge official Sub2API v0.2.15 and retire downstream OpenAI recovery
Oct 9, 2026
dee61ec
Preserve independent continuation and account-test contracts during o…
Oct 9, 2026
a484961
Complete recovery retirement and platform threshold regressions
Oct 9, 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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .downstream/upstream-base
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.2.14
v0.2.15
27 changes: 27 additions & 0 deletions .downstream/upstream-review-v0.2.15.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Official v0.2.15 integration

- Official tag: `v0.2.15`, commit `f2669c8cf62555cd92389b3f55920e9e6e7c6ff2`.
- Downstream starting commit: `d469422e94b0655b22dd9d0a826decda61ffb91e`.
- The 40 initial conflicts cover dependency/CI compatibility, platform catalogs,
tests, account interfaces and OpenAI request/usage handling. Existing Go
1.27.2 and dependency security pins and narrow HTTP2 exceptions remain.
- Cline, Command Code, catalog-driven platforms, protocol conversion, model
discovery, TPS and async UI fixes follow the official release. Each WS turn
uses its refreshed group pricing while retaining immutable usage snapshots.
- OpenAI encrypted-content recovery and account retry rules follow official;
downstream recovery state, its admin API/page and special failovers are retired.
Historical settings and diagnostic data are retained. Claude recovery, Codex
identity/borrowing, Pelican observation, prompt injection, capacity evidence,
full administrator visibility and mapped test-model contracts remain.
- Named standalone API-key tool outputs retain their namespace; official lazy
request reconstruction is used. Compact filters retain existing facets and
state. New platforms take prompt/effort extensions only on supported paths.
- Official 242 and additive downstream 277 end both upgrade and fresh-install
paths without the two database platform CHECK constraints. 251/260/265 stay
byte-for-byte unchanged; 277 changes no rows. VERSION is 0.2.15.

Local validation uses fake upstreams, UI fixtures and an isolated PostgreSQL
18.1 database. It covers official recovery, namespace preservation, new-platform
prompt/effort support, mapped models, filter disclosure and WS turn pricing.
Required PR CI remains authoritative. Release and production status is recorded
only by the operator workspace's production pointer.
669 changes: 615 additions & 54 deletions .downstream/upstream-risk.json

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions .github/scripts/test_reasoning_recovery.sh

This file was deleted.

6 changes: 0 additions & 6 deletions .github/workflows/backend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ jobs:
- name: Verify Go version
run: |
go version | grep -q 'go1.27.2'
- name: Verify Go modules
working-directory: backend
run: go mod verify
- name: Go vet
working-directory: backend
run: go vet ./...
- name: Unit tests
working-directory: backend
run: make test-unit
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/downstream-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ jobs:
python3 .github/scripts/test_release_preflight.py
- name: Agent protocol contracts
run: bash .github/scripts/test_agent_protocol.sh
- name: Reasoning recovery contracts
run: bash .github/scripts/test_reasoning_recovery.sh
- name: Model context capacity contracts
run: bash .github/scripts/test_model_context_capacity.sh
- name: Service tests
Expand Down Expand Up @@ -142,7 +140,6 @@ jobs:
src/components/account/__tests__/CreateAccountModal.spec.ts \
src/components/payment/__tests__/StripePaymentInline.contrast.spec.ts \
src/views/user/__tests__/StripePaymentView.spec.ts \
src/views/admin/__tests__/ReasoningRecoveryView.spec.ts \
src/views/admin/ops/components/__tests__/OpsErrorDetailModal.spec.ts \
src/api/admin/__tests__/codexGatewayBorrow.spec.ts \
src/components/admin/codex/__tests__/BorrowPelicanPreview.spec.ts \
Expand Down
29 changes: 25 additions & 4 deletions DOWNSTREAM.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This fork maintains the `codexrip` patch set over official Sub2API releases.
## Source baseline

- Integrated official baseline: the release recorded in `.downstream/upstream-base`.
- Retained compatibility decisions: [upstream review](.downstream/upstream-review-v0.2.14.md).
- Retained compatibility decisions: [upstream review](.downstream/upstream-review-v0.2.15.md).
- The operator workspace `docs/sub2api.md` owns the production version and image digest. A source merge or Release does not establish deployment completion.

## Settings and account operations
Expand Down Expand Up @@ -159,15 +159,36 @@ identity and verified-replay checks remain in force.
and manual routing stay within their existing configuration.
- Container/public health confirms availability, not actual model functionality.

## OpenAI encrypted-content recovery

HTTP and WebSocket encrypted-content recovery follows official v0.2.15,
including the official session lineage memory. The former downstream targeted
stripping, persistent rejection memory, SSE repair, missing-item-id repair and
special account failovers are retired. The global recovery page and its
`GET/PUT /api/v1/admin/reasoning-recovery` interface are removed. Stored settings,
historical SQL and diagnostic records remain intact; ordinary Claude thinking
signature recovery is independent and remains available.

Cline and Command Code share the existing system-prompt insertion points.
Connection-test reasoning options require declared model support and a wire
path that retains the chosen effort; unsupported and `ultra` options remain
unavailable. The compact account filters retain multi-selection, tags, proxy,
plan and count controls; hiding additional filters never resets their values.

Official migration 242 removes platform CHECK constraints. Immutable downstream
251, 260 and 265 restore the quota constraint during a fresh installation, so
277 repeats the final removal after them. No historical checksum or existing
quota/route row is changed by 242 or 277.

## Upstream updates

Scheduled discovery may identify newer official releases. It cannot deploy
production. Each integration records its selected official commit, conflicts and
retained downstream contracts before a new immutable release is published.

`.downstream/upstream-risk.json` records the v0.2.13-to-v0.2.14 integration against
downstream commit `7132011d7a4275e7d6407c92db4ec205a1c14ad1`. The risk gate
recomputes those exact inputs. `initial_conflict_files` lists the three dependency
`.downstream/upstream-risk.json` records the v0.2.14-to-v0.2.15 integration against
downstream commit `d469422e94b0655b22dd9d0a826decda61ffb91e`. The risk gate
recomputes those exact inputs. `initial_conflict_files` lists the 40
conflicts resolved during this merge; `merge_conflicts: []` records that none
remain. A `review_required` candidate needs a real completed review and the
`upstream-reviewed` label before promotion.
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ FRONTEND_CRITICAL_VITEST := \
src/components/account/__tests__/OpenAIReferralCell.spec.ts \
src/components/account/__tests__/OpenAIReferralCell.transport.spec.ts \
src/components/account/__tests__/OpenAIQuotaResetCell.spark_shadow.spec.ts \
src/constants/__tests__/platforms.spec.ts \
src/components/account/__tests__/credentialsBuilder.platformCatalog.spec.ts \
src/components/account/__tests__/CreateAccountModal.spec.ts \
src/components/account/__tests__/EditAccountModal.spec.ts \
src/components/account/__tests__/credentialsBuilder.spec.ts \
src/components/account/__tests__/OpenCodeGoProtocolRulesEditor.spec.ts \
src/components/keys/__tests__/BulkEditKeysModal.spec.ts \
src/components/admin/user/__tests__/UserPlatformQuotaModal.spec.ts \
src/views/user/__tests__/KeysView.spec.ts \
Expand All @@ -18,14 +24,16 @@ FRONTEND_CRITICAL_VITEST := \
src/views/user/__tests__/PaymentResultView.spec.ts \
src/views/user/__tests__/ChannelStatusView.mode.spec.ts \
src/components/user/profile/__tests__/ProfileInfoCard.spec.ts \
src/components/user/profile/__tests__/ProfileIdentityBindingsSection.spec.ts \
src/views/admin/__tests__/SettingsView.spec.ts \
src/components/account/__tests__/EditAccountModal.spec.ts \
src/components/account/__tests__/ModelWhitelistSelector.spec.ts \
src/composables/__tests__/useModelWhitelist.spec.ts \
src/components/layout/__tests__/AppSidebar.simple-mode.spec.ts \
src/features/channel-monitor-v2/__tests__/designSystem.structure.spec.ts \
src/features/channel-monitor-v2/__tests__/monitorFormat.spec.ts \
src/features/channel-monitor-v2/__tests__/monitorZoom.spec.ts
src/features/channel-monitor-v2/__tests__/monitorZoom.spec.ts \
src/components/admin/channel/__tests__/PricingEntryCard.modelDefaultPrice.spec.ts

# 一键编译前后端
build: build-backend build-frontend
Expand Down
2 changes: 1 addition & 1 deletion backend/cmd/server/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.14
0.2.15
9 changes: 2 additions & 7 deletions backend/cmd/server/wire_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 15 additions & 1 deletion backend/ent/runtime/runtime.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions backend/ent/schema/composite_model_route.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package schema

import (
"fmt"

"github.com/Wei-Shaw/sub2api/ent/schema/mixins"
"github.com/Wei-Shaw/sub2api/internal/domain"

Expand Down Expand Up @@ -45,6 +47,13 @@ func (CompositeModelRoute) Fields() []ent.Field {
field.String("target_platform").
MaxLen(50).
Default(domain.PlatformOpenAI).
Validate(func(s string) error {
// 目标平台须为平台清单中的具体平台;数据库不再维护 CHECK 约束。
if !domain.IsConcretePlatform(s) {
return fmt.Errorf("target_platform %q is not a concrete platform", s)
}
return nil
}).
Comment("Concrete provider platform."),
field.String("upstream_model").
MaxLen(200).
Expand Down
12 changes: 5 additions & 7 deletions backend/ent/schema/user_platform_quota.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"entgo.io/ent/schema/field"
"entgo.io/ent/schema/index"
"github.com/Wei-Shaw/sub2api/ent/schema/mixins"
"github.com/Wei-Shaw/sub2api/internal/domain"
)

// UserPlatformQuota holds the schema definition for per-user per-platform quota.
Expand Down Expand Up @@ -38,15 +39,12 @@ func (UserPlatformQuota) Fields() []ent.Field {
MaxLen(32).
NotEmpty().
Validate(func(s string) error {
// 注意:平台列表的单一权威源为 service.AllowedQuotaPlatforms;
// 此处为 ent 构建期约束,需与 service.AllowedQuotaPlatforms 保持同步。
switch s {
case "anthropic", "openai", "gemini", "antigravity", "grok",
"kimi", "zhipu", "deepseek", "minimax", "opencode_go", "typesafe":
return nil
default:
// 平台白名单为平台清单(domain/platforms.go)中的全部具体平台,
// 与 service.AllowedQuotaPlatforms 同源;数据库不再维护 CHECK 约束。
if !domain.IsConcretePlatform(s) {
return fmt.Errorf("platform %q is not allowed", s)
}
return nil
}),

// 日 / 周 / 月 USD 上限:
Expand Down
2 changes: 1 addition & 1 deletion backend/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ require (
github.com/coder/websocket v1.8.14
github.com/dgraph-io/ristretto v0.2.0
github.com/gin-gonic/gin v1.9.1
github.com/go-playground/validator/v10 v10.14.0
github.com/go-webauthn/webauthn v0.17.4
github.com/golang-jwt/jwt/v5 v5.3.1
github.com/google/uuid v1.6.0
Expand Down Expand Up @@ -122,7 +123,6 @@ require (
github.com/go-openapi/inflect v0.19.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.14.0 // indirect
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
github.com/go-webauthn/x v0.2.6 // indirect
github.com/goccy/go-json v0.10.2 // indirect
Expand Down
1 change: 1 addition & 0 deletions backend/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,7 @@ golang.org/x/telemetry v0.0.0-20260708182218-49f421fb7959 h1:RJhm5l6Fo4rmEIcndxD
golang.org/x/telemetry v0.0.0-20260708182218-49f421fb7959/go.mod h1:LV7u5Oco+Z/g6XI7PqN+EUUUGGkEcmB1uj2ceI0fOVg=
golang.org/x/telemetry v0.0.0-20260811182544-a038080d80e5 h1:ZUSxONxc981v7AW7QUg+I9WwZzSTTJ019ENBYr5pV/Q=
golang.org/x/telemetry v0.0.0-20260908163034-4bcc4b2ee518 h1:F5BWKvW126NXR74uxkxuc1jQHhm/rwm/J3rSiFyuRs4=
golang.org/x/telemetry v0.0.0-20260908163034-4bcc4b2ee518/go.mod h1:i+ivNqjDnTF3WTElsdk5g9V5DTSBYgdNo7xTU9SDwYA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
Expand Down
10 changes: 8 additions & 2 deletions backend/internal/domain/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,15 @@ const (
PlatformMiniMax = "minimax" // MiniMax (M 系列)
PlatformTypeSafe = "typesafe" // TypeSafe AI System One (Jev)
// PlatformOpenCodeGo 是 OpenCode 平台(账号类型 Zen 按量 / Go 订阅)。
// 值保持 opencode_go 以兼容已落库的分组、配额与 Composite 路由 CHECK。
// 值保持 opencode_go 以兼容已落库的账号、分组、配额与 Composite 路由。
PlatformOpenCodeGo = "opencode_go"
PlatformComposite = "composite"
// PlatformCommandCode 是 Command Code Provider API(多模型聚合,积分计费,
// 订阅套餐另有 5 小时 / 每周滚动窗口)。
PlatformCommandCode = "command_code"
// PlatformCline 是 Cline API(多模型聚合,OpenAI 兼容 Chat Completions;按量积分计费,
// 另有 ClinePass 订阅)。
PlatformCline = "cline"
PlatformComposite = "composite"
)

// Account mode constants 区分国产供应商的「按量付费(余额)」与「Coding Plan」两种接入方式。
Expand Down
Loading
Loading