CAPI header tweaks (#4090)

This commit is contained in:
Rob Lourens
2026-02-28 21:28:42 +00:00
committed by GitHub
parent ab8f68d457
commit 26eb0bdf4e
@@ -368,7 +368,8 @@ function networkRequest(
'conversation-subagent' :
options.requestKindOptions?.kind === 'background' ?
'conversation-background' :
intent === 'conversation-agent' ? intent : undefined;
intent === 'conversation-agent' ? intent :
intent;
const headers: ReqHeaders = {
Authorization: `Bearer ${secretKey}`,
@@ -378,10 +379,8 @@ function networkRequest(
...additionalHeaders,
...(endpoint.getExtraHeaders ? endpoint.getExtraHeaders(location) : {}),
};
if (agentInteractionType) {
headers['X-Interaction-Type'] = agentInteractionType;
headers['X-Agent-Task-Id'] = requestId;
}
headers['X-Interaction-Type'] = agentInteractionType;
headers['X-Agent-Task-Id'] = requestId;
if (endpoint.interceptBody) {
endpoint.interceptBody(body);