feat: conditionally send aibridge actor headers (#21643)

Also passes along the authenticated username as actor metadata.

Closes https://github.com/coder/aibridge/issues/135
Depends on https://github.com/coder/aibridge/pull/142

**Replace aibridge tag with merge commit once
https://github.com/coder/aibridge/pull/142 lands.**

---------

Signed-off-by: Danny Kopping <danny@coder.com>
This commit is contained in:
Danny Kopping
2026-01-26 15:08:17 +00:00
committed by GitHub
parent bb186b8699
commit 7123518baa
19 changed files with 252 additions and 69 deletions
+11
View File
@@ -1857,6 +1857,17 @@ Maximum number of AI Bridge requests per second per replica. Set to 0 to disable
Emit structured logs for AI Bridge interception records. Use this for exporting these records to external SIEM or observability systems.
### --aibridge-send-actor-headers
| | |
|-------------|-------------------------------------------------|
| Type | <code>bool</code> |
| Environment | <code>$CODER_AIBRIDGE_SEND_ACTOR_HEADERS</code> |
| YAML | <code>aibridge.send_actor_headers</code> |
| Default | <code>false</code> |
Once enabled, extra headers will be added to upstream requests to identify the user (actor) making requests to AI Bridge. This is only needed if you are using a proxy between AI Bridge and an upstream AI provider. This will send X-Ai-Bridge-Actor-Id (the ID of the user making the request) and X-Ai-Bridge-Actor-Metadata-Username (their username).
### --aibridge-circuit-breaker-enabled
| | |