Skip to content

Conversation

@kyujin-cho
Copy link
Member

resolves #7704 (BA-3668).
This pull request focuses on reducing the size of JWT tokens generated for model service endpoints by removing unnecessary information and centralizing the logic for JWT creation. The changes streamline the payload, mask sensitive data, and move JWT generation to the Circuit model for better maintainability.

JWT Generation Improvements:

Codebase Cleanup:

Documentation:

  • Updated the feature documentation to note the reduction of unnecessary information in model service JWTs. (changes/.feature.md, changes/.feature.mdR1)

@kyujin-cho kyujin-cho self-assigned this Jan 5, 2026
Copilot AI review requested due to automatic review settings January 5, 2026 04:13
@github-actions github-actions bot added the size:S 10~30 LoC label Jan 5, 2026
@github-actions github-actions bot added the comp:app-proxy Related to App Proxy component label Jan 5, 2026
.feature.md -> 7705.feature.md

Co-authored-by: octodog <[email protected]>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request refactors JWT token generation for model service endpoints by centralizing the logic in the Circuit model and reducing token payload size. The changes move JWT creation from the endpoint API to a new model method while removing unnecessary and sensitive data from the token payload.

  • Centralized JWT generation logic in a new Circuit.generate_jwt method
  • Reduced JWT payload size by removing config and route_info fields
  • Removed direct jwt library usage from the endpoint API

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/ai/backend/appproxy/coordinator/models/circuit.py Added generate_jwt method to centralize JWT creation with reduced payload; added jwt import
src/ai/backend/appproxy/coordinator/api/endpoint.py Refactored to use the new Circuit.generate_jwt method; removed jwt import
changes/.feature.md Documentation of the feature to reduce JWT token size

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

comp:app-proxy Related to App Proxy component size:S 10~30 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove route_info from Model Service JWT Token Payload

3 participants