Commit Graph
496 Commits
Author SHA1 Message Date
Chenyme 470b7c38ad fix: retry empty streams and emit protocol-safe terminal events 2026-08-19 10:59:54 +08:00
lij768423-svg 633cf9b73e fix: fill required Responses ids for Grok CLI serde
Idle abort still failed with missing field id because CLI requires
id on the event and on item/error objects, not only response.id.
Rewrite streamed Responses events to supply missing response/item
ids and emit a complete incomplete trailer.
2026-08-19 02:35:33 +08:00
lij768423-svg 48308eb402 fix: give abort trailers the response id Grok CLI requires
The empty-hold idle trailer emitted response.incomplete without id,
created_at, or sequence_number. Grok CLI serde then failed with
missing field id. Reuse the streamed response id when present and
always write a complete response object.
2026-08-19 02:11:57 +08:00
lij768423-svg 4940556056 fix: do not fail-open empty held streams as HTTP 200
Empty hold timeouts and upstream idle were delivered as 200 without a
terminal SSE event, so Sub2API wrapped them as 500. Keep waiting on a
0-token hold expire, treat idle as a retryable 504 instead of client
499, cool the hanging account, and write an SSE error + DONE when the
flush path is already committed.
2026-08-19 02:01:38 +08:00
Chenyme 233aea53ed feat: enhance egress proxy profiles management with improved UI and functionality 2026-08-18 23:40:41 +08:00
Chenyme 5bbbf537b8 feat: add scalable shared proxy configurations 2026-08-18 23:11:54 +08:00
Chenyme dc307b3dcf feat: improve proxy visibility and cross-provider setup 2026-08-18 20:58:23 +08:00
Chenyme e6428933e3 fix: harden Build OAuth credential refresh recovery 2026-08-18 20:11:54 +08:00
Chenyme 526d43ce71 Merge branch 'main' into feat/accounts-refresh-token-import 2026-08-18 18:38:41 +08:00
Chenyme 6f113442c7 fix: persist rotated Build refresh tokens safely during import 2026-08-18 18:37:26 +08:00
Chenyme a608c209a1 fix: avoid duplicate view_image tool definitions 2026-08-18 18:22:15 +08:00
Chenyme 43afb615ad fix: deduplicate streamed reasoning sources 2026-08-18 18:02:45 +08:00
Chenyme 43b17d866c Merge branch 'main' into pr/959
# Conflicts:
#	backend/internal/infra/config/config.go
2026-08-18 17:31:09 +08:00
Chenyme 6b8a969865 feat: enhance quality retry mechanism with new read pump and timeout handling 2026-08-18 17:28:08 +08:00
Chenyme 6e3e4c2ab3 Merge branch 'main' into feat/auto-assign-migration-bounds 2026-08-18 16:36:22 +08:00
Chenyme 3c70dc7064 fix: enforce safe auto-assign share bounds 2026-08-18 16:35:58 +08:00
Chenyme ef3415dc95 Merge branch 'main' into fix/compaction-session-drift 2026-08-18 16:19:42 +08:00
Chenyme 7e7b89f0c5 feat: enhance reasoning effort handling and normalization across components 2026-08-18 15:50:05 +08:00
lij768423-svg 506b4e46f9 feat: withhold missing-thinking streams and retry another account
Hold thinking-model SSE until reasoning appears or enough visible
output arrives with none. Do not deliver that first body; switch
accounts up to five more times. After six misses, fail closed with
503 instead of sending a no-thinking reply. Default off.
2026-08-18 09:26:35 +08:00
lij768423-svg ae05b4f749 feat: bound auto-assign share and per-cycle migrations
Add optional routing.autoAssignMaxNodeShare and
autoAssignMaxMigrationShare. Default 0 keeps the historical unbounded
first-pass evacuation and the existing 200-move repair ceiling. Values
in [0.05, 1] cap how many active accounts one healthy node may absorb
and how many already-bound accounts may move in one cycle.
2026-08-17 22:20:01 +08:00
lij768423-svg ae6447e5a1 fix: keep compaction summary when session key drifts
A still-decryptable g2a_compact_v1 blob from this gateway instance is
expanded even if PromptCacheKey no longer matches. Foreign and
undecodable blobs stay omitted. Surface compaction_session_drifted in
compatibility warnings so clients can see the key changed.
2026-08-17 22:20:01 +08:00
zhizhuo b91bdbdbcc feat(audit): record reasoning effort 2026-08-17 16:30:58 +08:00
zhizhuo b4599d96c0 feat(accounts): support refresh-token imports 2026-08-17 16:28:43 +08:00
Chenyme 98a3653494 Merge branch 'main' into fix/first-token-encrypted-reasoning 2026-08-17 15:34:29 +08:00
Chenyme 7f8aa95b8e fix: keep thinking time in Token/s without hiding real bursts 2026-08-17 15:29:00 +08:00
Chenyme 164130da9b Merge branch 'main' into fix/stream-interrupt-soft-cooldown 2026-08-17 14:15:39 +08:00
Chenyme 1806348772 fix: update failure handling logic for cooldowns 2026-08-17 14:15:17 +08:00
Chenyme 08573aca10 refactor: simplify image edit test flow by removing media post stage and adjusting assertions 2026-08-17 14:06:13 +08:00
Chenyme 8851ae83dc Merge branch 'main' into pr-b-protocol 2026-08-17 13:58:03 +08:00
Chenyme 51e2f4d3ea fix: align image edits with current mediaGenInput protocol 2026-08-17 13:50:36 +08:00
kaecho e4049e3449 Merge branch 'main' into fix/first-token-encrypted-reasoning 2026-08-17 13:10:40 +08:00
mirrox-dev 9c74f91465 fix: keep thinking time in quality-guard Token/s
Buffered or encrypted thinking on Build Chat never started the first-token
clock, so billed reasoning tokens were divided into a short flush window
and the panel reported thousands of Token/s. Start Chat first-token at the
reasoning item and fall back to full duration when that tail is shorter
than the wait and under 1s.
2026-08-17 12:10:53 +08:00
Chenyme 05528aca3a feat: align Imagine models, generation parameters, and quota resets 2026-08-17 11:49:59 +08:00
Chenyme d99df20fa9 fix: enable Basic 720p video and align media quota handling 2026-08-17 11:08:19 +08:00
Chenyme e5b6fd0181 Merge branch 'main' into pr-a-tier 2026-08-17 10:30:42 +08:00
Chenyme cc4966a9d7 fix: enable Basic image edits with tier-aware routing and quota fencing 2026-08-17 10:29:44 +08:00
mirrox-dev 03db0b59f4 fix: count encrypted reasoning start in first-token TPS
Native /v1/responses streams can begin with an identified reasoning
item and no text delta. First-token detection previously waited for
output_text, so thinking time left the TPS denominator while
reasoning tokens stayed in the numerator. Chat aliases that put
thinking in thinking_content are counted the same way.
2026-08-17 02:18:31 +08:00
lanting200 58f142d027 fix(gateway): treat mid-stream cuts as soft cooldown
A 2xx stream interrupt is transport jitter, not an upstream 502. Passing
status 0 uses the 5s soft isolation and avoids exponential cooldown
emptying a small account pool.
2026-08-16 19:07:03 +08:00
Chenyme 28bd057053 Merge branch 'main' into fix/audit-media-keep-tokens 2026-08-16 14:21:57 +08:00
Chenyme 56bf00b5ae fix: preserve media token usage and track reported usage accurately 2026-08-16 14:21:47 +08:00
Chenyme ba975f8c40 fix: safely refresh clearance after media challenge 403 2026-08-16 13:35:18 +08:00
Chenyme fe383894ae Merge branch 'main' into fix/web-media-clearance-retry 2026-08-16 13:33:36 +08:00
Chenyme e0a82d5022 fix: preserve visible reasoning summaries for Chat requests 2026-08-16 13:01:25 +08:00
Chenyme ae9787d82e Merge branch 'main' into pr/video-admission-limits 2026-08-16 11:40:47 +08:00
Chenyme 6304c2aecb fix: enforce Console reference limits before scheduling 2026-08-16 11:40:23 +08:00
兔兔 tu 72f3fea894 fix(web): align image edit payload with current web protocol (mediaGenInput)
grok.com/imagine 网页端(2026-08 实测, Quality v2.0 模式)编辑请求已迁移到新结构:

