Support BYOK with the built-in WebSocket connection adapter #1254
Visualizeit
started this conversation in
Ideas
Replies: 1 comment 1 reply
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
TanStack AI recently added BYOK support, where useChat forwards the
selected provider key through x-byok-* headers.
This works with the built-in fetch/XHR connection adapters, but does
not appear to work with the built-in WebSocket adapter because browser
WebSocket connections cannot attach arbitrary request headers.
It would be useful if BYOK were transport-agnostic at the useChat level,
with the WebSocket adapter forwarding the credential through a
standard application-level frame/protocol instead of requiring every
application to implement its own BYOK-over-WebSocket protocol.
All reactions