Add private model catalog SDK support (AddCatalog, SelectCatalog, GetCatalogNames)#601
Open
kobby-kobbs wants to merge 6 commits intomainfrom
Open
Add private model catalog SDK support (AddCatalog, SelectCatalog, GetCatalogNames)#601kobby-kobbs wants to merge 6 commits intomainfrom
kobby-kobbs wants to merge 6 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds C# SDK support for managing private model catalogs (MDS integration) by extending the catalog API surface, implementing the new interop commands, and adding tests—while also reducing the risk of credential leakage in logs.
Changes:
- Extends
ICatalogwithAddCatalogAsync,SelectCatalogAsync, andGetCatalogNamesAsync. - Implements the new catalog-management commands in
Catalog, including forced refresh behavior. - Removes logging of command input in
CoreInteroperror paths and adds AOT JSON context forList<string>.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/cs/src/ICatalog.cs | Adds new public async catalog-management methods to the catalog interface. |
| sdk/cs/src/Catalog.cs | Implements add/select/list catalog operations and introduces a forceRefresh option for model updates. |
| sdk/cs/src/Detail/CoreInterop.cs | Stops logging command input in error paths to avoid leaking secrets. |
| sdk/cs/src/Detail/JsonSerializationContext.cs | Registers List<string> for source-generated JSON serialization (AOT). |
| sdk/cs/test/FoundryLocal.Tests/CatalogManagementTests.cs | Adds tests covering add/select/reset and catalog name listing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
ICatalog:AddCatalogAsync,SelectCatalogAsync,GetCatalogNamesAsyncChanges by file
sdk/cs/src/ICatalog.csAdds three new interface methods with full XML documentation:
AddCatalogAsync— Register a private catalog with OAuth2/bearer auth supportSelectCatalogAsync— Filter models to a specific catalog (or null to show all)GetCatalogNamesAsync— List all registered catalog namessdk/cs/src/Catalog.csImplements the three new methods with:
forceRefreshparameter onUpdateModelsso Add/Select immediately refresh the model listGetCatalogNamesAsyncsdk/cs/src/Detail/CoreInterop.csRemoves logging of
commandInputin error paths to prevent leaking credentials (client secrets, bearer tokens) in debug logs.sdk/cs/src/Detail/JsonSerializationContext.csRegisters
List<string>for AOT-compatible JSON serialization of catalog names.sdk/cs/test/FoundryLocal.Tests/CatalogManagementTests.csNew test class with two tests:
Test_AddAndSelectCatalog— Verifies add + select + reset flowTest_GetCatalogNames— Verifies catalog name retrieval and deserialization