Commit Graph
8591 Commits
Author SHA1 Message Date
shaw cff176dfd7 fix(openai): keep the local Codex models fallback inside the group allowlist
The fallback list now passes through FilterCodexModelIDsForGroup, the same
listing filter /v1/models uses. A wildcard-only allowlist expands its
patterns against account mappings and the default catalog instead of
falling through to the unfiltered default catalog. Serving the fallback is
logged with the upstream error, since clients only see a 200.
2026-12-03 15:48:24 +08:00
debug-zhang aede013903 fix(openai): fall back to a local Codex models manifest
Root cause: Codex /models requests always fetch the manifest from a
scheduled upstream. Custom API-key upstreams that do not implement
/v1/models return 5xx, an empty catalog, or a non-standard body, so the
gateway exhausts account failover and returns 502 even when the group
can describe its models locally.

Change: generate a local Codex manifest when every candidate fails (or
the account switch budget is exhausted) and when an upstream returns an
empty manifest. Sources follow the group's models_list_config, then the
group accounts' model_mapping keys, then the default OpenAI catalog, with
the same retired-model filter as /v1/models. The local list only replaces
the upstream error when it is non-empty, keeps ETag/304 revalidation, and
leaves successful upstream manifests untouched. Pinned discovery mode
keeps its explicit FallbackToScheduler contract.

Tests: cover 5xx/empty/non-JSON upstream fallback, all-candidates-failed
fallback, source priority, upstream success regression, ETag
revalidation, and preserving the original error when the local list is
empty.
2026-12-02 21:16:00 +08:00
Wesley Liddick 667902572f Merge pull request #9162 from GrantElizabeth/fix/simple-mode-group-isolation
fix(scheduler): 支持 Simple 模式按 API Key 分组隔离账号
2026-12-02 19:59:08 +08:00
shaw 29f6ae68a6 Merge origin/main into PR #9162 2026-12-02 19:05:44 +08:00
shaw 4f41f253f4 chore: release v0.2.27 v0.2.27 2026-12-02 16:28:35 +08:00
shaw ce7940a900 chore: update sponsors 2026-12-02 16:18:57 +08:00
Wesley Liddick 380ab13810 Merge pull request #9191 from lyen1688/feat/risk-control-excluded-accounts-fastpath
风控内容审计新增排除账户豁免机制并优化同步前置拦截性能
2026-12-02 16:09:57 +08:00
shaw 24b70236d5 fix(risk-control): audit follow-up for #9191
- Excluded accounts no longer suppress image_safety / cyber_policy evidence,
  ban counting or notifications; those are upstream verdicts, not our audit.
- Sampled multi-image inputs (more images than the audit sends) skip the clean
  cache and singleflight so one clean random sample cannot pin the verdict.
- Account search truncates by rune and drops invalid UTF-8 so PG does not
  reject the pattern with a 500.
- Account directory lookups are part of ContentModerationRepository instead of
  a runtime type assertion; lookup errors now propagate from Get/UpdateConfig.
- Remove the never-set BodyValidated flag and the frontend id-only fallback.
2026-12-02 15:53:42 +08:00
shaw aa25d20690 Merge origin/main into PR #9191 2026-12-02 15:34:05 +08:00
Wesley Liddick edba3eb7eb Merge pull request #9211 from Wei-Shaw/fix/release-version-before-tag
fix(release): require the tagged commit to carry the release VERSION
2026-12-02 15:29:07 +08:00
shaw ec0e489ab7 fix(release): require the tagged commit to carry the release VERSION
The sync-version-file job committed the VERSION bump to main only after
publishing, so every tag pointed at a commit whose VERSION was the previous
release (v0.2.19 through v0.2.26). Published artifacts were unaffected because
prepare rewrites VERSION from the tag, but source builds of a tag (go build,
GitHub source archives, Docker builds without .git) reported the old version.

prepare now fails before building or publishing when VERSION at the tag does
not match the tag version. A manual run with allow_version_mismatch=true
downgrades this to a warning for re-releasing older tags. The post-release
sync job is removed: the VERSION bump is committed before tagging instead.
2026-12-02 15:22:58 +08:00
Wesley Liddick ce3a27912e Merge pull request #9147 from erywim/fix/sanitize-safety-review-details
fix(openai): strip safety review details from client-visible failed events
2026-12-02 12:52:39 +08:00
shaw a64db2860b test: pass the replay collector argument added by #9203(audit follow-up for #9147) 2026-12-02 12:37:30 +08:00
shaw ea2df1442b Merge origin/main into PR #9147 2026-12-02 12:35:49 +08:00
Wesley Liddick 97b70cca2a Merge pull request #9203 from HuntercodeT/fix/ws-http-bridge-history-bounds
fix(openai): bound WebSocket HTTP bridge replay history
2026-12-02 12:35:38 +08:00
Wesley Liddick 6bc40957cf Merge pull request #9199 from magisk-k/fix/codex-models-etag-metadata
fix(openai): keep Codex catalog ETag in sync with codex.response.metadata
2026-12-02 12:35:34 +08:00
Wesley Liddick 51455623ce Merge pull request #9197 from debug-zhang/fix/9163-retry-after
fix(gateway): return Retry-After on rate-limit and pool-cooldown errors
2026-12-02 12:35:30 +08:00
Wesley Liddick 4bd5fa6480 Merge pull request #9149 from r266-tech/fix/alpha-search-apikey-400-failover
fix(openai): fail over standalone alpha search on API-key upstream 400
2026-12-02 12:35:25 +08:00
Wesley Liddick 4cfeeb2396 Merge pull request #9135 from NDCCCCCC/pr/account-threshold-ui
feat(accounts): 让所有受支持平台都能配置账号级自动停调阈值
2026-12-02 12:35:21 +08:00
shaw c101515d0a Merge origin/main into PR #9199 2026-12-02 12:06:32 +08:00
shaw 63cfafbac3 Merge origin/main into PR #9135 2026-12-02 12:06:32 +08:00
shaw 15aec090c2 Merge origin/main into PR #9149 2026-12-02 12:06:31 +08:00
shaw a08eb02ff8 Merge origin/main into PR #9197 2026-12-02 12:06:30 +08:00
shaw 9f1ec1f69e Merge origin/main into PR #9203 2026-12-02 12:06:29 +08:00
shaw b88a4f4cf9 Merge origin/main into PR #9147 2026-12-02 12:06:28 +08:00
Wesley Liddick 4c953d9252 Merge pull request #9205 from fengshao1227/fix/openai-manual-reset-earliest-credit
fix(openai): spend the earliest-expiring reset credit on manual reset
2026-12-02 12:06:06 +08:00
Wesley Liddick debe9e3e21 Merge pull request #9204 from fengshao1227/docs/antigravity-forward-env-passthrough
fix(deploy): pass Antigravity endpoint and 429 cooldown env through Compose
2026-12-02 12:06:02 +08:00
Wesley Liddick d036368c8e Merge pull request #9201 from Ikhdev1/ikhdev1/update-x-image-v045
CVE fix(deps): update golang.org/x/image to v0.45.0
2026-12-02 12:05:59 +08:00
Wesley Liddick b7b5321a6a Merge pull request #9200 from magisk-k/feat/codex-keep-hidden-auto-modes
feat(groups): add switch to keep upstream-hidden Codex automatic modes
2026-12-02 12:05:54 +08:00
Wesley Liddick 2d597faf60 Merge pull request #9198 from debug-zhang/fix/8933-http2-stream-limit
fix(gateway): retry OpenAI upstream once after a pre-output connection reset
2026-12-02 12:05:51 +08:00
Wesley Liddick 252e394f5c Merge pull request #9195 from debug-zhang/fix/8842-scheduler-cache-write
perf(scheduler): skip rewriting unchanged accounts in scheduler cache
2026-12-02 12:05:47 +08:00
Wesley Liddick cdbfa172e3 Merge pull request #9190 from pood1e/feat/openai-chat-session-id
feat(openai): let API-key accounts send an isolated session ID on Chat Completions
2026-12-02 12:05:42 +08:00
Wesley Liddick 120f4eeac8 Merge pull request #9187 from SomeoneKong/fix/content-moderation-worker-stop
fix(content-moderation): add Stop so background workers can be shut down
2026-12-02 12:05:38 +08:00
Wesley Liddick 5e68375f0c Merge pull request #9181 from feeeei/fix/gemini-4-argon-carbon-regular-pricing
fix(billing): update Gemini 4 Argon and Carbon to regular pricing
2026-12-02 12:05:34 +08:00
Wesley Liddick a07fa27e29 Merge pull request #9179 from SipengXie2024/fix/antigravity-keep-system-notices-in-place
fix(antigravity): keep mid-conversation system messages in place so the prompt prefix stays cacheable
2026-12-02 12:05:30 +08:00
Wesley Liddick 0e8cb91137 Merge pull request #9176 from r266-tech/codex/export-image-usage-costs
fix(usage): export numeric image cost breakdowns in admin Excel
2026-12-02 12:05:26 +08:00
Wesley Liddick ade6442b58 Merge pull request #9173 from HuntercodeT/fix/ws-codex-string-input
fix(openai): convert string input to a message list on Codex WS upstream
2026-12-02 12:05:21 +08:00
Wesley Liddick 988569acde Merge pull request #9171 from debug-zhang/fix/codex-removed-config-keys
fix(frontend): drop Codex config keys removed upstream
2026-12-02 12:05:17 +08:00
Wesley Liddick e7bf40dedf Merge pull request #9167 from Imccccc/upstream/vertex-tool-schema
fix(gemini): send only Vertex Schema fields in tool parameters
2026-12-02 12:05:13 +08:00
Wesley Liddick 8a8f1c135e Merge pull request #9160 from r266-tech/codex/antigravity-channel-pricing-sync
fix(channels): include mapped Gemini models in Antigravity pricing sync
2026-12-02 12:05:09 +08:00
Wesley Liddick 35eaa252b3 Merge pull request #9154 from r266-tech/codex/usage-display-state
fix(frontend): keep usage displays tied to the current request
2026-12-02 12:05:05 +08:00
Wesley Liddick 9e7647ec90 Merge pull request #9150 from r266-tech/codex/preserve-antigravity-import-options
fix(accounts): preserve Antigravity options on refresh token import
2026-12-02 12:05:01 +08:00
Wesley Liddick 6c55134201 Merge pull request #9140 from fengshao1227/fix/responses-anthropic-budget-below-max-tokens
fix(apicompat): keep max_tokens above the Responses thinking budget
2026-12-02 12:04:57 +08:00
Wesley Liddick 1d746382e9 Merge pull request #9138 from fengshao1227/fix/websearch-test-surface-provider-errors
fix(websearch): show why the admin web search test failed
2026-12-02 12:04:52 +08:00
Wesley Liddick a4d580691f Merge pull request #9137 from fengshao1227/fix/tavily-bearer-auth
fix(websearch): authenticate Tavily with a Bearer header
2026-12-02 12:04:47 +08:00
Wesley Liddick 8ff16c5cc0 Merge pull request #9073 from mengkzhaoyun/fix/grok-scheduler-tier-projection
fix(scheduler): preserve resolved Grok subscription_tier in metadata projection
2026-12-02 12:04:43 +08:00
shaw 2934284844 fix: drop bridge history when end-of-turn resize does not fit(audit follow-up for #9203)
Retaining a turn can need more budget than the turn held because the replay
and failover sequences get separate header arrays. When that growth does not
fit, drop the history instead of keeping it under-accounted. Count a shared
body only when both pointer and length match, and skip the common prefix by
index so the lookup set covers only the diverging tail.
2026-12-02 12:04:31 +08:00
shaw 1a55e82973 fix: strip safety review details using the resolved SSE event type(audit follow-up for #9147)
SSE data lines may omit "type"; the HTTP SSE path already resolved the event
type from the event: line, so strip with that instead of re-reading the
payload.
2026-12-02 12:04:31 +08:00
shaw 71436d44cc fix: keep existing 400 classification before alpha search API-key failover(audit follow-up for #9149) 2026-12-02 11:50:32 +08:00
shaw 9e63d8b986 fix: 非续接未缓存轮保留 failover 输入并去重共享历史字节(audit follow-up for #9203) 2026-12-02 11:48:59 +08:00