Kirill Turanskiy
1f8f198c45
feat: passthrough upstream response headers to clients
CPA previously stripped ALL response headers from upstream AI provider
APIs, preventing clients from seeing rate-limit info, request IDs,
server-timing and other useful headers.
Changes:
- Add Headers field to Response and StreamResult structs
- Add FilterUpstreamHeaders helper (hop-by-hop + security denylist)
- Add WriteUpstreamHeaders helper (respects CPA-set headers)
- ExecuteWithAuthManager/ExecuteCountWithAuthManager now return headers
- ExecuteStreamWithAuthManager returns headers from initial connection
- All 11 provider executors populate Response.Headers
- All handler call sites write filtered upstream headers before response
Filtered headers (not forwarded):
- RFC 7230 hop-by-hop: Connection, Transfer-Encoding, Keep-Alive, etc.
- Security: Set-Cookie
- CPA-managed: Content-Length, Content-Encoding
2026-02-18 00:16:22 +03:00
..
2026-02-10 15:39:26 +08:00
2026-02-15 14:10:10 +08:00
2026-02-15 13:59:33 +08:00
2025-09-26 00:54:52 +08:00
2025-11-13 08:38:03 +08:00
2026-01-22 17:12:47 +08:00
2026-02-15 14:10:10 +08:00
2026-02-10 15:39:26 +08:00
2025-11-21 23:40:59 +08:00
2025-12-07 13:19:12 +08:00
2026-02-03 00:02:54 +08:00
2026-02-09 08:32:58 +08:00
2026-02-01 14:33:31 +08:00
2026-02-16 22:55:37 +08:00
2026-02-18 00:16:22 +03:00
2026-02-01 11:19:43 +07:00
2026-02-05 19:24:46 -05:00
2026-02-15 12:04:15 +07:00
2026-01-10 14:46:59 +08:00
2026-02-11 18:29:17 +11:00
2026-02-11 20:35:13 +08:00
2026-01-28 10:58:35 +08:00