Commit Graph

2026 Commits

Author SHA1 Message Date
fawney19
c7641dad0a fix: propagate build version through local deploy 2026-05-23 00:26:07 +08:00
fawney19
b5e942ca9d fix: increase postgres shared memory for dashboard queries 2026-05-23 00:21:34 +08:00
fawney19
74c82d9948 Merge remote-tracking branch 'origin/main' 2026-05-22 23:59:05 +08:00
fawney19
d18b13a91a fix: harden frontdoor and usage ingestion 2026-05-22 23:57:38 +08:00
fawney19
9af1507238 Merge pull request #545 from RWDai/feat/expand-client-types
feat: expand client type recognition
2026-05-22 18:36:53 +08:00
fawney19
6ef6cbade2 Fallback dashboard aggregate reads on schema mismatch 2026-05-22 17:52:36 +08:00
fawney19
ef04f4b0fb Add automatic B/T compact unit formatting 2026-05-22 17:13:16 +08:00
RWDai
c2d0f60784 fix(gateway): accept header sessions for unknown clients 2026-05-22 16:10:27 +08:00
RWDai
9633bce2e1 feat(frontend): centralize client family labels 2026-05-22 15:28:19 +08:00
RWDai
ca341703bc feat(usage): infer additional client families 2026-05-22 15:27:39 +08:00
RWDai
cb2ff61bbc feat(gateway): expand client session family detection 2026-05-22 15:26:56 +08:00
fawney19
ecf6019ccb Merge pull request #543 from zhefox/main
Accept Claude message bodies in OpenAI chat endpoints
2026-05-22 14:53:25 +08:00
zhefox
2a298de971 fix(provider): serialize Claude tool results as JSON strings 2026-05-22 14:41:27 +08:00
fawney19
8ede01ad4e Merge remote-tracking branch 'origin/main' v0.7.4 2026-05-22 14:16:07 +08:00
fawney19
8966fd6aac Protect background workers under DB pool pressure 2026-05-22 14:11:47 +08:00
ZheFox
2b8ff8a743 Merge branch 'fawney19:main' into main 2026-05-22 14:11:00 +08:00
zhefox
97de4ff8a3 fix(gateway): accept Claude Messages bodies on OpenAI chat endpoints 2026-05-22 14:09:51 +08:00
fawney19
f6c3ebf7d3 Merge pull request #542 from zhefox/main
Handle OpenAI chat body responses and SSE passthrough
2026-05-22 12:05:36 +08:00
ZheFox
56abfdf39d Merge branch 'fawney19:main' into main 2026-05-22 11:51:53 +08:00
zhefox
9b95fa4d95 fix(gateway): handle responses-shaped OpenAI chat bodies and SSE passthrough 2026-05-22 11:39:38 +08:00
fawney19
f341c573eb Merge pull request #541 from AAEE86/main
feat(notification): add Bark push support
2026-05-22 11:24:11 +08:00
fawney19
b227669985 Merge pull request #540 from zhefox/main
fix(usage): treat stream terminal failures as failures on HTTP 200
2026-05-22 11:23:53 +08:00
AAEE86
ce44d35eb6 feat(notification): add Bark push support
Add Bark as a notification-service delivery channel, including encrypted Device Key configuration, server URL/template settings, module status integration, and admin UI support.
2026-05-22 11:08:00 +08:00
zhefox
507f2f8250 fix(usage): treat stream terminal failures as failures on HTTP 200 2026-05-22 09:34:22 +08:00
fawney19
2b32b9a445 Fix system data import export flows 2026-05-22 02:46:49 +08:00
fawney19
3714c211dc Merge pull request #534 from RWDai/fix/issue-528-cache-affinity-health
fix(gateway): preserve cache affinity during health updates
2026-05-22 02:10:45 +08:00
fawney19
504c1ccb37 feat: restructure notification services 2026-05-22 01:45:46 +08:00
fawney19
d5e64d6ad9 Merge branch 'pr-503'
# Conflicts:
#	apps/aether-gateway/src/handlers/admin/provider/summary/value.rs
#	apps/aether-gateway/src/lib.rs
#	apps/aether-gateway/src/maintenance/mod.rs
#	apps/aether-gateway/src/maintenance/runtime/workers.rs
#	frontend/src/api/endpoints/types/provider.ts
2026-05-22 00:19:23 +08:00
RWDai
9859aec16c fix(gateway): evict pooled affinity after sibling key failures 2026-05-21 23:50:34 +08:00
fawney19
0e6d7539ad Merge remote-tracking branch 'origin/pr/538' 2026-05-21 23:12:42 +08:00
fawney19
d6eb41aa78 Merge remote-tracking branch 'origin/pr/536'
# Conflicts:
#	apps/aether-gateway/src/execution_runtime/stream/execution.rs
2026-05-21 23:03:14 +08:00
fawney19
97997685b5 Merge remote-tracking branch 'origin/pr/498' 2026-05-21 22:56:43 +08:00
fawney19
ab0a90de97 fix(runtime-state): govern redis connections 2026-05-21 22:53:37 +08:00
ZheFox
eeb7995214 Merge branch 'fawney19:main' into main 2026-05-21 22:27:07 +08:00
zhefox
68d8f86dc6 fix(gateway): stop stream polling on downstream disconnect and preserve Codex cache keys 2026-05-21 22:26:14 +08:00
RWDai
18fe5a4f11 fix(gateway): preserve affinity during adaptive retries 2026-05-21 21:56:26 +08:00
RWDai
26ee1a9958 fix(gateway): preserve affinity during quota telemetry 2026-05-21 21:56:26 +08:00
zhefox
77c2d91eb0 fix(gateway): drain downstream-disconnected streams and stop inferring cancelled usage 2026-05-21 20:30:44 +08:00
fawney19
b8a65cbdec Merge pull request #532 from RWDai/opencode/cosmic-nebula
fix: raise group rate limits by access tier
2026-05-21 19:39:50 +08:00
zhefox
71f9afc526 fix(gateway): move openai responses helper import to ai_serving module 2026-05-21 18:09:57 +08:00
zhefox
8ca4a10f24 fix(gateway): require terminal events for OpenAI responses streams 2026-05-21 17:46:21 +08:00
stabey
cadc45c5b8 fix(data): cleanup uses failed candidate status instead of 504
The stale-pending cleanup task previously hardcoded status_code=504 and a
generic timeout message for every usage row it finalized. When a request
had already been observed as failing — e.g. upstream Connection reset by
peer, watchdog 504, or an authenticated 4xx — the cleanup overwrote that
context with a misleading "服务器超时" outcome and 504 status, hiding the
real cause from the dashboards and customer.

