Add vertex support in-line with the recent async db changes#20
Closed
Dokujaa wants to merge 3 commits intoTensorBlock:mainfrom
Closed
Add vertex support in-line with the recent async db changes#20Dokujaa wants to merge 3 commits intoTensorBlock:mainfrom
Dokujaa wants to merge 3 commits intoTensorBlock:mainfrom
Conversation
- Add OAuth2 token caching functions to async_cache.py and cache.py
- Create async_oauth_token_cache with 55-minute TTL (5-min safety buffer)
- Update vertex_authentication method to check cache first before token refresh
- Add OAuth2 token cache statistics tracking
- Cache key format: token:{api_key}
- Performance optimization: reduce unnecessary token refresh calls
* Replace fixed TTL with token's native expires_at timestamp validation * Use SHA-256 hashed cache keys for long JSON service account credentials * Add opportunistic cleanup to prevent expired token memory leaks * Standardize token structure with access_token, expires_at, token_type fields * Simplify Vertex AI authentication using service account re-authentication * Move imports to top-level for better code quality Addresses PR feedback on cache key security, TTL complexity, and memory management.
Contributor
|
Sorry for the delay. We're doing some tests for the async db tests. Would rebase the original PR: #7 and merge it very soon. Then you could submit your PR based on that. |
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.
Sorry for the redundancy. Facing some issues with the old PR with merge conflicts when trying to merge to the vertex_support branch. I'll just try to merge into main this time.
PR includes Vertex AI support rebased on the latest async database refactor as requested.