feat: add --inference flag to token create command to create bearer tokens usable in the inference gateway#773
Open
shawnfeldman wants to merge 1 commit intomainfrom
Open
feat: add --inference flag to token create command to create bearer tokens usable in the inference gateway#773shawnfeldman wants to merge 1 commit intomainfrom
shawnfeldman wants to merge 1 commit intomainfrom
Conversation
Adds support for generating access tokens with InferenceGrant, matching the token generation logic used in agent-gateway for AI/inference endpoint authentication. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rektdeckard
approved these changes
Feb 27, 2026
Member
rektdeckard
left a comment
There was a problem hiding this comment.
Nice! If you want to bump the version as well, I can kick off a release for this.
rektdeckard
reviewed
Feb 27, 2026
Comment on lines
431
to
432
| fmt.Println("Token grants:") | ||
| util.PrintJSON(grant) |
Member
There was a problem hiding this comment.
This should probably print the whole ClaimGrants struct, not just the VideoGrant.
real-danm
approved these changes
Feb 28, 2026
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.
Summary
--inferenceflag tolk token createthat sets anInferenceGrant{Perform: true}on the generated JWTExample
Decoded JWT payload confirms the inference grant:
{ "identity": "inference_...", "inference": { "perform": true }, "name": "inference_..", "video": { "room": "room-12314" } }Test plan
lk token create --inference --identity inference_e2e --valid-for 60mgenerates a valid JWT with inference grantlk token createinteractive prompt shows "Inference" as a selectable permissiongo test ./...passes🤖 Generated with Claude Code