Skip to content

support for token mode - #1715

Open
davidzhao wants to merge 17 commits into
mainfrom
token-mode
Open

davidzhao wants to merge 17 commits into
mainfrom
token-mode

Conversation

@davidzhao

@davidzhao davidzhao commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

See: livekit/agents#8557 for details on token mode

@davidzhao
davidzhao requested a review from a team November 22, 2026 14:50
@davidzhao
davidzhao requested a review from ladvoc as a code owner November 22, 2026 14:50
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Changeset ✓

This PR includes a changeset covering all affected packages:

Package Bump
livekit patch
livekit-api patch
livekit-capture patch
livekit-common patch
livekit-data-stream patch
livekit-datatrack patch
livekit-ffi patch
livekit-protocol patch
livekit-rpc patch
livekit-signaling patch
livekit-telemetry patch
livekit-token patch

devin-ai-integration[bot]

This comment was marked as resolved.

@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

This PR bumps

  • livekit-api: minor
  • livekit-protocol: minor
  • livekit-token: minor

Also bumped

  • livekit-common: depends on livekit-protocol
  • livekit-telemetry: depends on livekit-protocol
  • livekit-data-stream: depends on livekit-common, livekit-protocol
  • livekit-datatrack: depends on livekit-common, livekit-protocol
  • livekit-signaling: depends on livekit-common, livekit-protocol, livekit-token
  • livekit-rpc: depends on livekit-common, livekit-data-stream, livekit-protocol
  • livekit: depends on livekit-api, livekit-common, livekit-data-stream, livekit-datatrack, livekit-protocol, livekit-rpc, livekit-signaling, livekit-token
  • livekit-capture: depends on livekit
  • livekit-ffi: depends on livekit, livekit-capture, livekit-common, livekit-data-stream, livekit-datatrack, livekit-protocol, livekit-signaling, livekit-telemetry, livekit-token

davidzhao and others added 2 commits November 27, 2026 23:21
The API check needs minor for these crates: the change breaks their public API.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A new error variant is then not a breaking change for callers.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Comment thread .changeset/token_mode.md Resolved
Co-authored-by: lukasIO <mail@lukasseiler.de>
Comment thread livekit-token/src/access_token.rs Resolved
Comment thread livekit-api/src/services/mod.rs Resolved
Comment thread livekit-api/src/public_api/mod.rs Resolved
Comment thread livekit-api/src/services/livekit_api.rs Resolved
davidzhao and others added 8 commits November 28, 2026 23:58
…local

The generated client's auth hook can only return a string error, so a token
provider error was kept in a task-local to return it typed. Now each thread
and database call gets its token first, from grants named at the call site,
and builds a generated client that sends it. The token error is returned
directly, and the hook only sets the header and timeout.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…mode

Add LiveKitApi::with_token_provider_and_client, the token provider match of
with_api_key_and_client. with_token_provider now calls it with the default
client.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The blanket impl for async closures stays, so closure providers still
compile unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A thread call asked for every action on every thread (agentThread.all).
A job token never carries agentThread.all, so token mode refused these
calls. Each call now names its one action and its thread or scope.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ServiceBase::bearer now marks the header sensitive, so the Twirp
clients redact it as the generated thread and database client does.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The thread server now accepts a write grant that names the thread, so
the update call no longer asks for agentThread.all. Needs the server
change (agents-private, agent-store UpdateThread) to be deployed first.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Same rule as the Go protocol library: a write grant that names the
thread may update it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

5 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

Comment thread livekit-api/src/services/threads.rs Resolved

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants