974 Commits
Author SHA1 Message Date
d62868b692 feat(openai): make the WebSocket fast-path budget configurable (#747)
Co-authored-by: Zyy <zyycn@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
2026-11-19 17:10:41 +08:00
0922f3486c fix(responses): return HTTP 400 for early WebSocket request errors (#746)
Co-authored-by: Zyy <zyycn@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
2026-11-19 16:59:11 +08:00
ZyyandCodex f4058c1d2e test: align backend coverage with current behavior
Remove obsolete field assertions and the ignored Codex binary TLS comparison. Keep coverage for request validation, compatibility, and local TLS handshakes.

Co-authored-by: Codex <noreply@openai.com>
2026-11-19 15:56:12 +08:00
Zyy 8253fbc497 fix(errors): show specific causes in admin feedback and request records 2026-11-19 15:41:32 +08:00
ZyyandCodex a9e8fa8a44 refactor(openai): simplify account selection and session admission
Co-authored-by: Codex <noreply@openai.com>
2026-11-19 15:06:20 +08:00
ZyyandCodex 437322ee4b refactor(core): centralize attempt preparation failure handling
Co-authored-by: Codex <noreply@openai.com>
2026-11-19 15:06:19 +08:00
Zyy 843e1367bd docs: streamline guides and clarify current behavior 2026-11-19 14:49:42 +08:00
ZyyandCodex ab1bf4372c fix(api): apply the CLI version gate to Desktop-hosted TUI clients
Co-authored-by: Codex <noreply@openai.com>
2026-11-19 14:15:35 +08:00
dca9806961 feat(usage): filter request errors by origin and focus the detail table (#743)
* feat(usage): filter request errors by origin and focus the detail table

Co-authored-by: Codex <noreply@openai.com>

* fix(usage): preserve request columns and fill the error table

Keep reasoning effort separate and use the success table's column order. Let the error summary fill the space left by hidden columns and reuse the decoded upstream body when filtering saved errors.

Co-authored-by: Codex <noreply@openai.com>

---------

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Zyy <zyycn@users.noreply.github.com>
2026-11-19 13:40:05 +08:00
ZyyandCodex 8d282dcdf9 fix(openai): align Responses transport with Codex CLI 0.170.0
Fragment large text messages before permessage-deflate and keep one send acknowledgement per message. Pin the matching WebSocket forks and Linux OpenSSL bindings, and refresh the bundled CLI release.

Co-authored-by: Codex <noreply@openai.com>
2026-11-19 09:03:38 +08:00
ZyyandCodex f4bed2077f fix(accounts): align Codex plan labels and wrap them in tables
Co-authored-by: Codex <noreply@openai.com>
2026-11-18 22:59:20 +08:00
Zyy 4a8b839780 fix(core): release account leases at upstream stream termination (#742) 2026-11-18 22:34:10 +08:00
ZyyandCodex f02bc80f15 fix(openai): keep frame metadata separate from forwarded headers
Co-authored-by: Codex <noreply@openai.com>
2026-11-18 21:21:37 +08:00
ZyyandCodex 32a95a9702 refactor(openai): forward turn state from the current request
Keep the client responsible for echoing turn state across requests. Scope WebSocket opening state to the first request and retain account isolation when moving a request to another account.

Co-authored-by: Codex <noreply@openai.com>
2026-11-18 20:49:26 +08:00
ZyyandCodex cc80401d5e fix(openai): preserve same-turn routing state from Codex turn metadata
Co-authored-by: Codex <noreply@openai.com>
2026-11-18 19:56:08 +08:00
ZyyandCodex 8cc6b50d85 perf(openai): defer account catalog refreshes for one hour on matching ETags
Co-authored-by: Codex <noreply@openai.com>
2026-11-18 19:19:33 +08:00
84bcd0e1c0 feat(usage): filter request records by account name or email (#735)
Co-authored-by: Zyy <zyycn@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
2026-11-18 11:51:02 +08:00
ZyyandCodex bb440a3cbb feat(usage): add GPT-6.2 list prices and distinguish Ultrafast requests
Use regular Ultrafast rates for Astra and Sol. Show a double bolt for Ultrafast requests and remove backgrounds from error origin icons.

Co-authored-by: Codex <noreply@openai.com>
2026-11-18 10:55:09 +08:00
ZyyandCodex 976359ad26 fix(openai): explain strict session timeouts for ineligible accounts
Report when the bound account cannot use the requested model while a child waits for its parent to switch accounts. Keep the existing queue timeout code and strict affinity behavior.

Refs: #732

Co-authored-by: Codex <noreply@openai.com>
2026-11-17 17:23:16 +08:00
ZyyandCodex 832858dade feat(plugins): expose historical quota observations by window
Let plugins page through retained account observations and find a prior baseline without reading raw provider documents or refreshing upstream. Reuse provider window identities and the existing completion index, preserving resets and gaps.

Co-authored-by: Codex <noreply@openai.com>
2026-11-17 17:06:55 +08:00
ZyyandCodex 4d4c1e48ce feat(plugins)!: expose account binding and selection roles to schedulers
Scheduler v4 reports session ownership separately from native selection preferences and pins. Only eligible candidates are annotated, and cache preferences do not imply a session binding.

BREAKING CHANGE: scheduler plugins must declare capability version 4 and accept the new candidate fields.

Co-authored-by: Codex <noreply@openai.com>
2026-11-17 16:48:06 +08:00
ZyyandCodex 1b96c775b2 test(api): verify SSE retry headers by error category
Co-authored-by: Codex <noreply@openai.com>
2026-11-16 18:54:01 +08:00
ZyyandCodex b9ccc0b702 fix(core): move proxy endpoint facts out of the account domain
Move ProxyEndpoint into the neutral upstream module so error observations no longer depend on account types. Keep proxy matching in the account adapter and verify host/port matching, redaction, and the owner dependency graph.

Co-authored-by: Codex <noreply@openai.com>
2026-11-16 18:40:43 +08:00
ZyyandCodex f9e364860a fix(openai): rotate native continuations after excessive retry advice
Migrate the session binding before requesting a full client replay when safe native continuation recovery exceeds the configured wait limit. Remove stale capacity retry headers from client responses while preserving upstream diagnostics and account rotation limits.

Co-authored-by: Codex <noreply@openai.com>
2026-11-16 18:40:17 +08:00
Zyy ceeb68ba82 fix(routing): skip unreachable account proxies for the rest of a request 2026-11-16 18:12:00 +08:00
ZyyandCodex 2abbfb1fac fix(openai): honor account rotation limits on WebSocket connection failures
Reserve a connection attempt for another eligible account when a new WebSocket request repeatedly fails before sending. Use the same rotation budget as HTTP while preserving session and replay restrictions.

Co-authored-by: Codex <noreply@openai.com>
2026-11-16 17:45:40 +08:00
5b7f307bb2 feat(openai): warm up general quota buckets after reset (#725)
* feat(openai): warm up general quota buckets after reset

Co-authored-by: Codex <noreply@openai.com>

* fix(openai): distinguish stream quota facts from actual usage

Co-authored-by: Codex <noreply@openai.com>

---------

Co-authored-by: Zyy <zyycn@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
2026-11-16 14:24:24 +08:00
ce12ba3f43 fix(openai): classify status-less stream invalid_request_error as a request error (#722)
* fix(openai): classify status-less stream invalid_request_error as a request error

Codex can reject a request with an in-stream `error` frame that carries
`error.type=invalid_request_error` but no HTTP status. That frame fell
through to the "unavailable" branch, so a non-streaming caller received
502 upstream_unavailable for its own invalid request.

Constraint: Capacity, flex and turn rate limit rejections keep their existing categories
Rejected: Treat every status-less stream failure as a request error | would hide real upstream outages
Confidence: high
Scope-risk: narrow
Tested: Rust 1.99.1 fmt --check; provider-openai transport::diagnostics + provider::contract (348 passed); clippy -p provider-openai --all-targets -D warnings; the new case fails without the classification change
Not-tested: End-to-end request against a live upstream on this base

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(openai): cover status-less stream errors through the provider

Keep the stream failure constructor private to the crate. Exercise the original SSE error through the provider so the test covers classification, retry behavior, and the frame delivered to clients.

Co-authored-by: Codex <noreply@openai.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Co-authored-by: Zyy <zyycn@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
2026-11-16 12:37:26 +08:00
dependabot[bot] 644296bf66 chore(deps): bump jsonschema from 0.60.2 to 0.61.2 in /backend (#718)
Bumps [jsonschema](https://github.com/Stranger6667/jsonschema) from 0.60.2 to 0.61.2.
- [Release notes](https://github.com/Stranger6667/jsonschema/releases)
- [Changelog](https://github.com/Stranger6667/jsonschema/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stranger6667/jsonschema/compare/ruby-v0.60.2...ruby-v0.61.2)

---
updated-dependencies:
- dependency-name: jsonschema
  dependency-version: 0.61.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-16 12:12:06 +08:00
dependabot[bot] 367a62bd7d chore(deps): bump lru from 0.18.3 to 0.19.0 in /backend (#717)
Bumps [lru](https://github.com/jeromefroe/lru-rs) from 0.18.3 to 0.19.0.
- [Changelog](https://github.com/jeromefroe/lru-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jeromefroe/lru-rs/compare/0.18.3...0.19.0)

---
updated-dependencies:
- dependency-name: lru
  dependency-version: 0.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-16 12:12:00 +08:00
dependabot[bot] 62f321c82b chore(deps): bump the minor-and-patch group in /backend with 8 updates (#716)
Bumps the minor-and-patch group in /backend with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [syn](https://github.com/dtolnay/syn) | `3.0.9` | `3.0.10` |
| [flate2](https://github.com/rust-lang/flate2-rs) | `1.1.10` | `1.1.11` |
| [uuid](https://github.com/uuid-rs/uuid) | `1.29.0` | `1.29.2` |
| [zip](https://github.com/zip-rs/zip2) | `9.4.0` | `9.5.1` |
| [aws-sdk-s3](https://github.com/awslabs/aws-sdk-rust) | `1.157.0` | `1.159.0` |
| [aws-smithy-runtime-api](https://github.com/smithy-lang/smithy-rs) | `1.19.2` | `1.21.0` |
| [aws-smithy-types](https://github.com/smithy-lang/smithy-rs) | `1.9.1` | `1.9.4` |
| [crc32fast](https://github.com/srijs/rust-crc32fast) | `1.5.4` | `1.5.5` |


Updates `syn` from 3.0.9 to 3.0.10
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/3.0.9...3.0.10)

Updates `flate2` from 1.1.10 to 1.1.11
- [Release notes](https://github.com/rust-lang/flate2-rs/releases)
- [Changelog](https://github.com/rust-lang/flate2-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/flate2-rs/compare/1.1.10...v1.1.11)

Updates `uuid` from 1.29.0 to 1.29.2
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/v1.29.0...v1.29.2)

Updates `zip` from 9.4.0 to 9.5.1
- [Release notes](https://github.com/zip-rs/zip2/releases)
- [Changelog](https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zip-rs/zip2/compare/v9.4.0...v9.5.1)

Updates `aws-sdk-s3` from 1.157.0 to 1.159.0
- [Release notes](https://github.com/awslabs/aws-sdk-rust/releases)
- [Commits](https://github.com/awslabs/aws-sdk-rust/commits)

Updates `aws-smithy-runtime-api` from 1.19.2 to 1.21.0
- [Release notes](https://github.com/smithy-lang/smithy-rs/releases)
- [Changelog](https://github.com/smithy-lang/smithy-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/smithy-lang/smithy-rs/commits)

Updates `aws-smithy-types` from 1.9.1 to 1.9.4
- [Release notes](https://github.com/smithy-lang/smithy-rs/releases)
- [Changelog](https://github.com/smithy-lang/smithy-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/smithy-lang/smithy-rs/commits)

Updates `crc32fast` from 1.5.4 to 1.5.5
- [Commits](https://github.com/srijs/rust-crc32fast/compare/v1.5.4...v1.5.5)

---
updated-dependencies:
- dependency-name: syn
  dependency-version: 3.0.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: flate2
  dependency-version: 1.1.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: uuid
  dependency-version: 1.29.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: zip
  dependency-version: 9.5.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: aws-sdk-s3
  dependency-version: 1.159.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: aws-smithy-runtime-api
  dependency-version: 1.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: aws-smithy-types
  dependency-version: 1.9.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: crc32fast
  dependency-version: 1.5.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-16 12:10:58 +08:00
d13a4a2138 feat(scheduling): add independent quota reset window weights (#713)
Rank quota scheduling strictly by configured reset windows and persist its settings independently from smart scheduling.

Co-authored-by: Zyy <zyycn@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
2026-11-14 18:13:33 +08:00
a0e7f38f7f fix(openai): preserve Claude Messages session affinity (#712)
Resolve explicit Claude session identities before account selection and
revalidate them after attempt middleware using the existing affinity policy.

Co-authored-by: Zyy <zyycn@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
2026-11-14 17:22:03 +08:00
David Lee 41f97ac836 feat(openai): check client profile releases hourly (#711) 2026-11-14 16:34:39 +08:00
ZyyandCodex 8681d6851e fix(deps): update Quinn and rustix to patched releases
Co-authored-by: Codex <noreply@openai.com>
2026-11-14 10:43:50 +08:00
d99ecf9aaf fix(openai): align model operations with global client profiles (#708)
Apply the global request profile to account catalog discovery, warmup,
and diagnostic routing. Freeze each operation's identity through the
existing provider profile resolver.

Refresh verified offline releases and centralize their version, artifact,
and environment defaults. Cover ZIP64 MSIX metadata and keep release
update tests independent of the current bundled versions.

Fixes #703

Co-authored-by: Zyy <zyycn@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
2026-11-14 10:40:12 +08:00
ZyyandZyy 8f40bfda7c fix(openai): preserve Responses identity semantics (#707)
Co-authored-by: Zyy <zyycn@users.noreply.github.com>
2026-11-14 10:36:23 +08:00
f61995e61d feat(settings): remove request history retention cap (#702)
* feat(settings): remove request history retention cap

Allow positive retention days beyond 31 throughout the form, domain rules,
and database constraint. Keep the existing default and saved settings.
Bound cleanup and account usage queries by stored data so large retention
windows remain safe without expanding empty history.

Co-authored-by: Codex <noreply@openai.com>

* test(admin): align retention policy coverage with positive windows

Accept long request retention windows while preserving zero rejection
for each target and independent event and audit retention settings.

Co-authored-by: Codex <noreply@openai.com>

---------

Co-authored-by: Zyy <zyycn@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
2026-11-13 17:29:21 +08:00
ZyyandCodex f85d80d756 fix(openai): release websocket resources under backpressure
Make event delivery respond to downstream cancellation and pool shutdown. Return or discard sockets before publishing terminal events while preserving normal connection reuse.

Co-authored-by: Codex <noreply@openai.com>
2026-11-13 15:38:22 +08:00
1eac929e9d perf(store): reduce temporary writes in analytics projections (#698)
Co-authored-by: Zyy <zyycn@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
2026-11-13 12:37:40 +08:00
9b4a042be5 feat(settings): support multiple account warmup cron expressions (#697)
Match independently scheduled hour and minute pairs while claiming each local minute once. Keep the existing string setting and database constraint, and edit the rules as tags using UI v0.11.0.

Co-authored-by: Zyy <zyycn@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
2026-11-13 12:17:50 +08:00
ZyyandCodex 3bd042181e fix(openai): preserve model exclusions during catalog refresh
Use the last successful catalog for the same account, credential revision, and plan until a refresh replaces it. Apply the same exclusions in memory and in PostgreSQL while preserving explicit allowlists and accounts with no catalog.

Co-authored-by: Codex <noreply@openai.com>
2026-11-13 10:16:12 +08:00
ZyyandZyy 4888681a04 feat(scheduling): weight quota resets by window in smart scheduling (#694)
Co-authored-by: Zyy <zyycn@users.noreply.github.com>
2026-11-12 18:56:30 +08:00
9739bb08be fix(egress): honor deployment proxies for unbound outbound requests (#693)
* fix(egress): honor deployment proxies for unbound outbound requests

Prefer the proxy selected for the request. Otherwise apply the deployment proxy and bypass rules consistently to HTTP and WebSocket connections, including background downloads. Keep explicit direct probes separate.

Co-authored-by: Codex <noreply@openai.com>

* fix(openai): preserve WebSocket dial errors

Recover the OS error or I/O kind from Hyper without retaining the endpoint. Keep refused connections distinguishable for both direct and proxied WebSocket dials.

Co-authored-by: Codex <noreply@openai.com>

---------

Co-authored-by: Zyy <zyycn@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
2026-11-12 17:29:35 +08:00
fac37ec563 fix(update): preserve permissions when moving read-only directories (#688)
* fix(update): unlock official plugin dirs before rename on macOS

macOS rejects renaming a 0555 official plugin directory during backup
and rollback, while Linux only needs the parent writable.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(update): preserve directory permissions during macOS moves

Fall back to the existing permission-preserving copy path when macOS
rejects a directory rename. Keep chmod limited to source cleanup so
backups and restored releases retain their original directory modes.

Cover read-only staged assets, rollback, failed replacement, and
cancelled or rejected rollback with permission assertions.

Co-authored-by: Codex <noreply@openai.com>

* fix(update): handle read-only directory moves across Unix platforms

Linux also requires source directory write permission when rename moves
it between parents. Apply the same copy fallback to Unix while retaining
the cross-platform permission regression test.

Co-authored-by: Codex <noreply@openai.com>

---------

Co-authored-by: CzsGit <czsde@outlook.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Zyy <zyycn@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
2026-11-12 13:20:16 +08:00
9f0d712671 fix(openai): honor advertised WebSocket message limits (#691)
Use each upstream handshake's message-size limit to select HTTP before
uploading oversized response.create frames. Remove fixed thresholds and
thread size hysteresis while preserving continuation replay and cleanup.

Co-authored-by: Zyy <zyycn@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
2026-11-12 13:19:56 +08:00
ZyyandCodex 75be1287ef fix(openai): omit output token limits from Responses requests
Co-authored-by: Codex <noreply@openai.com>
2026-11-12 10:24:27 +08:00
ZyyandCodex 151a3c6bfd fix(openai): negotiate Codex catalogs for Responses upstreams
Co-authored-by: Codex <noreply@openai.com>
2026-11-11 16:49:10 +08:00
ZyyandCodex e2f194875f refactor: clarify protocol ownership and request observations
Separate protocol identifiers from Provider identities and centralize shared
request facts and observations in gateway-protocol. Keep endpoint models
and private continuation state owned by Providers.

Reorganize the architecture documentation and clarify the shutdown guarantees
for buffered charges and observations.

Validated with workspace formatting, strict Clippy, 3013 affected-module
tests and 16 architecture checks. One reference-binary TLS test is ignored.

Co-authored-by: Codex <noreply@openai.com>
2026-11-11 16:04:16 +08:00
c0fdc1bbff fix(openai): record explicit Anthropic reasoning effort (#680)
Observe top-level output_config.effort before the OpenAI encoder rejects
Messages payloads. Reuse the protocol parser without inferring an effort
from thinking budgets or changing upstream conversion behavior.

Cover absent and explicit effort values, native Messages forwarding, and
Messages-to-Responses conversion. Document the observation contract.

Co-authored-by: Zyy <zyycn@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
2026-11-11 15:12:02 +08:00