Commit Graph
8336 Commits
Author SHA1 Message Date
r266-tech 3e8c2ee3f7 fix(pricing): add Claude Fable and Mythos 5.2 fallback rates 2026-11-10 13:58:08 +08:00
xy3 eb2da34484 feat(gateway): support Claude Fable and Mythos 5.2 2026-11-10 12:01:31 +08:00
lishuangqiang 4ac713c4d4 fix(scheduling): release acquired slot when account hydration fails
newSelectionResult is the only exit for acquired Anthropic/Gemini
selections. When hydrateSelectedAccount failed, the already acquired
Redis concurrency slot was dropped with the error because callers only
receive ReleaseFunc through a successful result.

Release it on the error path, matching the OpenAI path that already does
this via newAcquiredSelectionResult. Without the fix the slot stays
occupied until its TTL expires, so the account can look idle while
requests queue or fail.
2026-11-10 10:55:01 +08:00
wucm667 661770bf34 fix(usage): reconcile Anthropic and OpenAI cache TTL accounting 2026-11-10 10:01:06 +08:00
wucm667 f6ea845c58 fix(openai): preserve configured GLM downgrade semantics 2026-11-10 10:00:55 +08:00
Hato b2a695d617 fix(openai): normalize Codex Desktop page context 2026-11-09 18:41:16 +09:00
Long Li e2ce0b43dc fix(TASK-144): keep Antigravity tool functionResponses contiguous before media 2026-11-09 17:29:00 +09:00
Wesley Liddick ee58c0013c Merge pull request #8606 from r266-tech/codex/preserve-openai-cache-write-ttl
fix(openai): preserve cache-write TTLs in usage and billing
2026-11-09 11:07:27 +08:00
Wesley Liddick 8ca1a613e9 Merge pull request #8590 from william-drakemond/pr/antigravity-usage-query
feat(antigravity): 用量格子加查询按钮,强制查询跳过缓存 / Query button for antigravity usage; force skips the cache
2026-11-09 11:07:16 +08:00
Wesley Liddick 27ef2a7137 Merge pull request #8603 from lkon2112/fix/openai-orphan-allocation-test
test(openai): isolate orphan precheck allocation test
2026-11-09 11:07:01 +08:00
Wesley Liddick 8e649dd654 Merge pull request #8607 from r266-tech/codex/document-image-format-mismatches
docs(images): explain upstream output format mismatches
2026-11-09 10:47:52 +08:00
Wesley Liddick d7c0505387 Merge pull request #8610 from Wei-Shaw/fix/adaptive-request-body-budget
fix(gateway): auto-size request body memory budget from the memory limit
2026-11-09 10:44:06 +08:00
shaw 03bd718abe fix(sysutil): confine cgroup limit reads to the mount with os.Root
gosec G703 flagged the cgroup path taken from /proc/self/cgroup flowing
into os.ReadFile. Read the limit files through os.Root instead, so the
path can never resolve outside the cgroup mount (including via symlinks),
and cover the escape cases in tests.
2026-11-09 10:27:08 +08:00
shaw c004c962a7 fix(gateway): auto-size request body memory budget from the memory limit
The 1 GiB default introduced in v0.2.20 is shared by every group on an
instance and stays charged for the whole streaming response, so large
hosts under high concurrency returned 503 "Request body buffering capacity
is exhausted" long before memory was actually short.

