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-18 00:16:22 +03:00
2026-02-11 18:29:17 +11:00
2026-02-18 00:16:22 +03:00
2026-01-09 13:33:46 +05:45
2026-01-31 01:42:58 +08:00
2026-01-23 21:29:39 +00:00
2026-02-18 00:16:22 +03:00
2026-01-05 20:32:51 +08:00
2026-01-05 20:32:51 +08:00
2026-02-18 00:16:22 +03:00
2026-02-18 00:16:22 +03:00
2026-02-18 00:16:22 +03:00
2026-02-18 00:16:22 +03:00
2026-01-15 13:06:39 +08:00
2026-02-18 00:16:22 +03:00
2026-02-06 14:46:16 -05:00
2026-02-18 00:16:22 +03:00
2026-02-06 03:26:29 +08:00
2026-01-26 16:36:01 +02:00
2026-02-18 00:16:22 +03:00
2026-02-01 05:29:41 +08:00
2025-09-30 11:23:39 +08:00
2026-01-15 13:06:39 +08:00
2026-02-18 00:16:22 +03:00
2026-02-05 19:24:46 -05:00
2025-11-13 17:42:19 +08:00
2026-01-26 16:36:01 +02:00
2026-01-26 16:36:01 +02:00