Commit Graph
6 Commits
Author SHA1 Message Date
Paweł Banaszewski a3f25a491e feat: forward bridged routes in AI Gateway proxy mode (#30226)
Enable bridged request forwarding in AI Gateway proxy mode. Responses
are captured through `TeeBuffer`.
Proxies are created per-request reusing transports.

Handle `http.ErrAbortHandler` inside the circuit-breaker wrapper so
aborted responses are classified by HTTP status before the panic is
propagated.

Generated by Coder Agents on behalf of @pawbana.
2026-11-17 18:02:24 +00:00
Paweł Banaszewski ff3de6e666 feat(aibridge/x/proxy): integrate key-pool failover (#30400)
Route centralized provider requests through the existing key-pool
failover transport. Retries replay a consumed request prefix and
continue the still-open source, discard rejected attempt responses, and
preserve client bytes and headers. BYOK requests do not fall back to
pooled credentials.

Generated by Coder Agents on behalf of @pawbana.
2026-11-13 11:33:20 +00:00
Paweł Banaszewski 44bd84cf9e feat: add per-request reverse proxy for bridged routes (#30399)
Prepare `forwardingHandler` to forward bridged requests to the provider.
Nothing calls it yet.
2026-11-13 10:42:45 +00:00
Paweł Banaszewski d430a6254f feat(aibridge/x/proxy): capture HTTP bodies for replay (#30398)
Adds HTTP body capture under `aibridge/x/proxy/replaybody`. `NewRequest`
and `NewResponse` replace the original body with an `io.ReadCloser` that
retains read bytes in the returned `TeeBuffer`.
Request retries replay the retained bytes through `r.GetBody()`.
`TeeBuffer.Wait` returns buffered bytes without reading the original
source.

Enables full duplex so Go’s HTTP/1 server can send an early upstream
response without first draining the client’s unfinished upload.

Generated by Coder Agents on behalf of @pawbana.
2026-11-09 14:05:00 +01:00
Paweł Banaszewski f08bfddfa7 feat: validate AI Gateway actor and credentials in proxy mode (#30225)
Extends the AI Gateway `forwardingHandler` with actor check, provider
credential resolution, and initial interception metadata.
Missing provider credentials return 403
Credential resolution failures return 500 with details kept in logs.
AWS-signed bridged credentials remain unsupported.

Generated by Coder Agents on behalf of @pawbana.
2026-10-07 16:51:19 +00:00
Paweł Banaszewski 7cfc38d0e7 feat: wire AI Gateway proxy routing and recorder dependencies (#29725)
Adds `forwardingHandler` for "bridged" routes in proxy mode. Wires
provider snapshots to a shared mux and recorder, tracing, circuit
breakers, and the server-owned inflight gate.

Generated by Coder Agents on behalf of @pawbana.
2026-10-05 17:33:07 +00:00