When gateway.request_body_memory_budget_bytes is set in neither the config
file nor a non-empty env var, size it to 1/4 of the process memory limit
(min of physical RAM, cgroup v1/v2 limit along the cgroup path, and
GOMEMLIMIT), never below the previous 1 GiB. Explicit values, including 0,
are used as-is. The example config no longer pins 1 GiB.
2026-11-09 10:13:11 +08:00
r266-tech 9935268573 docs(images): align model scope across translations 2026-11-08 23:47:19 +08:00
r266-tech 5184ff55f6 docs(images): explain upstream output format mismatches 2026-11-08 23:31:10 +08:00
r266-tech 7156213cce fix(openai): retain Fast multiplier with free input prices 2026-11-08 22:12:23 +08:00
r266-tech fe093d76bd fix(openai): preserve cache-write TTLs in usage and billing 2026-11-08 22:00:15 +08:00
lkon 2273a5d63f test(openai): isolate orphan precheck allocation test 2026-11-08 19:33:33 +08:00
lkon 8a1315e8cc test(billing): reuse rate resolver and isolate heap checks 2026-11-08 16:43:43 +08:00
William DrakeandClaude Opus 5.5 4ac1675b56 feat(antigravity): query button that refreshes usage past the cache
Antigravity accounts had no manual query button in the usage cell, unlike Claude
and OpenAI, and the server ignored force=true for them: getAntigravityUsage
always answered from its in-memory cache while fresh. After an upgrade or an
upstream reset the cell kept old figures (an account upgraded to Ultra still
showed its Claude week at 100%).

- getAntigravityUsage takes force; cachedAntigravityUsage skips the cache when
  forced. singleflight still merges concurrent fetches.
- The antigravity cell shows the same 查询/Query button (active, force=true) in
  every state, including errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 14:33:29 -07:00
r266-tech 85f43b640a fix(openai): stabilize Responses session seeds across tool loops 2026-11-08 04:52:04 +08:00
r266-tech f2b0a32b1f fix(apicompat): preserve sealed function call metadata 2026-11-08 02:48:04 +08:00
feeeei 36484727c7 fix(gemini): 兼容入口非流式响应不再把思考摘要混入正文
部分上游在未请求 includeThoughts 时仍返回 thought=true 的 part,非流式转换把它当正文输出,导致 chat/messages 的 content 混入思考文字。转换时跳过思考 part 的文字,与流式路径的分流口径一致;用量仍取自 usageMetadata,计费不变。
2026-11-08 02:01:08 +08:00
Ming-Sir-69 4a22a75b3d fix(accounts): retain rows and quota values while refreshing 2026-11-07 23:32:29 +08:00
r266-tech a1395eeaf2 fix(openai): preserve other platforms' capacity handling 2026-11-07 21:35:48 +08:00
r266-tech 88b7090a35 fix(openai): match cooldown rules against actual error fields 2026-11-07 21:28:51 +08:00
r266-tech ebf0168085 fix(openai): honor explicit model cooldown rules for overloads 2026-11-07 21:07:52 +08:00
WGeorgezzzz 189b336f47 fix(openai): enforce stream idle deadlines and pre-output failover 2026-11-07 19:45:33 +08:00
WGeorgezzzz e401c58053 fix(openai): keep Codex metadata events retry-safe 2026-11-07 19:36:05 +08:00
WGeorgezzzz 63f1172292 fix(openai): reject invalid UTF-8 Responses bodies 2026-11-07 19:23:53 +08:00
r266-tech 7796a2d57a fix(antigravity): isolate Pro Argon quota cooldowns 2026-11-07 14:35:15 +08:00
github-actions[bot] 6b4b37db43 chore: sync VERSION to 0.2.20 [skip ci] 2026-11-07 06:31:41 +00:00
Wesley Liddick dab829a4e9 Merge pull request #8365 from lyy0709/codex/gpt61-terra-followup
fix(openai): complete GPT-6.1 Terra Codex metadata, validation and billing
v0.2.20
2026-11-07 14:06:18 +08:00
r266-tech 137316a14c fix(payment): configure EasyPay refund success codes per instance 2026-11-07 11:29:13 +08:00
Wesley Liddick d22e0724d6 Merge pull request #8380 from danvilig/codex/improve-codex-native-tools-export
fix(frontend): improve Codex image and live-search exports
2026-11-07 11:27:14 +08:00
qsy4 fab3ec2516 fix(openai-ws): follow the TTFT mode for WebSocket first token
Problem: SSE streams decide first-token time with the admin
openai_ttft_mode setting (semantic: first non-lifecycle event; visible:
first visible output), but WebSocket passthrough turns always wait for
the first ".delta" event and ignore the setting. On reasoning models the
reasoning item is announced when reasoning starts while the first delta
only arrives after it ends, so in semantic mode a WS turn reports the
reasoning time as first-token latency and an HTTP request does not. The
same user's WS turns look seconds slower than their HTTP requests, and
the gap grows with reasoning tokens while the HTTP numbers stay flat.

