Skip to content

Conversation

@chase-crumbaugh
Copy link
Member

Adds two endpoints:

  • chatSessions.create
  • chatSessions.revoke

Create returns a JWT that can then be used to authenticate with certain endpoints, namely chatCompletions and MCP

Next steps: Integrate with Allowed Origins

@chase-crumbaugh chase-crumbaugh requested a review from a team as a code owner December 17, 2025 21:20
@changeset-bot
Copy link

changeset-bot bot commented Dec 17, 2025

🦋 Changeset detected

Latest commit: a9440fd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@gram/client Patch
dashboard Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Dec 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
gram Ready Ready Preview, Comment Dec 18, 2025 7:20pm
gram-docs-redirect Ready Ready Preview, Comment Dec 18, 2025 7:20pm


Payload(func() {
Attribute("user_identifier", String, "Optional free-form user identifier")
Attribute("expires_after", Int, "Token expiration in seconds (max 3600, default 600)", func() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you think it's simpler for max and default to be the same

}

// Revoke the token
err = s.chatSessionsManager.RevokeToken(ctx, claims.ID)
Copy link
Collaborator

Choose a reason for hiding this comment

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

not certain about this but wondering if it's better to revoke by the token as the cache key. That way you don't need to parse to check revocation list

@chase-crumbaugh chase-crumbaugh merged commit 76beb93 into main Dec 18, 2025
16 checks passed
@chase-crumbaugh chase-crumbaugh deleted the chase/chat-sessions branch December 18, 2025 19:42
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants