mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-12-05 08:05:12 +00:00
Codex caches the /models catalog together with its ETag and, on every Responses WebSocket turn, compares that ETag with the x-models-etag header of the codex.response.metadata event. Upstream reports the ETag of its own catalog, but the gateway serves a group-specific manifest whose ETag changes as soon as group policy adjusts it, so Codex re-downloaded the full catalog on every turn. Record, per group, which served ETag corresponds to each upstream catalog ETag, and translate the metadata header when relaying WebSocket events in both ctx_pool and passthrough modes. Unknown values are removed so clients fall back to their regular catalog cache TTL. Pinned manifests keep the upstream ETags of every merged account, and generated manifests now use weak ETags so the value still matches behind a compressing reverse proxy.