44 Commits
Author SHA1 Message Date
Chenyme 838aca3c8f chore: bump version to v3.1.8 and implement auto-delete feature for unlinked Console accounts 2026-10-21 19:22:41 +08:00
inter b789e8466d feat(settings): support auto-disable degraded accounts in management UI and filter bound accounts by ID 2026-10-04 22:22:31 +08:00
Chenyme eadfece376 fix: cap free-tier video duration before upstream 2026-09-01 11:16:49 +08:00
buddhism5080 f0044b76b6 fix: cap Grok Web free-account video duration before upstream
Free Web accounts 429 when duration exceeds 6s, which then rotates
accounts without changing the payload. Add a Grok Web setting
(freeVideoDurationCap, default 6) and clamp duration for free-tier
accounts at the Web adapter so retries are not wasted.
2026-08-31 16:04:05 +08:00
Chenyme 1316ed730b feat: add privacy-safe request diagnostics and bounded retention 2026-08-20 19:45:35 +08:00
Jeik 86010fc55c feat(audit): add response body recording, stream reassembly, and audit log retention settings 2026-08-20 10:36:07 +08:00
lindahao 6ac4f0b858 feat: add standalone video max attempts for create-phase failover
Video generation often runs long, and frequent 429s during create make a dedicated retry/switch budget more valuable than waiting on a single limited account. Add routing.videoMaxAttempts as a number-or-unlimited setting used only for video create-phase account failover, keep poll pinned after create succeeds, surface real upstream statuses such as 429 in video audits, and mark provider create/poll stages so retries stay safe.
2026-08-13 21:47:40 +08:00
Chenyme 61010b4bc2 feat: add reliable on-demand Cloudflare Clearance refresh 2026-08-13 21:21:50 +08:00
Chenyme 9c1e694a4c Merge remote-tracking branch 'origin/main' into pr/877
# Conflicts:
#	frontend/src/shared/i18n/index.ts
2026-08-07 17:36:54 +08:00
Chenyme e95a5bc523 feat: add multi-Provider streaming idle timeout protection 2026-08-07 11:29:21 +08:00
buddhism5080 f99abbe91f feat(accounts): optional exclude bot-risk Build accounts from scheduling
Add an Account maintenance toggle that removes Build accounts with
bot_flag_source/bfs in {1,2} from ProviderBuild candidate selection only.
Linked Web/Console scheduling is unchanged; accounts stay in the pool.
2026-08-06 23:01:15 +08:00
WuxiVIP ea18bb8622 feat: add configurable Grok Build stream idle timeout
Add a streamIdleTimeout setting (default 2m, range 30s–10m) to the Grok
Build runtime settings. When a streaming response goes silent for the
configured duration, the request context is cancelled and the read aborts
with a new upstream_stream_idle_timeout error code — instead of hanging
for ~10 minutes until the caller's context deadline fires.

The idle deadline is enforced via an idleTimeoutReadCloser body wrapper
injected at the egress transport layer, covering both the managed-client
and direct-fallback paths. Each successful Read resets the timer, so a
slow-but-steady stream is never interrupted. The wrapper uses
context.WithCancelCause so the Go transport unblocks the in-flight body
read on timeout.

Idle-timeout aborts do not degrade account health (the new error code is
excluded from isUpstreamStreamFailure) and are exempt from egress-node
cooldown, matching the existing treatment of response-header timeouts.

Mirrors the full responseHeaderTimeout pipeline: domain constants, config
struct/validation/default, settings service conversions, HTTP DTO, DB
backfill migration, egress manager atomic field + hot-reload + cache-key
fold, CLI adapter Config field, app assembly wiring, and frontend
types/model/UI/i18n.
2026-08-06 21:31:46 +08:00
Chenyme 810b3b4fbb feat: isolate upstream connection pools by account 2026-08-04 18:31:28 +08:00
buddhism5080 42b7556a5f feat(egress): isolate upstream TCP pools by account
Add a hot-reloadable routing switch so different accounts no longer share
the same upstream HTTP/TCP client pool, while the same account keeps
connection reuse. This helps upstream egress load balancers spread
traffic by connection across Build/Web/Console outbound calls.
2026-08-04 16:37:38 +08:00
Chenyme b4c7baabb7 feat: enhance Build account detection with improved error classification and handling 2026-08-03 17:42:42 +08:00
night2049 bcc6435f61 feat: improve Build account detection and routing failover 2026-07-30 01:21:27 +08:00
Chenyme 15146556cf feat: implement unlimited routing attempts feature 2026-07-26 21:50:29 +08:00
Chenyme 09388e5634 feat: add configurable Grok Build 403 invalidation rules 2026-07-23 14:54:12 +08:00
Chenyme cc578d551c fix: make response header timeout hot-reloadable and migration-safe 2026-07-23 02:36:45 +08:00
Chenyme 858509b7cb perf: finalize large-pool segmented selection and remove shadow mode 2026-07-23 00:21:03 +08:00
Chenyme 8695bb629f perf: batch acknowledged writes and atomic billing settlement 2026-07-23 00:20:03 +08:00
Chenyme 9c583fd167 perf: finalize concurrency safety and infrastructure validation 2026-07-23 00:19:22 +08:00
Chenyme 5d3023ef0b feat: implement optional auto-clean for reauthRequired accounts 2026-07-20 21:57:49 +08:00
Chenyme 4c0e5939c2 refactor: update account auto-clean logic and improve related tests 2026-07-20 20:03:47 +08:00
LLwill 46483ab241 feat: add managed FlareSolverr clearance 2026-07-20 17:34:51 +08:00
Codex f9b3eef933 fix: seal reauth auto-clean audit findings
Drain stale autoCleanWake so the first run waits one interval.
Recheck active media jobs after FOR UPDATE to close the TOCTOU window.
Add settings defaults/roundtrip tests, multi-batch cursor proof,
null-anchor/queued-media skip tests, and second-mark anchor stability.
2026-07-20 05:01:02 +08:00
Codex acb822e452 fix: harden reauth auto-clean delete path and anchors
Use reauth_marked_at as minAge clock, skip media-blocked accounts without
failing the batch, rename include-disabled setting, and cover aging/media/multi-batch.
2026-07-20 03:00:21 +08:00
Codex 65c85f2463 feat: add opt-in auto-clean for reauthRequired accounts
Add a default-off runtime setting that periodically deletes accounts already
marked reauthRequired after a minimum age. Preserve cooldown-only accounts and
permanent-refresh drain semantics; wire settings end-to-end including admin UI.
2026-07-20 01:26:28 +08:00
yang d55eb6eab7 feat: add server-side reasoning replay cache for multi-turn Grok Build
对齐 CLIProxyAPI 的 xAI Reasoning Replay:在客户端不回传 thinking
signature / encrypted_content 时,由网关代持并注入上一轮可回放 items。