Fix: let RelayOptions take the first-token rule and have the passthrough
adapter pass the configured TTFT mode through the same check the SSE
path uses (openAIStreamDataStartsTTFT). codex.* frames are WebSocket-only
out-of-band events and never count; terminal events still never count,
as before. Without a rule the relay keeps the delta-based behaviour.

Test: TestOpenAIWSPassthroughFirstTokenFollowsTTFTMode replays two
reasoning turns on one passthrough connection in both modes and expects
each turn's first token at the event the SSE rule picks.
TestRelay_IsFirstTokenEventDecidesEveryTurnFirstToken checks the relay
applies the injected rule per turn and still skips terminal events.
2026-11-06 19:10:49 -08:00
Wesley Liddick 2c93aea9f7 Merge pull request #8420 from wozhenbang2004/fix/cloudflare-rest-messages-beta
fix(anthropic): omit beta query for Cloudflare REST messages
2026-11-07 11:03:42 +08:00
Wesley Liddick 2fcd47aa13 Merge pull request #8409 from unique01082/fix/antigravity-response-json-schema
fix(antigravity): Gemini 原生请求的 responseJsonSchema 改写为 responseSchema
2026-11-07 11:01:19 +08:00
Wesley Liddick c0a3ce60b6 Merge pull request #8471 from qsy4/fix/auth-client-gone-malformed-key
fix(auth): stop reporting client disconnects and malformed keys as 500
2026-11-07 10:58:24 +08:00
Wesley Liddick a2f7c12cdd Merge pull request #8464 from kiuber/fix/ws-http-bridge-codex-fingerprint
fix(openai): apply Codex fingerprint convergence in the WebSocket HTTP bridge so multi-turn requests hit the prompt cache
2026-11-07 10:58:12 +08:00
Wesley Liddick ec5ee14ca5 Merge pull request #8520 from qsy4/fix/openai-ws-per-turn-first-token
fix(openai-ws): record first token time for every passthrough turn
2026-11-07 10:57:49 +08:00
Wesley Liddick e479d5d249 Merge pull request #8445 from folltoshe/fix/openai-responses-probe-forced-mode
fix(openai): skip responses probe when routing mode is forced
2026-11-07 10:57:36 +08:00
Wesley Liddick 38029f3d21 Merge pull request #8432 from 111pointer111/fix/gpt-image-account-test-response-format
fix(openai): omit response_format from GPT Image account tests
2026-11-07 10:57:22 +08:00
Wesley Liddick 52c83021e3 Merge pull request #8441 from mordekasiser/codex/fix-antigravity-direct-response
fix(antigravity): preserve direct Gemini streaming responses
2026-11-07 10:56:42 +08:00
Wesley Liddick 66ea4d311f Merge pull request #8553 from Yajun312890225/codex/fix-claude-setup-token-weekly-usage
fix(anthropic): preserve setup-token weekly usage without 5h limits
2026-11-07 10:55:20 +08:00
Wesley Liddick 3c46c12833 Merge pull request #8522 from william-drakemond/pr/antigravity-quota-summary
feat(antigravity): 按配额分组显示真实的 5 小时与每周窗口 / Show each quota group's real 5-hour and weekly window
2026-11-07 10:55:02 +08:00
Wesley Liddick 72c2acdcb9 Merge pull request #8457 from cyhhao/fix/request-body-read-timeout
fix(gateway): report request body read timeouts as 408 and log read failures
2026-11-07 10:54:39 +08:00
Wesley Liddick 0ff31d7a99 Merge pull request #8557 from hansnow/codex/gpt-image-26
fix(openai): 打通 GPT Image 2.6 原生图片链路
2026-11-07 10:54:20 +08:00
Wesley Liddick 9aaa72cabd Merge pull request #8430 from lkon2112/fix/gemini-tool-response-media
fix(gemini): preserve tool media in native function responses
2026-11-07 10:53:56 +08:00