Pull the most recent failed/cancelled candidate per stale request_id and,
if present, finalize the usage row with the candidate's status_code
(defaulting to 502 when none was recorded) and error_message. Requests
that have no terminal candidate (truly stuck pending/streaming) keep the
existing 504 + timeout-message behavior, since they really are timeouts
from the cleanup's perspective. Applied to all three SQL backends with
parameterized UPDATE statements.

The Postgres failed-candidate lookup orders by
COALESCE(finished_at, started_at, created_at) DESC, matching the MySQL
and SQLite ORDER BY clauses so the three backends pick the same
"most recent terminal candidate" under every NULL combination of timing
columns.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 16:56:56 +08:00
zhefox
b7b7b4f718 fix(gateway): report terminal stream failure errors consistently 2026-05-21 16:15:03 +08:00
RWDai
776f95b1ab chore: format auth rate limit tests for rustfmt 1.95 2026-05-21 15:53:40 +08:00
zhefox
12abde2aeb fix(usage): handle terminal stream failures and preserve usage updates 2026-05-21 15:52:51 +08:00
RWDai
965a8c79af fix(gateway): preserve cache affinity during health updates 2026-05-21 15:51:56 +08:00
RWDai
d33043288d fix(frontend): clarify user group policy help 2026-05-21 15:38:53 +08:00
RWDai
a2ad556f2b fix(gateway): raise group rate limits by tier 2026-05-21 15:38:42 +08:00
stabey
40434005c0 fix(gateway): use total_ms for non-stream upstream watchdog
When the endpoint forces upstream_stream_policy=force_non_stream while
the client streams, the local stream candidate watchdog still preferred
timeouts.first_byte_ms — a non-stream upstream produces no early first
byte, so the watchdog fired before the HTTP request_timeout and aborted
otherwise-healthy attempts at ~300s.

Read upstream_is_stream from report_context and invert the priority:
non-stream upstreams use total_ms first, falling back to first_byte_ms
and then the default; streaming upstreams keep the previous order.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 15:26:42 +08:00
stabey
3330b2ac4c refactor(report-context): extract UPSTREAM_IS_STREAM_KEY constant
The "upstream_is_stream" JSON key flows from the AI execution report
context producer (aether-ai-serving::report_context) through several
consumers — usage runtime metadata copy/move, gateway watchdog, sync
execution decision, observability handlers, and the per-driver usage
repositories. Each site spelled the key as a bare string literal, so a
producer-side rename would silently degrade every consumer to its
fallback (typically assuming streaming) with no compile-time signal.

Introduce a single pub const UPSTREAM_IS_STREAM_KEY in
aether-ai-formats (the lowest crate every consumer already depends on),
re-export from the crate root, and route producer + all map-style
consumers through it. The change is purely a string-literal → constant
swap; behaviour is identical.

Sites left as literals (intentional):
- `json!({"upstream_is_stream": ...})` macro keys, which must be string
  literals at the macro layer; these are also API-response payload
  field names (an external contract that should not silently track
  internal report-context renames).
- SQL column accessors (`try_get::<...>("upstream_is_stream")`), which
  refer to the database schema column, not the JSON key.
- Test fixtures and assertions, which validate the on-the-wire contract
  and should keep verifying the actual string.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 15:26:42 +08:00