feat(coding-agent): add before_provider_headers extension hook (#6350)

* feat(coding-agent): add before_provider_headers extension hook

Extensions can already rewrite the request payload through before_provider_request, but there is no way to adjust the outgoing HTTP
headers of a provider call. This hook fills that gap for cases like request tracing, session correlation, or tenant routing.

Handlers mutate the headers map in place - a null value deletes a header - and the return value is ignored, so a handler cannot accidentally drop auth or attribution headers by
forgetting to spread.

* docs(coding-agent): document before_provider_headers extension hook

Add the before_provider_headers section and lifecycle-diagram entry to
extensions.md; drop the now-superseded proposal file.
This commit is contained in:
Mat
2026-07-06 22:35:56 +02:00
committed by GitHub
parent cfaa52e1c2
commit 244f1deaf1
7 changed files with 136 additions and 8 deletions
+1
View File
@@ -69,6 +69,7 @@ export type {
BashToolCallEvent,
BeforeAgentStartEvent,
BeforeAgentStartEventResult,
BeforeProviderHeadersEvent,
BeforeProviderRequestEvent,
BeforeProviderRequestEventResult,
BuildSystemPromptOptions,