Repository navigation
Use personal model table for catalog refreshes - #106
Merged
Merged
Conversation
- Fetch the richer /v2/enterprises/personal/models table for personal accounts, preserving credits, context-window and media metadata. - Keep enterprise accounts on /v3/config and fall back for older deployments without the personal route. - Add preview coverage, catalog regression tests and English/Chinese catalog documentation. Tests: - for s in tests/test_*.py; do uv run python -B "$s"; done - git diff --check
|
Sorry @maiphucgiang, you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 1 hour and 29 minutes by commenting |
Reviewer's GuidePersonal catalog refreshes now prefer Sequence diagram for personal catalog refresh routingsequenceDiagram
participant Refresh as CatalogRefresh
participant Fetch as fetch_model_scopes
participant Personal as PersonalModelsAPI
participant Config as ConfigAPI
participant Cache as PickerAndRootCache
Refresh->>Fetch: fetch_model_scopes(prefer_personal=True)
alt personal account
Fetch->>Personal: GET /v2/enterprises/personal/models
alt endpoint available
Personal-->>Fetch: picker and account catalog metadata
else HTTP 404, 405, or 501
Fetch->>Config: GET /v3/config
Config-->>Fetch: picker and account catalog
end
else enterprise account
Fetch->>Config: GET /v3/config
Config-->>Fetch: picker and account catalog
end
Fetch->>Cache: cache models and serves
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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
/v2/enterprises/personal/modelstable for personal-account catalog refreshes, preserving credits, context-window and media metadata in the existing picker/root cache./v3/config, and fall back to the established catalog route for older deployments that do not expose the personal endpoint.Tests
for s in tests/test_*.py; do uv run python -B "$s"; done— passed.git diff --check— passed.Summary by Sourcery
Prefer the personal model catalog for personal-account refreshes while preserving compatibility with enterprise accounts and older deployments.
New Features:
Bug Fixes:
Enhancements:
Documentation:
Tests: