Commit Graph

1181 Commits

Author SHA1 Message Date
admin 285dc06d57 fix: improve image playground, channel test logging, and rename Playground to Chat Workspace
Docker Build / Build and Push Docker Image (push) Successful in 4m4s
1. Rename Playground to Chat Workspace / 对话工作台 in all 6 languages
   - Updated i18n values in zh/en/fr/ru/ja/vi locale files
   - Route path /playground and Image Playground left unchanged

2. Fix image playground count slider stuck at 1
   - Added +/- stepper buttons alongside the Slider for Count control
   - Added count normalization (Math.round, clamp 1-10)
   - Added Decrease/Increase i18n keys

3. Add delete and clear-failed for failed image results
   - Failed image cards now show a delete (X) button
   - Toolbar adds 'Clear failed' button when failures exist
   - Added handleClearFailed in index.tsx
   - Added 'Clear failed' i18n key

4. Log image generation failures to consume log
   - ImageHelper now records a consume log (quota=0) on request/response
     failures, so users can see failure reasons in usage logs
   - Includes size, quality, count, and error message in log content

5. Improve channel test logging for image models
   - buildTestLogOther now includes test_request_body and
     test_response_body in the Other field for diagnostics
   - buildTestLogContent already records size/quality/count for images

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 02:31:49 +08:00
admin 0ecf51917b feat: add auth_gateway template for CSRF form-based login balance query
Docker Build / Build and Push Docker Image (push) Successful in 3m56s
2026-06-20 05:37:25 +08:00
admin 94cead8d69 fix: improve 404 error message for balance login when upstream API path not proxied
Docker Build / Build and Push Docker Image (push) Successful in 3m56s
2026-06-20 05:24:11 +08:00
admin 7640af2313 fix: show all balance config fields for preset templates, allow overriding URLs
Docker Build / Build and Push Docker Image (push) Successful in 3m53s
2026-06-20 05:03:37 +08:00
admin 2169588052 feat: support API Key auth for balance query when login credentials not configured 2026-06-20 04:59:16 +08:00
admin 791c125226 fix: strip /v1 prefix from base URL when building balance query URLs
Docker Build / Build and Push Docker Image (push) Successful in 3m56s
2026-06-20 04:51:50 +08:00
admin 427ef9f835 feat: add custom balance query config for new-api/sub2api upstream
Docker Build / Build and Push Docker Image (push) Successful in 3m53s
2026-06-20 04:42:24 +08:00
admin c8b3528b15 fix: image model test and playground 400 error
Docker Build / Build and Push Docker Image (push) Successful in 3m57s
2026-06-20 03:51:16 +08:00
admin 9fbbd6eca1 fix: image playground 503 error and model filtering by group
Docker Build / Build and Push Docker Image (push) Successful in 4m0s
2026-06-20 02:12:01 +08:00
admin 2293e1150c feat: add per-resolution pricing mode in model pricing editor and fix image model test endpoint
Docker Build / Build and Push Docker Image (push) Successful in 4m1s
2026-06-19 19:39:37 +08:00
admin aac1570071 merge: upstream QuantumNous/new-api main with conflict resolution 2026-06-19 15:39:22 +08:00
admin 02113c1ce7 feat(image-playground): persist config to database and images to localStorage
Docker Build / Build and Push Docker Image (push) Successful in 3m40s
2026-06-19 05:23:33 +08:00
admin d87b1c16d3 feat: add Image Playground for generating images via user models
Docker Build / Build and Push Docker Image (push) Successful in 3m43s
2026-06-19 05:11:29 +08:00
CaIon 55b00fcf09 feat(advanced-custom): remove fallback option and enhance path matching for advanced custom routes 2026-06-18 20:29:24 +08:00
CaIon 50784c10ee feat(api): change subscription product options and catalog endpoints to use GET method 2026-06-18 17:15:05 +08:00
CaIon f6c260437c feat(subscription): add support for wallet overflow and downgrade group functionality in subscription plans 2026-06-18 16:44:12 +08:00
Seefs 8d87d5fd8b test: clean up reward-hacking backend tests (#5563) 2026-06-17 16:47:52 +08:00
CaIon 3b345cfd27 chore: remove legacy OAuth controllers 2026-06-17 16:13:29 +08:00
admin c1ac2eab66 refactor: remove group/type/endpoint filters, details drawer, and group column from pricing page
Docker Build / Build and Push Docker Image (push) Successful in 4m4s
2026-06-16 02:25:33 +08:00
admin 113b9c8ecb fix: unify light/dark primary color, fix doc management API, remove compliance restriction
Docker Build / Build and Push Docker Image (push) Successful in 4m23s
2026-06-14 21:20:47 +08:00
admin 26ac8b5dc1 refactor: remove mt theme, clean up New API branding from classic frontend
Docker Build / Build and Push Docker Image (push) Successful in 3m54s
2026-06-14 11:06:47 +08:00
admin 9e4ab6e7bb refactor: rename daisy frontend to mt, copy from classic
Docker Build / Build and Push Docker Image (push) Successful in 4m30s
2026-06-13 21:08:17 +08:00
CaIon 1ac0f5807a feat(audit): add authentication method tracking in audit logs 2026-06-13 16:12:22 +08:00
admin e83ec743c8 feat: add DaisyUI frontend theme and document management system
Docker Build / Build and Push Docker Image (push) Failing after 1m35s
2026-06-13 01:36:06 +08:00
Seefs 1292b8b2d5 chore: update Codex channel (#5461) 2026-06-12 23:45:15 +08:00
Calcium-Ion d0c4305a16 feat(audit): add localized security audit logs (#5462) 2026-06-12 23:40:40 +08:00
admin 824c6d9133 feat: add Tencent Cloud Coding Plan support and handle coding plan URLs in OpenAI adaptor
Docker Build / Build and Push Docker Image (push) Failing after 2m43s
2026-06-12 17:40:53 +08:00
admin 76f8112ee7 chore: remove payment compliance check system entirely
Docker Build / Build and Push Docker Image (push) Failing after 2m36s
2026-06-12 11:30:08 +08:00
Don Ganesh 01c2128e23 fix: 收窄 OpenAI o 系列模型适配范围 (#5293)
* fix: 收窄 OpenAI o 系列模型适配范围

* fix(openai): 限制 gpt-5 适配仅作用于 OpenAI 模型

* fix(openai): narrow o-series reasoning model detection

---------

Co-authored-by: Seefs <i@seefs.me>
2026-06-05 12:12:45 +08:00
CaIon 1588027084 feat: add subscription balance redemption toggle (#3071) 2026-05-29 12:54:00 +08:00
Seefs 30025aeba3 fix: use actual user id for channel tests (#5109) 2026-05-26 12:32:20 +08:00
CaIon 6b6c9904ac feat(subscription): support balance purchases
Refs #3071.
2026-05-26 12:03:02 +08:00
Seefs 1288028181 fix: truncate oversized upstream error logs (#5083) 2026-05-25 23:10:30 +08:00
t0ng7u b302be30e3 🛠️ fix: v1 interface feedback regressions
Resolve verified V1 frontend feedback by improving channel workflows, auth behavior, API key interactions, user filtering, layout persistence, subscription quota handling, i18n text, pricing metadata, and stale frontend cache recovery.

- Add a global frontend cache version cleanup to prevent old frontend localStorage from causing page errors after upgrades.
- Fix channel copy refresh, model mapping input focus loss, create-channel fetch-model title state, upstream model update confirmation, and batch test toast behavior.
- Respect password login settings and improve Turnstile, forgot-password, registration, and invite-link flows.
- Make user role/status filtering server-side and preserve table page size in URLs.
- Improve API key edit validation feedback and prefetch real keys for reliable copy actions.
- Fix rankings access fail-open behavior, double scrollbars, subscription received amount conversion/display, token i18n wording, model deletion confirmation grammar, and Claude pricing context inference.
- Add clearer Playground model/group loading errors.

Validation:
- bun run typecheck
- bun run i18n:sync
- gofmt on modified Go files
- go test ./controller ./model -run '^$'
2026-05-25 02:42:22 +08:00
Hill-waffo 0354c38bef [BugFix] fix webhook process (#5047) 2026-05-24 16:19:27 +08:00
Seefs f2c7647ecf fix: enforce Waffo subscription compliance and product ID update (#5038)
* fix: enforce Waffo subscription compliance and product ID updates

* fix: hide Waffo Pancake settings in classic UI
2026-05-22 11:48:32 +08:00
Hill-waffo 19f1821fc8 [Feature Request] Waffo Pancake gateway — full integration with subscription support + admin catalog binding flow (#4935) 2026-05-22 11:00:58 +08:00
yyhhyyyyyy 006e801652 fix: resolve model owned_by from active channels (#4416)
* fix: resolve model owned_by from active channels

* fix: respect token group when resolving model owners
2026-05-21 11:16:17 +08:00
Seefs 20d3e73734 fix: filter perf metrics summary by active groups (#4976) 2026-05-20 11:38:09 +08:00
Yuhan Guo丨Eohan b397c58bab fix(auth): expose register_enabled in /api/status and gate sign-up link (#4871)
/api/status never returned `register_enabled` or `password_register_enabled`,
so the sign-in page had no way to react when an admin disabled registration.
The "Sign up" link was only gated on `self_use_mode_enabled`, which is a
separate and unrelated concept (single-user vs. multi-user deployment).

Result: toggling "Registration Enabled" in admin settings had no visible
effect on the login page — users could still see the sign-up link even when
registration was disabled, and could not see it even when it was enabled
(if the system happened to be in self-use mode from initial setup).

Fix:
- Add `register_enabled` and `password_register_enabled` to GetStatus()
- Gate the "Sign up" link on `register_enabled !== false` in addition to
  the existing `!self_use_mode_enabled` check

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 16:14:34 +08:00
Baiyuan Chiu 8ae095c3b8 fix user create and delete handling (#4818) 2026-05-19 16:14:11 +08:00
Seefs 0936e25046 perf: avoid eager formatting in debug log calls (#4929) 2026-05-19 12:11:24 +08:00
yyhhyyyyyy 2d968c3eab fix: apply group filter to channel list queries (#4885) 2026-05-17 11:44:07 +08:00
DraftGo 132d7b9f94 fix: GetAllChannels ignores group filter parameter (#4847)
When users filter channels by group without entering a search keyword,
the frontend calls GetAllChannels (GET /api/channel/) instead of
SearchChannels. However, GetAllChannels did not process the group
query parameter, causing the filter to have no effect.

Added group filtering logic to GetAllChannels for both normal mode
and tag mode, using the same CONCAT/|| pattern as SearchChannels
for cross-database compatibility (MySQL, PostgreSQL, SQLite).
2026-05-16 14:54:50 +08:00
yyhhyyyyyy 6f8668e4c3 fix: enforce header nav access control for public modules (#4889) 2026-05-16 14:54:47 +08:00
CaIon 0526a22643 feat: require compliance confirmation for paid features
Gate payment, redemption, subscription, and invitation reward flows behind an audited compliance acknowledgement.
2026-05-13 22:18:46 +08:00
CaIon aa56667b8f feat: track upstream request ID and prevent response header override
When proxying through another new-api instance, the upstream
X-Oneapi-Request-Id was overwriting the local one in client responses.
This adds a new `upstream_request_id` field to the logs table, captures
the upstream ID during relay, and filters it from being copied back to
the client. Frontend gains search/filter and detail display support.
2026-05-12 21:53:54 +08:00
Calcium-Ion 469d3747af fix: defaut ui triage (#4802)
* fix: theme-aware payment paths, auto-group validation, route guards, perf group filtering

- Add common.ThemeAwarePath to generate correct redirect URLs based on
  active theme (default vs classic), replacing hardcoded /console/* paths
  in 7 controllers and service/quota.go (#4765)
- Validate auto-group availability against getUserGroups before defaulting
  form values; playground falls back to 'default' group when 'auto' is
  unavailable (#4796, #4799)
- Enforce HeaderNavModules settings in rankings route (frontend + backend
  API) and SidebarModulesAdmin in playground route to block direct URL
  access when features are disabled (#4704, #4512)
- Filter perf_metrics API response to only include currently configured
  groups, hiding stale data from deleted groups (#4790)
- Preserve query params (pay=success/fail) in /console/topup → /wallet
  frontend redirect

* fix: update hero section text and localization strings for clarity
2026-05-12 16:47:02 +08:00
CaIon e8cfb546fa feat(default): add model performance badges
Add a batched performance summary API for model square cards and show compact latency, throughput, and status metrics without increasing card size. Also fix OTP verification form submission.
2026-05-06 22:21:00 +08:00
CaIon 5c793d7992 refactor: move top_up_link from status API to topup info API
Move top_up_link out of the public GetStatus endpoint into the
authenticated GetTopUpInfo endpoint. Update classic frontend to
read topup_link from the topup info response instead of status.
Also add mailto links in SECURITY.md.

close #4582
2026-05-06 20:27:19 +08:00