Secure AI Gateway realtime client secrets - #16284
Open
31Carlton7 wants to merge 1 commit into
Open
Conversation
31Carlton7
force-pushed
the
carlton/elevenlabs-realtime
branch
from
June 20, 2026 23:47
73ab9e5 to
3d0aaa7
Compare
Collaborator
|
compare #15747. Tools work differently with Elevenlabs, if I recall correctly they need to be registered ahead of time, I wanted to investigate further if there is another way. Did the e2e Elevenalbs example work for you out of the box for you? |
Contributor
Author
Yes. They worked just fine for me. You can try out the example I left there. EDIT: Taking a closer look at the PR you linked, my implementation doesn't work for tool calls, so will submit a couple new commits to get this up and running |
31Carlton7
force-pushed
the
carlton/elevenlabs-realtime
branch
from
June 22, 2026 17:45
3d0aaa7 to
020a804
Compare
31Carlton7
force-pushed
the
carlton/elevenlabs-realtime
branch
from
June 22, 2026 17:54
a44bacb to
eb8620c
Compare
31Carlton7
force-pushed
the
carlton/elevenlabs-realtime
branch
from
June 22, 2026 18:04
85797f5 to
a0fa32b
Compare
31Carlton7
marked this pull request as ready for review
June 22, 2026 19:09
31Carlton7
force-pushed
the
carlton/elevenlabs-realtime
branch
from
June 23, 2026 18:34
83e49c9 to
c07083e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
allowedOriginsongateway.experimental_realtime.getToken()so browser redemption can be bound to trusted app origins.quotaEntityId,tags, anduserfrom the server-side session configuration into the Gateway client secret.vcst_flow and its security boundaries.Why
Gateway should remain the credential and traffic boundary. Browser clients receive a short-lived, single-use token bound to an exact model and optionally an origin, while trusted attribution and quota options are fixed by the server. This avoids exposing broad provider credentials or allowing one client to select another customer resource.
The working ElevenAgents adapter has been preserved on
carlton/elevenlabs-agents-realtimefor a future PR. Actual ElevenLabs agent support can build on Gateway private-resource mapping and team-scoped BYOK without putting raw agent IDs or provider credentials in the public client contract.Validation
pnpm --filter @ai-sdk/gateway test:node(467 passed)pnpm --filter @ai-sdk/gateway test:edge(462 passed, 5 skipped)pnpm --filter @ai-sdk/gateway type-checkpnpm --filter @ai-sdk/gateway buildpnpm exec ultracite check ...(0 warnings, 0 errors)pnpm validate:docs(493 MDX files)git diff --check