变更摘要:
- 新增 ReasoningReplayRepository 与 Memory/Redis 实现
- 新增 pkg/reasoningreplay:normalize/filter/insert/store/apply/capture
- CLI Adapter:出站前 Apply,成功响应 CaptureBody 写回;compact 清理
- 配置 routing.reasoningReplayEnabled/TTL/maxEntries(默认开启)
- settings 热更新时保留回放配置;补充改造文档与场景单测

不包含:通用 HTTP 响应缓存、Console/Web 路径、管理端 UI 开关。
2026-07-17 18:07:04 +08:00
Chenyme 34053471d7 feat: optimize sticky session mechanism to improve cache hit rate 2026-07-17 17:34:32 +08:00
real f9e9b4521f feat: normalize Build video routing and prefer Free accounts 2026-07-17 11:01:09 +08:00
real 2423d4ba57 merge: sync upstream v3.0.2 with XAI fallback 2026-07-17 02:55:21 +08:00
real f811ffa6dc feat: add account-aware XAI fallback and video uploads 2026-07-17 02:20:19 +08:00
Chenyme 09d6f725e9 fix: backfill missing Console runtime settings 2026-07-16 10:44:11 +08:00
Chenyme e89c0de29d fix: backfill missing runtime concurrency setting 2026-07-15 19:44:14 +08:00
Chenyme d2eecc4041 feat: Improved gateway multi-Provider routing and runtime concurrency management. 2026-07-15 10:58:25 +08:00
Chenyme fedbfbbf11 Merge remote-tracking branch 'origin/main' into pr/623
# Conflicts:
#	backend/internal/application/gateway/service.go
#	backend/internal/application/media/service.go
#	frontend/src/shared/i18n/index.ts
2026-07-14 23:53:40 +08:00
hamburg 9b661ead11 feat(settings): make public API base URL configurable with request preference
Expose frontend.publicApiBaseURL and frontend.preferRequestBaseURL through
the admin settings API and UI so operators can control image/public URL
generation without editing YAML or restarting the process.

Resolution priority is now switch-aware:
1. request-derived base when preferRequestBaseURL is enabled
2. configured publicApiBaseURL when set
3. request-derived base as fallback
4. http://127.0.0.1:8000 as last resort

Also hot-update /api/admin/v1/system so docs examples reflect the live
configured base URL after settings changes.
2026-07-14 18:58:30 +08:00
氕氙 10b0a47d20 merge: sync upstream main
# Conflicts:
#	frontend/src/entities/model/model-api.ts
#	frontend/src/features/accounts/accounts-api.ts
#	frontend/src/features/accounts/accounts-page.tsx
2026-07-13 23:47:54 +08:00
Chenyme 9244306352 fix: separate Grok Build and Web proxy transports 2026-07-13 23:21:07 +08:00
氕氙 5cee3d2f9a feat: add Grok Console provider 2026-07-13 22:53:37 +08:00
Chenyme d626a26db4 feat: Implement model quota management and enhance routing candidate selection 2026-07-13 22:02:55 +08:00
Chenyme f9e2f91c46 feat: Update Grok Build to version 0.2.99 with enhanced request normalization and improved compatibility for OpenAI function calling. Introduced multi-file credential import functionality and refined user agent handling for egress nodes. 2026-07-13 18:35:20 +08:00
Chenyme a16837c9ea feat: Refactor the project using Go to support Grok Build & Grok Web. 2026-07-13 15:28:07 +08:00