Problem
A caller cannot add a request header to Router completions that profileChatClient (and profileOptimizerModelCall) send.
bindProfileChat builds the executor with createExecutor(args.executor), and runBoundProfileChat calls streamAgentTurn without ExecutorContext.propagatedHeaders.
RouterSeam has no header field.
The only other route is RouterSeam.complete, but a caller-supplied transport cannot throw Runtime's SDKError, so withRetry loses the HTTP status and stops retrying 429 and 5xx responses.
Need
Braid must send x-tangle-client: braid/<version> on every request it sends to the Tangle router, so tangle-admin attributes the usage.
Braid's direct Router turns already do this by wrapping the executor factory and setting ExecutorContext.propagatedHeaders.
Braid's semantic eval judge uses profileChatClient and cannot.
Proposed change
Accept optional request headers on the Router executor config (for example RouterSeam.headers), or accept propagatedHeaders on profileChatClient args and forward them into the executor context.
Runtime's own content-type, authorization, idempotency-key, and x-correlation-id should keep precedence, as they do for propagatedHeaders today.
Braid tracking: tangle-network/braid feat/router-client-attribution.
Problem
A caller cannot add a request header to Router completions that
profileChatClient(andprofileOptimizerModelCall) send.bindProfileChatbuilds the executor withcreateExecutor(args.executor), andrunBoundProfileChatcallsstreamAgentTurnwithoutExecutorContext.propagatedHeaders.RouterSeamhas no header field.The only other route is
RouterSeam.complete, but a caller-supplied transport cannot throw Runtime'sSDKError, sowithRetryloses the HTTP status and stops retrying 429 and 5xx responses.Need
Braid must send
x-tangle-client: braid/<version>on every request it sends to the Tangle router, so tangle-admin attributes the usage.Braid's direct Router turns already do this by wrapping the executor factory and setting
ExecutorContext.propagatedHeaders.Braid's semantic eval judge uses
profileChatClientand cannot.Proposed change
Accept optional request headers on the Router executor config (for example
RouterSeam.headers), or acceptpropagatedHeadersonprofileChatClientargs and forward them into the executor context.Runtime's own
content-type,authorization,idempotency-key, andx-correlation-idshould keep precedence, as they do forpropagatedHeaderstoday.Braid tracking: tangle-network/braid feat/router-client-attribution.