`mediaGenInput.imageToImage.inputAssets`(fileMetadataId)+ `kind: CONVERSATION_KIND_IMAGINE`,不再使用 `config.imageReferences` + `parentPostId`(无需 createMediaPost),无 `temporary`/旧字段,imageGenerationCount 默认 1。

网关仍使用旧结构(temporary:true + imageReferences + parentPostId + imageGenerationCount:2),与上游当前协议不一致。

本次改动:
- EditImage 使用 upload-file-v2/direct 返回的 fileMetadataId 作为 inputAssets,跳过 createMediaPost
- buildImageEditPayload 对齐网页端结构(mediaGenInput.imageToImage + kind)
- 移除旧字段与双图生成(imageGenerationCount:2 → 默认 1)

### 验证
本地构建后编辑成功(200, ~10s),与网页端行为一致。
2026-08-15 16:59:07 +08:00
兔兔 tu beb3f8f500 fix(web): allow Basic accounts to use grok-imagine-image-edit
grok.com/imagine 网页端实测: Basic 账号可以正常进行图片编辑(消耗 image_pro 额度),但网关将编辑路由按 Super 门槛过滤,导致 /v1/images/edits 返回 404 模型不存在。

将 grok-imagine-image-edit 的 MinimumTier 放宽到 WebTierBasic,使网关能力与 xAI 网页端一致。
2026-08-15 16:58:37 +08:00
Chenyme 5021ab68e9 Merge branch 'main' into feat/quality-guard-profiles-dual-probe 2026-08-15 12:01:47 +08:00
Chenyme 2428f17d34 fix: harden probe recovery and prevent false thinking isolation 2026-08-15 12:01:26 +08:00
Chenyme e228c2dd6e Merge branch 'main' into fix/web-sso-build-conversion 2026-08-15 11:13:39 +08:00